Darknet: Classification Training

Created on 26 Sep 2018  路  7Comments  路  Source: AlexeyAB/darknet

I am currently experimenting on training a classifier in darknet, and am confused on exactly what format the test, train, images and list files should be in. How exactly does this work?

question

All 7 comments

If you use the Yolo_Mark program to generate the lists, you should be good with the train.txt file. It will create the right format. It's just a list of the images, one per line. The images are typically jpgs or pngs. It may take other formats. What are you using? I haven't bothered with the test file myself, so I don't know.

I've used Yolo_Mark before, but it is for the yolo object detection bounding boxes. Object classification with darknet is a bit different as there is only one object per image and it does not predict object location. I can't really seem to get that working unfortunately and the documentation on the pjreddie site isn't very clear either.

Oh sorry, I misunderstood. I have only used darknet for object detection. I can't help with classification.

i want to know our pictures must keep a specific size?

So I've still been trying to get this to work using the cifar set from https://pjreddie.com/darknet/train-cifar/, but it hasn't been working. I'm trying to start training using first 24 layers of extraction network with cfg modified to have 10 classes. I've added some debug lines in the code to print out the filepath and label that the network is loading and it appears to be fine, however the loss values, avg loss, etc. all show as nan and the network does not appear to train.
capture
Could you please help?

I have a template for training classifier using darknet19_448 cfg.
https://github.com/jing-vision/lightnet/tree/master/__template-darknet19_448

@liaoluke try to update your repo, this issue has been fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Greta-A picture Greta-A  路  3Comments

HanSeYeong picture HanSeYeong  路  3Comments

PROGRAMMINGENGINEER-NIKI picture PROGRAMMINGENGINEER-NIKI  路  3Comments

jasleen137 picture jasleen137  路  3Comments

louisondumont picture louisondumont  路  3Comments