Skip to content
Advertisement

save the cropped bounding box

I want to crop and save images from all the dataset which contains multi classes. but there is no output. and thank you.

JavaScript

Advertisement

Answer

Assuming everything else are correct (since I don’t have your dataset and detector code), you may want to try to correct couple indentations to see if you can get some different results:

JavaScript

and if you want to save every detection, correct the cv2.imwrite indentation as well. Since you have two sub folders under the dataset, then you need to change glob statement as shown below to visit all sub folders:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement