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
1. 按照自己的设置路径进行训练,参考链接
https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/running_locally.md
2. 最新版的models的代码中,已经把旧版本的train.py移到object_detection/legacy路径下,object_detection下的model_main.py代替了它的功能,不过model_main.py中没有tf.logging.set_verbosity(tf.logging.INFO)这句,导致训练的时候不打印训练信息,只要加上这句代码就行看到打印信息了(坑了我好久的)