Preparing Training Dataset - 2.0 English

Vitis AI Optimizer User Guide (UG1333)

Document ID
UG1333
Release Date
2022-01-20
Version
2.0 English

Finetuning with the original training dataset is required to get a satisfactory pruning result. Refer to the Yolo page for how to prepare datasets for darknet. Taking Pascal VOC Dataset as an example, find or create a data cfg file "voc.data" such as the following.

classes= 20
train  = /dataset/voc/train.txt
valid  = /dataset/voc/2007_test.txt
names = data/voc.names
backup = backup

The "train" text file specifies the training images.

/dataset/voc/VOCdevkit/VOC2007/JPEGImages/000012.jpg
/dataset/voc/VOCdevkit/VOC2007/JPEGImages/000017.jpg
/dataset/voc/VOCdevkit/VOC2007/JPEGImages/000023.jpg
...

At the same time, label files should be located in corespoonding "labels" folder. The directory hierarchy looks like this.

/dataset/voc/VOCdevkit/VOC2007/
    |-- JPEGImages/
    |    |-- 000001.jpg
    |    |-- 000002.jpg
    |    |-- ...
    |-- labels
    |    |-- 000001.txt
    |    |-- 000002.txt
    |    |-- ...
    |-- ...