Download and install Visuall Studio and check Desktop Development with C++.
Download and install Git.
Open Command Propt with Administrator with python > 3.5 (I used version 3.7) and tensorflow=2.4.1
pip install -r requirements.txt
COCOAPI
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
with Object Detection API with TensorFlow 2
-
git clone https://github.com/tensorflow/models.git
in Tensorflow folder and cd models
.
-
-
Head to the protoc releases page
-
Download last release (e.g protoc-3.17.0-win64.zip) in the TF2_ObjDetect_API Folder.
-
Extract file here in the TF2_ObjDetect_API Folder and then rename Google Protobuf
-
Add path directory Google Protobuf to your
Path
environment variable.note: The path will be set temporarily, to make the change permanent you have to set it in the
“Advanced system settings” → “Environment Variables”
tab. Restart The Cmd or PowerShell window for changes to take effect.
-
Open new command propt, and cd into TF2_ObjDetect_API/models/research/ directory and run the following command:
protoc object_detection/protos/*.proto --python_out=.`
-
-
Copy TF2_ObjDetect_API\models\research\object_detection\packages\tf2\setup.py into TF2_ObjDetect_API\models\research
We choose one of two ways. (I used 4.2)
-
4.1 run the following command from within TF2_ObjDetect_API\models\research:
python setup.py built python setup.py install
-
4.2 run the following command from within TF2_ObjDetect_API\models\research:
python -m pip install .
-
-
-
run the following command from within TF2_ObjDetect_API\models\research:
python object_detection/builders/model_builder_tf2_test.py
-
If the result is as shown in the image below, then you are successful.
-