crop_image() always returns a deep copy, it's safe to call free_image() on it

Signed-off-by: Juuso Alasuutari <juuso.alasuutari@gmail.com>
This commit is contained in:
Juuso Alasuutari 2020-06-12 00:05:02 +03:00
parent 70f6231d3d
commit 0bf989c2cf
1 changed files with 1 additions and 1 deletions

View File

@ -862,7 +862,7 @@ void predict_classifier(char *datacfg, char *cfgfile, char *weightfile, char *fi
if(net.hierarchy) printf("%d, %s: %f, parent: %s \n",index, names[index], predictions[index], (net.hierarchy->parent[index] >= 0) ? names[net.hierarchy->parent[index]] : "Root");
else printf("%s: %f\n",names[index], predictions[index]);
}
if(r.data != im.data) free_image(r);
free_image(r);
free_image(im);
free_image(resized);
if (filename) break;