AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.75k stars 7.96k forks source link

training yolov3 with single class #1759

Open Shanthika opened 6 years ago

Shanthika commented 6 years ago

Hello,

I was trying to train yolov3 with a single class and got this error:

parse_yolo: Assertion `l.outputs == params.inputs’ failed.

I searched and found out that it is due to wrong filter value. I have given the filter value as 18(because its for a single class) and it's not showing error at line 603 but at 699 and 776.

Please tell me what value I'm supposed to enter at those lines.

AlexeyAB commented 6 years ago

@Shanthika Hi,

Show screenshot of output with this error.

Shanthika commented 6 years ago

Here's the link to the screenshot

https://drive.google.com/open?id=16uThRxweTm4QY0S3xNk0UxS0A0VaBjoa

AlexeyAB commented 6 years ago

You google-drive requires permission. Better drag-n-drop your image here to your message, or press selecting them.

Shanthika commented 6 years ago

Here's the link with permission: https://drive.google.com/open?id=16uThRxweTm4QY0S3xNk0UxS0A0VaBjoa

Also attachment: screenshot from 2018-10-14 18-16-36 1

AlexeyAB commented 6 years ago

@Shanthika

Rename your cfg-file to the yolov3-obj.txt and drag-n-drop to your message.

Check that parameter classes=1 for each of 3 [yolo] layers in your cfg-file.

Shanthika commented 6 years ago

Okay, I checked the classes value. I had skipped changing the value of class at line 696. I corrected it and it is working now. Thank you for your help.

I had a question though. We are working on detection of objects in 360degree videos and intend to use yolov3 to detect objects in equirectangular images. So, is it possible to train few of the classes with new images and keeping the other classes intact?

AlexeyAB commented 6 years ago

So, is it possible to train few of the classes with new images and keeping the other classes intact?

You should train from the begining, if you changed the number of classes.

Shanthika commented 6 years ago

Okay, thank you for your time.

kalikhademi commented 3 years ago

I had the same error and I checked that all classes =1 . I have dropped my yolo_obj as txt file. I still have this error. Can someone help me plz!

yolo_obj.txt