OlafenwaMoses / ImageAI

A python library built to empower developers to build applications and systems with self-contained Computer Vision capabilities
https://www.genxr.co/#products
MIT License
8.64k stars 2.19k forks source link

Is it possible to use Object Detection to sort a folder of images? #732

Open krivimp4 opened 2 years ago

krivimp4 commented 2 years ago

What I wish to do is use object detection to sort out all images from a folder that contain a person and put them in a separate folder. Is this possible with ImageAI, or does the algorithm work only to detect object in a single image and not a whole folder?

cdud99 commented 2 years ago

You can use a for loop and just iterate through a set of files by using something like os listdir() and using os to rename the file path to a new folder. You would just have to run classifyImage each time in the for loop as far as I know.