djmv/MobilNet_SSD_opencv

How can I start MobilNetSSD, How to Train?

Closed this issue · 1 comments

I am impressed with your work. I want to start to make another mobilnet SSD. So, how can I improve better than you?

Hi, the short answer will be: there are a lot of tutorials of how to train SSD mobilnet using the Object Detection API of TensorFlow.

But if you want to try it quickly, you can follow these steps:

  1. Clone the tensorflow/model repository @ anywhere you want.

  2. Follow this instructions: https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/installation.md

2.1) Add to ~./bashrc:

export PYTHONPATH=${PYTHONPATH}:/PATH_TO/tensorflow/models/research:/PATH_TO/tensorflow/models/research/slim 
  1. Download the checkpoint of a pretrained model (SSD, Mobilnet-SSD, FastRCNN...) here.

  2. Replace PATH_TO_BE_CONFIGURED and number of classes at the model.config file.


  1. Train!
#@/PATH_TO/tensorflow/models/research/
TRAIN_DIR=/PATH_TO_YOUR_TRAIN_FOLDER/ # for example: /home/username/Documents/project/train/
EVAL_DIR=/PATH_TO_YOUR_EVALUATION_FOLDER/
DETECT_DIR=PATH_TO_YOUR_DETECTION_FOLDER/output_inference_graph.pb
PIPELINE_CONFIG_PATH=/PATH_TO_YOUR_CONFIG_FILE/the_name.config

python3 object_detection/train.py --logtostderr \
    --pipeline_config_path=$PIPELINE_CONFIG_PATH \
    --train_dir=$TRAIN_DIR

5.1) Watch the training process

tensorboard --logdir=$TRAIN_DIR

References