Darknet TXT
Folder structure
classes.yaml
images
train
image1.jpg
image2.jpg
image(N).jpg
valid
image3.jpg
image4.jpg
image(N+1).jpg
test
image5.jpg
image6.jpg
image(N+2).jpg
labels
train
image1.txt
image2.txt
image(N).txt
valid
image3.txt
image4.txt
image(N+1).txt
test
image5.txt
image6.txt
image(N+2).txt
The classes file
train: ./images/train/
valid: ./images/valid/
test: ./images/test/
# number of classes
nc: 4
# classes
names: ['eye', 'nose', 'mouth', 'face']
The label file
Each line represents a bounding box.
The bounding box line is composed of the following 5 numbers in order.
Class ID.
(Top left point X) / (Image width).
(Top left point Y) / (Image height).
(Box width) / (Image width).
(Box height) / (Image height).
einstein.jpg
0 0.479492 0.688771 0.955609 0.5955
0 0.736516 0.247188 0.498875 0.476417
1 0.637063 0.732938 0.494125 0.510583
2 0.339438 0.418896 0.678875 0.7815
3 0.646836 0.132552 0.118047 0.096937
Last updated
Was this helpful?