mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Letter box is disabled in the darknet.py by defualt
This commit is contained in:
@ -235,7 +235,7 @@ def detect(net, meta, image, thresh=.5, hier_thresh=.5, nms=.45, debug= False):
|
||||
if debug: print("Assigned pnum")
|
||||
predict_image(net, im)
|
||||
if debug: print("did prediction")
|
||||
dets = get_network_boxes(net, im.w, im.h, thresh, hier_thresh, None, 0, pnum, 1)
|
||||
dets = get_network_boxes(net, im.w, im.h, thresh, hier_thresh, None, 0, pnum, 0)
|
||||
if debug: print("Got dets")
|
||||
num = pnum[0]
|
||||
if debug: print("got zeroth index of pnum")
|
||||
|
@ -235,7 +235,7 @@ def detect(net, meta, image, thresh=.5, hier_thresh=.5, nms=.45, debug= False):
|
||||
if debug: print("Assigned pnum")
|
||||
predict_image(net, im)
|
||||
if debug: print("did prediction")
|
||||
dets = get_network_boxes(net, im.w, im.h, thresh, hier_thresh, None, 0, pnum, 1)
|
||||
dets = get_network_boxes(net, im.w, im.h, thresh, hier_thresh, None, 0, pnum, 0)
|
||||
if debug: print("Got dets")
|
||||
num = pnum[0]
|
||||
if debug: print("got zeroth index of pnum")
|
||||
|
@ -30,7 +30,7 @@ image crop_image(image im, int dx, int dy, int w, int h);
|
||||
image random_crop_image(image im, int w, int h);
|
||||
image random_augment_image(image im, float angle, float aspect, int low, int high, int size);
|
||||
void random_distort_image(image im, float hue, float saturation, float exposure);
|
||||
image resize_image(image im, int w, int h);
|
||||
YOLODLL_API image resize_image(image im, int w, int h);
|
||||
void fill_image(image m, float s);
|
||||
void letterbox_image_into(image im, int w, int h, image boxed);
|
||||
YOLODLL_API image letterbox_image(image im, int w, int h);
|
||||
|
@ -640,7 +640,8 @@ void free_detections(detection *dets, int n)
|
||||
|
||||
float *network_predict_image(network *net, image im)
|
||||
{
|
||||
image imr = letterbox_image(im, net->w, net->h);
|
||||
//image imr = letterbox_image(im, net->w, net->h);
|
||||
image imr = resize_image(im, net->w, net->h);
|
||||
set_batch_network(net, 1);
|
||||
float *p = network_predict(*net, imr.data);
|
||||
free_image(imr);
|
||||
|
Reference in New Issue
Block a user