I want to crop and save images from all the dataset which contains multi classes. but there is no output. and thank you. 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: and if you want
Tag: crop
How do I crop an image based on custom mask
I start my model and get a mask prediction of the area I would like to crop. This code is the closest I have gotten to the desired image, the problem with this image that is provided is that it doesn’t crop out black background My desired image should be like this Answer You could try this:
Scale and crop an image in python PIL without exceeding the image dimensions
I am cropping an image using python PIL. Say my image is as such: This is the simple code snippet I use for cropping: The result of this is: I want to scale out this cropped image keeping the aspect ratio (proportionate width and height) same by say 20% to look something like this without exceeding the image dimensions. How