I am confused by the equations for bounding boxes I find online. Some articles say that

box_width = anchor_width * exp(residual_value_of_box_width))

and the coordinates have a sigmoid function.

Eg: https://www.kdnuggets.com/2018/05/implement-yolo-v3-object-detector-pytorch-part-1.html


enter image description here

But Darknet code and GitHub have equations dividing coordinates and box width with image width.

For example, https://github.com/AlexeyAB/darknet/blob/master/build/darknet/x64/data/voc/voc_label.py

def convert(size, box):
    dw = 1./size[0]
    dh = 1./size[1]
    x = (box[0] + box[1])/2.0
    y = (box[2] + box[3])/2.0
    w = box[1] - box[0]
    h = box[3] - box[2]
    x = x*dw
    w = w*dw
    y = y*dh
    h = h*dh
    return (x,y,w,h)

If the image width is used, then what is the use of anchor box width/height values in yolov3.cfg file? I can't find where it has been used in the source code other than generate the anchors file.



You must log in to answer this question.

Browse other questions tagged .