darknet icon indicating copy to clipboard operation
darknet copied to clipboard

ISSUE TRAINING MY OWN DETECTOR WITH YOLO-TINY AND DARKNET

Open chris2009 opened this issue 5 years ago • 13 comments

Hi,

I hava been trying to train an own detectro with yolo-tiny and darknet, but this error is showed: Can't open label file. (This can be normal only if you use MSCOCO): /home/multifisica-sujetar/Escritorio/DEEP_LEARNING/DETECTOR_PLACAS/YOLO-Annotation-Tool/Images/003/0fea3f70-51a7-481c-a250-96880d89a310_1_plate.txt

`root@multifisicasujetar-All-Series:~/Escritorio/DEEP_LEARNING/DETECTOR_PLACAS/darknet# ./darknet detector train detector_propio/obj.data detector_propio/tiny-yo lo.cfg darknet19_448.conv.23 tiny-yolo layer filters size input output 0 conv 16 3 x 3 / 1 416 x 416 x 3 -> 416 x 416 x 16 0.150 BF 1 max 2 x 2 / 2 416 x 416 x 16 -> 208 x 208 x 16 0.003 BF 2 conv 32 3 x 3 / 1 208 x 208 x 16 -> 208 x 208 x 32 0.399 BF 3 max 2 x 2 / 2 208 x 208 x 32 -> 104 x 104 x 32 0.001 BF 4 conv 64 3 x 3 / 1 104 x 104 x 32 -> 104 x 104 x 64 0.399 BF 5 max 2 x 2 / 2 104 x 104 x 64 -> 52 x 52 x 64 0.001 BF 6 conv 128 3 x 3 / 1 52 x 52 x 64 -> 52 x 52 x 128 0.399 BF 7 max 2 x 2 / 2 52 x 52 x 128 -> 26 x 26 x 128 0.000 BF 8 conv 256 3 x 3 / 1 26 x 26 x 128 -> 26 x 26 x 256 0.399 BF 9 max 2 x 2 / 2 26 x 26 x 256 -> 13 x 13 x 256 0.000 BF 10 conv 512 3 x 3 / 1 13 x 13 x 256 -> 13 x 13 x 512 0.399 BF 11 max 2 x 2 / 1 13 x 13 x 512 -> 13 x 13 x 512 0.000 BF 12 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF 13 conv 256 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 256 0.089 BF 14 conv 512 3 x 3 / 1 13 x 13 x 256 -> 13 x 13 x 512 0.399 BF 15 conv 18 1 x 1 / 1 13 x 13 x 512 -> 13 x 13 x 18 0.003 BF 16 yolo 17 route 13 18 conv 128 1 x 1 / 1 13 x 13 x 256 -> 13 x 13 x 128 0.011 BF 19 upsample 2x 13 x 13 x 128 -> 26 x 26 x 128 20 route 19 8 21 conv 256 3 x 3 / 1 26 x 26 x 384 -> 26 x 26 x 256 1.196 BF 22 conv 18 1 x 1 / 1 26 x 26 x 256 -> 26 x 26 x 18 0.006 BF 23 yolo Total BFLOPS 5.448 Loading weights from darknet19_448.conv.23... seen 32 Done!

Error: You set incorrect value batch=1 for Training! You should set batch=64 subdivision=64 Learning Rate: 0.001, Momentum: 0.9, Decay: 0.0005 Resizing 608 x 608 Can't open label file. (This can be normal only if you use MSCOCO): /home/multifisica-sujetar/Escritorio/DEEP_LEARNING/DETECTOR_PLACAS/YOLO-Annotation-Tool/Images/003/1dd02461-6b41-416c-b0cf-0dac4571740b_1_plate.txt Can't open label file. (This can be normal only if you use MSCOCO): /home/multifisica-sujetar/Escritorio/DEEP_LEARNING/DETECTOR_PLACAS/YOLO-Annotation-Tool/Images/003/1c028da3-78ed-4ae3-ae9b-747a35a53807_1_plate.txt Loaded: 0.017122 seconds Can't open label file. (This can be normal only if you use MSCOCO): /home/multifisica-sujetar/Escritorio/DEEP_LEARNING/DETECTOR_PLACAS/YOLO-Annotation-Tool/Images/003/0fea3f70-51a7-481c-a250-96880d89a310_1_plate.txt Region 16 Avg IOU: -nan, Class: -nan, Obj: -nan, No Obj: 0.500508, .5R: -nan, .75R: -nan, count: 0 Region 23 Avg IOU: -nan, Class: -nan, Obj: -nan, No Obj: 0.500988, .5R: -nan, .75R: -nan, count: 0

1: 679.296143, 679.296143 avg loss, 0.000000 rate, 5.209449 seconds, 1 images Loaded: 0.000054 seconds Can't open label file. (This can be normal only if you use MSCOCO): /home/multifisica-sujetar/Escritorio/DEEP_LEARNING/DETECTOR_PLACAS/YOLO-Annotation-Tool/Images/003/0f3e81a8-d3b7-4591-9077-7e5c7b9c9b8d_1.txt Region 16 Avg IOU: -nan, Class: -nan, Obj: -nan, No Obj: 0.500507, .5R: -nan, .75R: -nan, count: 0 Region 23 Avg IOU: -nan, Class: -nan, Obj: -nan, No Obj: 0.500985, .5R: -nan, .75R: -nan, count: 0

2: 679.293274, 679.295837 avg loss, 0.000000 rate, 5.127315 seconds, 2 images Loaded: 0.000047 seconds Can't open label file. (This can be normal only if you use MSCOCO): /home/multifisica-sujetar/Escritorio/DEEP_LEARNING/DETECTOR_PLACAS/YOLO-Annotation-Tool/Images/003/1a378e6a-89d2-4fe2-919a-ddddd7afd583_2.txt Region 16 Avg IOU: -nan, Class: -nan, Obj: -nan, No Obj: 0.500507, .5R: -nan, .75R: -nan, count: 0 Region 23 Avg IOU: -nan, Class: -nan, Obj: -nan, No Obj: 0.500988, .5R: -nan, .75R: -nan, count: 0`

