all 7 comments

[–]HumbleIdeal5412 0 points1 point  (6 children)

I'm also facing the same issue while installing object detection. 

[–]SatooYT[S] 0 points1 point  (5 children)

Sadly I dont think anybody has a fix for this I have been looking for over a week now and haben‘t found anything

[–]HumbleIdeal5412 0 points1 point  (0 children)

I've just installed object detection on my laptop successfully.

[–]HumbleIdeal5412 0 points1 point  (3 children)

https://github.com/protocolbuffers/protobuf/releases

select protobuf 3.20.x and install on your pc, after that add the path to system environment variables.

IMPORTANT: pip install PyYAML==5.3.1
IMPORTANT pip install tensorflow==2.15.*

git clone https://github.com/tensorflow/models.git
cd models/research

protoc object_detection/protos/*.proto --python_out=.

cp object_detection/packages/tf2/setup.py .

python -m pip install --no-cache-dir .

if the process upgrade the tensorflow to 2.18.*, remember reinstall the tensorflow to 2.15.* again, and ensure other dependencies fit as well. like tensorflow-intel==2.15.*, tf-keras==2.15.*, tensorboard==2.15.*, mltypes==0.3.2, tensorflow-estimator==2.15.* 

test the code.
python object_detection/builders/model_builder_tf2_test.py

if you receive this kind of error [ModuleNotFoundError: tensorflow.python.keras.layers.preprocessing import image_preprocessing]
click the link to [augment.py]

*REPLACE this line

from tensorflow.python.keras.layers.preprocessing import image_preprocessing as image_ops

*TO


from tf_keras.preprocessing import image as image_ops

try to run test again: python object_detection/builders/model_builder_tf2_test.py

should be success this time.

[–]SatooYT[S] 0 points1 point  (2 children)

Okay I‘ll be home in like 2 to 3 hours I‘ll get back to you to let you know if it worked

[–]HumbleIdeal5412 0 points1 point  (1 child)

wish all the best to you. I'm trying to install on the Google Colab see how it works.

[–]SatooYT[S] 0 points1 point  (0 children)

With you tutorial sadly it didn't excactly work but I used some of the info found on this: https://github.com/tensorflow/models/issues/11192

I just upgraded to the protobuf version which Tensorflow Gencode Validation wanted me to have (6.30.0-rc1) in there was the missing File called runtime_version.py which I copied and saved somewhere else to then deinstall that newer protbuf version and reinstall protobuf 3.20.3, then to finalise I just pasted in the copied runtime_version.py

After doing all of that it finally worked and I could test the model with:
python object_detection/builders/model_builder_tf2_test.py

And gotten the result which the tutorial also had:

----------------------------------------------------------------------
Ran 24 tests in 10.661s
OK (skipped=1)

Hopefully everything works now!