How would you like me to share it?
So far I have this:
tensorflow_object_detection_autoinstall.sh
Before running:
You need to set your venv
install numpyexport TF_DIR=$HOME/tensorflow mkdir $TF_DIR cd $TF_DIR echo
pwdwget
unzip protoc-3.14.0-linux-x86_64.zip -d protoc export PATH=$PATH:
pwd`/protoc/bin
git clone
cd models
git checkout 8a06433
cd $TF_DIR/models/research
protoc object_detection/protos/*.proto --python_out=.
git clone
cd cocoapi/PythonAPI
make
cp -r pycocotools/ $TF_DIR/models/research/
cd $TF_DIR/models/research
cp object_detection/packages/tf2/setup.py .
force tensorflow==2.2
sed -i "s/'tf-models-official'/'tf-models-official', 'tensorflow==2.2'/" setup.py
python -m pip install .
pip install numpy==1.20
finally fix bug in tensorflow array_ops file
file=python -c 'from tensorflow.python.ops import array_ops; print(array_ops.__file__)'
sed -i "s/np.prod/tf.math.reduce_prod/g" $file
sed -i 's/import numpy as np/import numpy as np; import tensorflow as tf/' $file
echo "Done" `