State of the art object detection in real-time using YOLOV3 algorithm. Augmented with a process that allows easy training of the classifier as a plug & play solution . Provides alert if an item in an alert list is detected.
Remember to download pretrained weights if you need to See training section
On the webscraper, indicate the labels in labels.txt, and change the parameters in config.py if needed then in terminal, type
python3 downloadimages.py
Once images are downloaded. You can download pretrained weights here: darknet Or you can continue training your weights if you've done this before Edit the parameters in train.py and then in batch type:
python3 train.py -g
-g : Whether to use GPU
-e #: Epochs (optional)
-s #: Save Rate (optional)
-e #: Epochs (optional)
-lr #: Learning Rate (optional)
-b #: Batch (optional)
Usage:
python3 run.py "path_to_video_file" -g -s "test.avi"
Whether to use a video file, supply path
If not video file, assume to use camera feed.
-g /--gpu : Optional, whether to use GPU ( Defaults to config)
-s /--save: Optional, whether to save results to a video file and where (Defaults to config)
There is a config.py provided which helps to set the defaults for the following:
You will be asked for the path of the video file. You can adjust the parameters as well as the paths of the weights by opening up the py files.
You can set alerts by editing the text file "alerts.txt" when a label found in this text file appears, it will generate an alert by drawing the box red and displaying "Alert x found in footage" when testing.
This project needs your help and contribution
The Training Script needs work.
The Alerts and Pinging requires work to finish.
Downloading of images from google and seamless Training