Dmitry.AI

How did I run a TensorFlow training on the PASCAL VOC dataset in Windows 7?

computer-vision
object-detection
windows
pascal-voc
tensorboard
tensorflow-usage
tensorflow
tensorflow-object-detection
(Dmitry Fedyuk) #1

Step 1

I have downloaded the PASCAL VOC dataset (the VOCtrainval_11-May-2012.tar file).
Then I extracted the archive’s contents.

Step 2

Then I have generated TFRecord files:

python object_detection/dataset_tools/create_pascal_tf_record.py \
    --label_map_path=object_detection/data/pascal_label_map.pbtxt \
    --data_dir=C:/work/ai/sandboxes/2019-04-25/VOCdevkit --year=VOC2012 --set=train \
    --output_path=C:/work/ai/sandboxes/2019-04-25/pascal_train.record
python object_detection/dataset_tools/create_pascal_tf_record.py \
    --label_map_path=object_detection/data/pascal_label_map.pbtxt \
    --data_dir=C:/work/ai/sandboxes/2019-04-25/VOCdevkit --year=VOC2012 --set=val \
    --output_path=C:/work/ai/sandboxes/2019-04-25/pascal_val.record

github.com/tensorflow/models/blob/v1.13.0/research/object_detection/g3doc/preparing_inputs.md#generating-the-pascal-voc-tfrecord-files

Step 3

Then I have created a pipeline configuration file.
I have used the faster_rcnn_resnet101_voc07.config sample as a base, and modified some parts of it:

  1. I have removed the fine_tune_checkpoint and from_detection_checkpoint parameters.

  2. I have replaced the PATH_TO_BE_CONFIGURED placeholder with actual paths:

Step 4

Then I have run the training:

python object_detection/model_main.py \   
    --pipeline_config_path=C:/work/ai/sandboxes/2019-04-25/code/_my/faster_rcnn_resnet101_voc07.config \
    --model_dir=C:/work/ai/sandboxes/2019-04-25/model \
    --num_train_steps=50000 \
    --sample_1_of_n_eval_examples=1 \
    --alsologtostderr

Step 4.1

Also, I have run TensorBoard in parallel to monitor the training process.

tensorboard --logdir=C:/work/ai/sandboxes/2019-04-25/model
How did I run a TensorFlow training on the PASCAL VOC dataset in Ubuntu 18.04?
(Dmitry Fedyuk) #2

See also: How did I run a TensorFlow training on the PASCAL VOC dataset in Ubuntu 18.04?