I am going to show you multiple ways to train models to detect Bernie Sanders on both static images as well as in real time.
We will be demonstrating the building, annotating, and augmenting the dataset, then I we will use Google Colab to initiate the training of YOLOv4/YOLOv5.
Finally if you stay till the end of the video, I will show you how to also run your model on Android ;)
What you’ll need, you’ll only need YOLO v4 or v5:
We will be using the (Chrome) Download All Images extension to search for images and automatically download them.
Search for Bernie Sanders Memes, you can remove irrelevant images manually or wait until the next step.
You can bypass this step and use our pre-made dataset!
You’ll need a free Roboflow account to start.
You will now be presented with the annotation workflow.
Using the drag and drop, select Bernie Sanders then create a class called Bernie. You’ll need to do this for each image.
Make sure to check for un-annotated images before continuing.
See our video for settings used when augmenting the output before exporting data.
When finished, save your download code for the next step.
Starting we will need to know about a timeout issue when using 3000+ epochs without pro versions of Google Colab. If the pro version isn’t available to you, try using Colab Alive Chrome Extension.
Once you have imported your dataset to Google Colab by pasting the download code from the previous step, we can begin.
For Scaled YOLOv4 you’ll need at least 3000 epochs, once you’ve set this simply make sure you are using a GPU hardware accelerator and select Run All.
We recommend 300 Epochs if using Google Colab.
Using Roboflow Train:
Alternatively you can use Roboflow Train and start from check point. You will need to wait up to 24 hours and recieve an email when it is done.
For Web App Testing: Select example Web App. Find an unused image of Bernie and choose a minimum confidence level then increase Stroke Width to 10px.
Click Run Inference.
You should see that it has outlined Bernie with a line if all is working correctly
For Camera Based Testing: Try with webcam on your computer, or do the same with your Smart Phone.
To Learn more Computer Vision, Raspberry Pi, OpenCV tutorials, please visit: www.augmentedstartups.com/
Join our mailing list to receive the latest news and updates from our team. You'r information will not be shared.