Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tensorflow Object Detection API no train.py file

I've correctly installed Tensorflow Object Detection API according to the provided documentation. However, when I need to train my network there is no train.py file in the research/object_detection directory. Is there anything I can do to fix this?

Link: https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/installation.md

like image 830
Giacomo Bartoli Avatar asked Jul 18 '18 14:07

Giacomo Bartoli


3 Answers

You should refer to Running locally section on the tutorial page.

Here is the sample configuration:

#From the tensorflow/models/research/ directory
PIPELINE_CONFIG_PATH={path to pipeline config file}
MODEL_DIR={path to model directory}
NUM_TRAIN_STEPS=50000
NUM_EVAL_STEPS=2000
python object_detection/model_main.py \
    --pipeline_config_path=${PIPELINE_CONFIG_PATH} \
    --model_dir=${MODEL_DIR} \
    --num_train_steps=${NUM_TRAIN_STEPS} \
    --num_eval_steps=${NUM_EVAL_STEPS} \
    --alsologtostderr 

and to run tensorboard:

tensorboard --logdir=${MODEL_DIR}
like image 146
g_p Avatar answered Oct 24 '22 00:10

g_p


in the newest merge the train and eval moved to legacy dir. You can go to a previous version if you work with a tutorial.

like image 37
Alexandros Evangelou Avatar answered Oct 24 '22 00:10

Alexandros Evangelou


For some clarification, as aforementioned by Derek Chow, it seems the train and evaluation python scripts were recently (~6 days ago) moved into the 'legacy' directory. Assuming you wanted to continue using the old way..

If one was beginning training by calling:

python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_pets.config

One would know begin training by calling:

python legacy/train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_pets.config
like image 8
DSmith Avatar answered Oct 23 '22 23:10

DSmith