Skip to content

Commit

Permalink
Delete redundant files and dependencies of object detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Pooya Davoodi committed Oct 25, 2019
1 parent 7dd9161 commit 3373cea
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 160 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
@@ -1,6 +1,3 @@
[submodule "tftrt/examples/third_party/models"]
path = tftrt/examples/third_party/models
url = https://github.com/pooyadavoodi/models.git
[submodule "tftrt/examples/third_party/cocoapi"]
path = tftrt/examples/third_party/cocoapi
url = https://github.com/cocodataset/cocoapi.git
108 changes: 0 additions & 108 deletions tftrt/examples/object_detection/graph_utils.py

This file was deleted.

50 changes: 2 additions & 48 deletions tftrt/examples/object_detection/install_dependencies.sh
Expand Up @@ -16,57 +16,11 @@
# limitations under the License.
# =============================================================================

echo Setup local variables...
TF_MODELS_DIR=../third_party/models
RESEARCH_DIR=$TF_MODELS_DIR/research
SLIM_DIR=$RESEARCH_DIR/slim
COCO_API_DIR=../third_party/cocoapi
PYCOCO_DIR=$COCO_API_DIR/PythonAPI
PROTO_BASE_URL="https://github.com/google/protobuf/releases/download/v3.7.1/"
PROTOC_DIR=$PWD/protoc

#echo Install python-tk ...
#python -V 2>&1 | grep "Python 3" || \
# ( export DEBIAN_FRONTEND=noninteractive && \
# apt-get update && \
# apt-get install -y --no-install-recommends python-tk )

set -v

echo Download protobuf...
mkdir -p $PROTOC_DIR
pushd $PROTOC_DIR
ARCH=$(uname -m)
if [ "$ARCH" == "aarch64" ] ; then
filename="protoc-3.7.1-linux-aarch_64.zip"
elif [ "$ARCH" == "x86_64" ] ; then
filename="protoc-3.7.1-linux-x86_64.zip"
elif [ "$ARCH" == "ppc64le" ] ; then
filename="protoc-3.7.1-linux-ppcle_64.zip"
else
echo ERROR: $ARCH not supported.
exit 1;
fi
wget --no-check-certificate ${PROTO_BASE_URL}${filename}
unzip -o ${filename}
popd

echo Compile object detection protobuf files...
pushd $RESEARCH_DIR
$PROTOC_DIR/bin/protoc object_detection/protos/*.proto --python_out=.
popd

echo Install tensorflow/models/research...
pushd $RESEARCH_DIR
pip install .
popd

echo Install tensorflow/models/research/slim...
pushd $SLIM_DIR
pip install .
popd

echo Install cocodataset/cocoapi/PythonAPI...
COCO_API_DIR=../third_party/cocoapi
PYCOCO_DIR=$COCO_API_DIR/PythonAPI
pushd $PYCOCO_DIR
python setup.py build_ext --inplace
make
Expand Down
1 change: 0 additions & 1 deletion tftrt/examples/third_party/models
Submodule models deleted from 416bfd

0 comments on commit 3373cea

Please sign in to comment.