l.output data format [darknet]

l.output data format [darknet]

thanks to https://blog.csdn.net/qq_29381089/article/details/80298984

int yolo_num_detections(layer l, float thresh)
{
    int i, n;
    int count = 0;
    for (i = 0; i < l.w*l.h; ++i){
        for(n = 0; n < l.n; ++n){
            int obj_index  = entry_index(l, 0, n*l.w*l.h + i, 4);
            if(l.output[obj_index] > thresh){
                ++count;
            }
        }
    }
    return count;
}

i=0,n=0,obj_index=676

i=0,n=1,obj_index=1859

i=0,n=2,obj_index=3042


i=1,n=0,obj_index=677

i=1,n=1,obj_index=1860

i=1,n=2,obj_index=3043


i=2,n=0,obj_index=678

i=2,n=1,obj_index=1861

i=2,n=2,obj_index=3044


i=3,n=0,obj_index=679

i=3,n=1,obj_index=1862

i=3,n=2,obj_index=3045


i=4,n=0,obj_index=680

i=4,n=1,obj_index=1863

i=4,n=2,obj_index=3046


i=5,n=0,obj_index=681

i=5,n=1,obj_index=1864

i=5,n=2,obj_index=3047


so the arrange of l.output as follows(l.outputs:13x13x21(2 classes):

               box 1                                              box 2                                         box 3

    x  ;y ; w ; h ;obj ; c1 ;c2             x  ;  y ; w ; h ; obj ; c1 ;c2            x  ;  y ; w ; h ; obj ; c1 ;c2

13x13 ;13x13;13x13;13x13;13x13 13x13 ;13x13;13x13;13x13;13x13 13x13 ;13x13;13x13;13x13;13x13  


i am not sure if it correct, please correct me if something wrong. thanks

猜你喜欢

转载自blog.csdn.net/honk2012/article/details/80831461
今日推荐