Skip to content

Commit

Permalink
additional information about conversion from Darknet to TFRecords
Browse files Browse the repository at this point in the history
  • Loading branch information
monocongo committed Feb 10, 2020
1 parent b5f287d commit c609045
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,18 @@ $ cvdata_convert --in_format kitti --out_format tfrecord \
--tf_label_map /data/tfrecord/label_map.pbtxt \
--tf_shards 2
```

If converting a dataset with Darknet (YOLO) format annotations we need to also
specify the labels file corresponding to the class indices used in the first
column of the Darknet annotation files:
```bash
$ cvdata_convert --in_format darknet --out_format tfrecord \
--annotations_dir train/darknet \
--images_dir train/images \
--out_dir ../tfrecord/weapons-train \
--tf_label_map ../tfrecord/weapons_train_tfrecord_label_map.prototxt \
--tf_shards 12 \
--darknet_labels ../darknet_class_labels.txt
```
## Image format conversion
In order to convert all images in a directory from PNG to JPG we can use the script
`cvdata/convert.py` or the corresponding script entry point `cvdata_convert`. For
Expand Down

0 comments on commit c609045

Please sign in to comment.