Joseph Redmon
2015-05-04 372980d690f84aade1ebfd1a92750ed327ab1c8d
src/data.c
@@ -166,8 +166,10 @@
        w = constrain(0, 1, w);
        h = constrain(0, 1, h);
        if (w == 0 || h == 0) continue;
        w = sqrt(w);
        h = sqrt(h);
        if(1){
            w = sqrt(w);
            h = sqrt(h);
        }
        int index = (i+j*num_boxes)*(4+classes+background);
        if(truth[index+classes+background+2]) continue;
@@ -316,13 +318,13 @@
        float sx = (float)swidth  / ow;
        float sy = (float)sheight / oh;
        /*
        float angle = rand_uniform()*.1 - .05;
        image rot = rotate_image(orig, angle);
        free_image(orig);
        orig = rot;
        */
           float angle = rand_uniform()*.1 - .05;
           image rot = rotate_image(orig, angle);
           free_image(orig);
           orig = rot;
         */
        int flip = rand_r(&data_seed)%2;
        image cropped = crop_image(orig, pleft, ptop, swidth, sheight);