mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Minor fix
This commit is contained in:
@ -54,6 +54,7 @@ void free_layer(layer l)
|
||||
if (l.r_cpu) free(l.r_cpu);
|
||||
if (l.h_cpu) free(l.h_cpu);
|
||||
if (l.binary_input) free(l.binary_input);
|
||||
if (l.loss) free(l.loss);
|
||||
|
||||
#ifdef GPU
|
||||
if (l.indexes_gpu) cuda_free((float *)l.indexes_gpu);
|
||||
|
@ -374,7 +374,7 @@ int get_yolo_detections(layer l, int w, int h, int netw, int neth, float thresh,
|
||||
for(n = 0; n < l.n; ++n){
|
||||
int obj_index = entry_index(l, 0, n*l.w*l.h + i, 4);
|
||||
float objectness = predictions[obj_index];
|
||||
//if(objectness <= thresh) continue;
|
||||
//if(objectness <= thresh) continue; // incorrect behavior for Nan values
|
||||
if (objectness > thresh) {
|
||||
int box_index = entry_index(l, 0, n*l.w*l.h + i, 0);
|
||||
dets[count].bbox = get_yolo_box(predictions, l.biases, l.mask[n], box_index, col, row, l.w, l.h, netw, neth, l.w*l.h);
|
||||
|
Reference in New Issue
Block a user