This project is for training and leveraging your own custom object detection model using the Tensorflow Object Detection API and OpenCV. The main goal was practice with Tensorflow Object Detection API, so my model is very raw (because it has few input images), but you can create your own and train it well by adding more images.
After you create your venv install all packages from requirements.txt. You can do this by run next command
pip install -r TensorflowObjectDetection/requirements.txt
Step 1. Clone this repository: https://github.com/JohnorJohnny/TensorflowObjectDetection.git
Step 2. Create a new virtual environment
python -m venv tfod
Step 3. Activate your virtual environment
source tfod/bin/activate # Linux .\tfod\Scripts\activate # Windows
Step 4. Install dependencies and add virtual environment to the Python Kernel (don't foget about requirments!!!)
python -m pip install --upgrade pip pip install ipykernel python -m ipykernel install --user --name=tfodj
Step 5. Install Jupyter Notebook and run it
pip install jupyter jupyter notebook
Step 6. Run Original.ipynb If you want to test your image don't foget to add it to image_test and replace image_name in code
Step 1. Clone this repository: https://github.com/JohnorJohnny/TensorflowObjectDetection.git (if you don't do this yet)
Step 2. Create a new virtual environment
python -m venv tfod
Step 3. Activate your virtual environment
source tfod/bin/activate # Linux .\tfod\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=tfodj
Step 5. Install Jupyter Notebook and run it
pip install jupyter jupyter notebook
Step 6. Collect images (ensure you change the kernel to the virtual environment as shown below)
Step 7. Manually divide collected images into two folders train and test. So now all folders and annotations should be split between the following two folders.
\TFODCourse\Tensorflow\workspace\images\train
\TFODCourse\Tensorflow\workspace\images\test
Step 8. Setup all Path, download model from Tensorflow Model Zoo and install it. Then create a label map, update config and now you can train and evaluate your own model.
Note: 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.
Step 9. Finally you can test your model using other images or by your camera in real time