About Repository:
-
Basically this Repository is an attempt by me to make it easy for other developers to perform Object dection and Recognition.
-
This Repository also provides users with weights and configuration files that I have generated for my particular task of detecting the emotions of Tom and Jerry.
-
I am also providing images (
test_images
) to test this model without actually training it. -
This Repository has a mechanism for users to test it before they train it so that they can get insights of how the flow of code going on.
-
Note that the main Aim of this Model is combine at one place the training and testing of the model .
-
Training of the model is not the motto of this Repo.
-
Refer to the links Given in below section to train the model.
Custom Training:
-
Obtain the dataset for the that you wanna detect.
-
For training the Model on Colab : Refer this.
-
For training the Model on Local Machine either Linux , Windows or MacOS : Refer this.
-
After training you should have a weights and configration file with you to proceed with the predictions.
Testing:
-
A folder should be present having files similar to obj.data , obj.names , yolov3-tiny-obj.cfg , yolov3-tiny-obj_4000.weights as present under Data_for_colab folder. These files will be with you if you have training of the model.
-
run
yolorun.py
file .
Information about yolorun.py
arguments :
-
--image : path to the image file.
-
--dir_path : path to the directory in which images are kept.
-
--weights : path to the .weights file generated from training.
-
--configs : path to the .cfg file.
-
--labels : path to the .names file.
Remember that at a time only one of the argument either
--image
or--dir_path
can be used else error will be thrown.Examples:
-
python yolorun.py --image image.jpg
-
python yolorun.py --dir_path dirname
Note :
yolo.py
(called by yolorun.py) saves the output of the prediction by the model in a text file namedsubmission.txt
. If you want you can remove this functionality by following the instructions inyolo.py
, line - 23
Conclusions:
- This Repo is my best attempt to make object detection and recognition easier and would be introducing more convinient approaches in future.