[db7631]: / Object-Detection / obj_det_train_py.sh

Download this file

42 lines (28 with data), 902 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
echo ">>>> "on machine: $(hostnamectl)
# === for models to work ===
# echo ">>>> "activate protoc and export PYTHONPATH
cd ./research/
pwd
# From tensorflow/models/research/
# protoc object_detection/protos/*.proto --python_out=.
# From tensorflow/models/research/
# export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
echo ">>>> "$PYTHONPATH
# then cd to obj-det folder
echo ">>>> "cd to obj-det folder
cd ./object_detection/
pwd
echo first clean up training dir
rm training/pipeline.config
rm training/checkpoint
rm training/model.ckpt*
rm training/graph.pbtxt
rm training/events.out.*
echo ">>>> "run the python script for train obj-det model
# Resnet
PRE_TRAINED_MODEL_CONFIG="faster_rcnn_resnet101_coco_baseON_2018_07_13_sag.config"
python3 legacy/train.py \
--logtostderr \
--train_dir=training/ \
--pipeline_config_path=$PRE_TRAINED_MODEL_CONFIG