1
$\begingroup$

Here's a tutorial about doing custom training of YOLO (Darknet): https://medium.com/@manivannan_data/how-to-train-yolov3-to-detect-custom-objects-ccbcafeb13d2

The tutorial guides how to set values in the .cfg files:

  • classes = Number of classes, OK
  • filters = (classes + 5) * 3

Why is it 'plus 5' then 'times 3'?

Some say it's (classes + coords + 1) * num, but I can't guess it out the meaning.

$\endgroup$
3
  • 1
    $\begingroup$ 3 boxes per feature map and for every box you predict class probabilities + width + height + x + y + object confidence. $\endgroup$
    – Brale
    Commented Feb 27, 2020 at 11:15
  • $\begingroup$ uhm, and what is that 'coords'? $\endgroup$
    – Dan D.
    Commented Feb 28, 2020 at 2:27
  • 1
    $\begingroup$ well its x, y, height and width $\endgroup$
    – Brale
    Commented Feb 28, 2020 at 8:57

1 Answer 1

1
$\begingroup$

As said by @brale in the comment below the question:

filters = (classes + 5) * 3
= (classes + width + height + x + y + confidence) * num
= (classes + 1+1+1+1+1) * num
= (classes + 5) * num

YOLOv3 dectects 3 boxes per grid cell, so it is:

filters = (classes + 5) * 3
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .