I have cloned the following tensorfow model garden github repo: https://github.com/tensorflow/models into my folder: tensorflow/models
for training my object detection model.
When I try to run the following code for installation on my windows machine:
# Install Tensorflow Object Detection
if os.name=='posix':
!apt-get install protobuf-compiler
!cd Tensorflow/models/research && protoc object_detection/protos/*.proto --python_out=. && cp object_detection/packages/tf2/setup.py . && python -m pip install .
if os.name=='nt':
url="https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-win64.zip"
wget.download(url)
!move protoc-3.15.6-win64.zip {paths['PROTOC_PATH']}
!cd {paths['PROTOC_PATH']} && tar -xf protoc-3.15.6-win64.zip
os.environ['PATH'] += os.pathsep + os.path.abspath(os.path.join(paths['PROTOC_PATH'], 'bin'))
!cd Tensorflow/models/research && protoc object_detection/protos/*.proto --python_out=. && copy object_detection\packages\tf2\setup.py setup.py && python setup.py build && python setup.py install
!cd Tensorflow/models/research/slim && pip install -e .
#'PROTOC_PATH':os.path.join('Tensorflow','protoc')
I am running into the following error:
error: [Errno 2] No such file or directory: 'build\bdist.win-amd64\egg\object_detection\models\__pycache__\faster_rcnn_inception_resnet_v2_keras_feature_extractor_tf2_test.cpython-39.pyc.1486168354032'
and subsequently:
File "C:UsersLenevo#Achintya#CodingProjectsTesting computer visionTFODCourseTensorflowmodelsresearchobject_detectionbuildersmodel_builder_tf2_test.py", line 24, in <module>
from object_detection.builders import model_builder
ModuleNotFoundError: No module named 'object_detection'
Is there any fix?
I am referring to the following youtube video: https://www.youtube.com/watch?v=yqkISICHH-U&t=2172s
And the github repo: https://github.com/nicknochnack/TFODCourse
The same occurs when I try to run the setup file in tensorflow/models/research
.