1.) Step: Pick The Object --> Decite what type is your label general
or specific
2.) Step: Capture Images for Training and Testing --> Web Cam Needed !
Note: If you want the model to detect a more general label
you will need about 100-200
images with different shapes and angles.
For a specific object
( Like --> Detect my dog ) you will need about 10-20
images with the same object from different angles.
· Python Script Generates all Folders Required for Storage --> Tensorflow/workspace/images/collectedimages
3.) Step: Label Images --> xml
file
IMG_0297.mp4
IMG_0297.mp4
Step 1. Clone this repository: https://github.com/orbant12/Object-Detection---Tensorflow.git
Step 2. Create a new virtual environment
python -m venv od-venv
Step 3. Activate your virtual environment
source tfod/bin/activate # Linux .\od-venv\Scripts\activate # Windows
Step 4. Install dependencies and add virtual environment to the Python Kernel
python -m pip install --upgrade pip pip install ipykernel python -m ipykernel install --user --name=od-venv
Step 5. Collect images using the Notebook
1. Image Collection.ipynb - ensure you change the kernel to the virtual environment as shown below
Step 6. Manually divide collected images into two folders train and test. So now all folders and annotations should be split between the following two folders.
\ObjectDetect\Tensorflow\workspace\images\train
\ObjectDetect\Tensorflow\workspace\images\test
Step 7. Begin training process by opening 2. Training and Detection.ipynb, this notebook will walk you through installing Tensorflow Object Detection, making detections, saving and exporting your model.
Step 8. During this process the Notebook will install Tensorflow Object Detection. You should ideally receive a notification indicating that the API has installed successfully at Step 8 with the last line stating OK.
If not, resolve installation errors by referring to the Error Guide.md in this folder.![]()
Final Step: Once you get to step 6. Train the model, inside of the notebook, you may choose to train the model from cmd within the virtual enviroment for live loss metrics.
Optional Step: You can optionally evaluate your model inside of Tensorboard. Once the model has been trained and you have run the evaluation command under Step 7. Navigate to the evaluation folder for your trained model e.g.
cd Tensorlfow/workspace/models/my_ssd_mobnet/eval
and open Tensorboard with the following command
tensorboard --logdir=.
Tensorboard will be accessible through your browser and you will be able to see metrics including mAP - mean Average Precision, and Recall.