Closed hiteshhedwig closed 2 years ago
i think you could use any number of classes, in my own case 6xx classes is ok.
Thanks! and in that case, do i need to change yolo_p6.cfg file?
https://github.com/WongKinYiu/yolor/blob/main/cfg/yolor_p6.cfg#L1569 https://github.com/WongKinYiu/yolor/blob/main/cfg/yolor_p6.cfg#L1573 https://github.com/WongKinYiu/yolor/blob/main/cfg/yolor_p6.cfg#L1577 https://github.com/WongKinYiu/yolor/blob/main/cfg/yolor_p6.cfg#L1581 https://github.com/WongKinYiu/yolor/blob/main/cfg/yolor_p6.cfg#L1605 https://github.com/WongKinYiu/yolor/blob/main/cfg/yolor_p6.cfg#L1649 https://github.com/WongKinYiu/yolor/blob/main/cfg/yolor_p6.cfg#L1693 https://github.com/WongKinYiu/yolor/blob/main/cfg/yolor_p6.cfg#L1737
change these lines to anchor * (5 + classes), default is 3 * (5 + 80) = 255. and also check classes and anchor in all yolo layers.
Thanks!
so for one class we should replace filters=255 with filters=18 in the lines mentioned above? 18 is because 3*(5+1)
And about the anchors that have to be modified for only one class? anchors = 19,27, 44,40, 38,94, 96,68, 86,152, 180,137, 140,301, 303,264, 238,542, 436,615, 739,380, 925,792
change these lines to anchor (5 + classes), default is 3 (5 + 80) = 255. and also check classes and anchor in all yolo layers.
Yes, you must also change to classes=1
found in three places in yolor_p6.cfg (assuming you have a single class).
Do you have any guidance on the anchors ?
What is the maximum number of classes that can be trained with YOLOR? if i have imagenet object localisation 1000 classes dataset. Would it be able to train those ?