Remember, in your *.data file, you have the following settings:
classes = [Your number of classes]
train = data/train.txt
valid = data/test.txt
names = data/obj.names
backup = backup/
You should have data/train.txt
and data/test.txt
, which is a text file containining the directory list of your images.
For example, if you put all of your images and txt files at data/obj, the txt file should contain:
data/obj/1.jpg
data/obj/2.jpg
.
.
(and so on)
Then, YOLO will automatically check the corresponding label of the images, which should be having the same name (in this case: 1.txt, 2.txt, ...)
Reference:
(No. 3 and 4 in https://github.com/AlexeyAB/darknet#how-to-train-to-detect-your-custom-objects)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…