pip install tensorflow-gpu=1.4.0
sudo apt-get install protobuf-compiler
sudo pip install pillow
sudo pip install lxml
sudo pip install jupyter
sudo pip install matplotlib
export PYTHONPATH=$PYTHONPATH:pwd
:pwd
/slim
Go to root directory, get https://github.com/tensorflow/models/tree/master/research/object_detection as object_detection
Get labeled imgs datasets from Vatsal Srivastava and unzip to data/real_training_data
, data/sim_training_data
.
Get pretrained faster rcnn resnet101 model pretrained ssd v1 modeland unzip to data/
The training config file is data/config/faster_rcnn_resnet101_udacitycapstonejunior.config
Build tf record file
python data_conversion_udacity_sim.py --output_path data/sim_data.record
python data_conversion_udacity_real.py --output_path data/real_data.record
mkdir model_frozen_sim
mkdir model_frozen_real
Train:
python object_detection/train.py --pipeline_config_path=data/config/ssd_mobilenet_v1_coco_sim.config --train_dir=data/sim_training_data/ssd_model
Export:
python object_detection/export_inference_graph.py --pipeline_config_path=data/config/ssd_mobilenet_v1_coco_sim.config --trained_checkpoint_prefix=data/sim_training_data/ssd_model/model.ckpt-26529 --output_directory=model_frozen_sim/ssd/ --input_type image_tensor
Train:
python object_detection/train.py --pipeline_config_path=data/config/faster_rcnn_resnet101_udacitycapstonejunior.config --train_dir=data/sim_training_data/frcnn_model
Export:
python object_detection/export_inference_graph.py --pipeline_config_path=data/config/faster_rcnn_resnet101_udacitycapstonejunior.config --trained_checkpoint_prefix=data/sim_training_data/frcnn_model/model.ckpt-4379 --output_directory=model_frozen_sim/frcnn/ --input_type image_tensor