Please, help me with this issue

chris2009 avatar Apr 23 '19 22:04 chris2009

I got the same error but it works if i give the training command again. Have anyone found the reason for the issue. I have also checked for the file name in train.txt but it don't exist there.

cvramanan avatar Jun 07 '19 15:06 cvramanan

I got the same error..anyone can help

fareed05 avatar Apr 02 '20 04:04 fareed05

getting the same error anyone can help?

Gujar-Shubham avatar Aug 06 '20 04:08 Gujar-Shubham

hello chris2009.....Did you get the solution for the above issue..... I too got the same error while training the darknet yolov4

harika516 avatar Nov 02 '20 21:11 harika516

Please help any one.

harika516 avatar Nov 02 '20 21:11 harika516

same problem, can anyone help

shawntai avatar Jan 24 '21 08:01 shawntai

@shawntai hi hope you will fine for training purpose, you should first make an annotation file for each image, for annotation use lableImg module in python

thanks, regard @Ghulam Fareed

fareed05 avatar Jan 25 '21 08:01 fareed05

Error: You set incorrect value batch=1 for Training! You should set batch=64 subdivision=64

Same error. Any solution 🙂

anwarhossain4 avatar Nov 03 '21 04:11 anwarhossain4

Error: You set incorrect value batch=1 for Training! You should set batch=64 subdivision=64

Same error. Any solution 🙂

for training, purposes change the batch size multiple of 8,16,32,64 in the configuration file

fareed05 avatar Nov 06 '21 07:11 fareed05

Hello. Can help me to detect ambulance object?

On Sat, 6 Nov 2021, 1:07 pm fareed05, @.***> wrote:

Error: You set incorrect value batch=1 for Training! You should set batch=64 subdivision=64

Same error. Any solution 🙂

for training, purposes change the batch size multiple of 8,16,32,64 in the configuration file

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pjreddie/darknet/issues/1572#issuecomment-962409676, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUVT6JC2OMK5JVOUZ3KBDL3UKTH45ANCNFSM4HH6ZIQQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

anwarhossain4 avatar Nov 06 '21 11:11 anwarhossain4

i got same error anyone help

meron308 avatar Jun 09 '22 16:06 meron308

if you are training, in your cfg file, you should comment batch=1 under testing

saeedbbm avatar Jun 30 '22 21:06 saeedbbm

Even I have faced the same issue. I think !./darknet detector map data/obj.data cfg/yolov4-tiny-custom.cfg............................. wont work during testing the images. I have worked on custom Dataset. I have finished the training and saved the weights. Then used this weights for detection on batch of images. In some of the outputs, detector has failed to detect the object eventhough object exists and remaining images it has detected well.

How to evaluate the performance of the model based on batch of test images? can we get confusion matrix for batch of test images?

DikshitV avatar Aug 06 '22 15:08 DikshitV