You have to make a small correction in the âmodels/research/object_detection/packages/tf2/setup.pyââŚ
âââSetup script for object_detection with TF2.0.âââ
import os
from setuptools import find_packages
from setuptools import setup
REQUIRED_PACKAGES = [
# Required for apache-beam with PY3
âavro-python3â,
âapache-beamâ,
âpillowâ,
âlxmlâ,
âmatplotlibâ,
âCythonâ,
âcontextlib2â,
âtf-slimâ,
âsixâ,
âpycocotoolsâ,
âlvisâ,
âscipyâ,
âpandasâ,
âtf-models-official>=2.5.1â,
âtensorflow_ioâ,
âkerasâ
]
setup(
name=âobject_detectionâ,
version=â0.1â,
install_requires=REQUIRED_PACKAGES,
include_package_data=True,
packages=(
[p for p in find_packages() if p.startswith(âobject_detectionâ)] +
find_packages(where=os.path.join(â.â, âslimâ))),
package_dir={
âdatasetsâ: os.path.join(âslimâ, âdatasetsâ),
ânetsâ: os.path.join(âslimâ, ânetsâ),
âpreprocessingâ: os.path.join(âslimâ, âpreprocessingâ),
âdeploymentâ: os.path.join(âslimâ, âdeploymentâ),
âscriptsâ: os.path.join(âslimâ, âscriptsâ),
},
description=âTensorflow Object Detection Libraryâ,
python_requires=â>3.6â,
)
Line-No:21 âtf-models-official>=2.5.1â,
change is to the tf version which you have already installedâŚ
If your tf version installed is 2.9.1, then this line has to be changed as below.,
âtf-models-official==2.9.1â
This will ensure, while the code runs to install the OD API, it does not replace the tf-version already installedâŚ
RegardsâŚKannan Rama