Bernie Sanders Detector Using YOLOApr 12, 2021
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 ;)
Step 1: What You Will Need
What you’ll need, you’ll only need YOLO v4 or v5:
Step 2: Gathering Data
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.
Step 3: Using Roboflow to Create Datasets
You can bypass this step and use our pre-made dataset!
You’ll need a free Roboflow account to start.
- The first thing you’ll want to do is create a dataset.
- Upload all images.
- Search and remove irrelevant images.
- We will be using default settings for splitting.
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.
Step 4: Training Scaled YOLOv4 and YOLOv5
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.
Step 5: Testing
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/
Get our Free Computer Vision & AI Starter Kit:
- AI & Computer Vision Foundations: Uncover the core concepts and skills behind AI and Computer Vision, perfect for beginners or anyone eager to refresh their expertise.
- YOLO-NAS & YOLOv8 Object Detection Pro - A Glimpse: Dive into a preview of our powerful YOLOv8 course and master state-of-the-art object detection techniques that'll set you apart.
- ChatGPT Course Exclusive Access: Be among the first to explore our groundbreaking ChatGPT course and unleash the potential of Large Language Models (LLMs).
- Expert Tips & Insider Knowledge: Stay ahead of the competition with regular updates on the latest AI and Computer Vision trends and developments.
We hate SPAM. We will never sell your information, for any reason.