arsfutura / face-recognition

A framework for creating and using a Face Recognition system.
BSD 3-Clause "New" or "Revised" License
146 stars 49 forks source link

Update classifier.py #12

Closed gupta-keshav closed 4 years ago

gupta-keshav commented 4 years ago

this would allow it to classify all the images in a given directory, rather than selecting a single image each time

ldulcic commented 4 years ago

Hi @gupta-keshav! Thanks for the PR!

classifier.py is a helper script for visualising face recognition result on a single image. I thinks it's bad UX to process all images from directory because that's potentially a lot of images which will open a lot of windows for user. classifier.py was written to quickly check result on a single image, not a batch of images.

Could you please explain me your concrete use-case in more detail so I can get a better sense why you would need this change?

gupta-keshav commented 4 years ago

Hey @ldulcic , It is common to test on multiple images rather one image as it is not possible to estimate how well the model performs from just a single image, moreover if not renamed images names are usually quite long and it quickly becomes cumbersome to test multiple of them. Multiple Windows can be handled by just removing the previous window before displaying the current one. If classifier.py is intended for single images maybe It is possible to add classifier_batch.py for multiple images.

ldulcic commented 4 years ago

Hey @gupta-keshav, I think another script is a better solution. I just pushed util/tag_images.py script in develop branch. You can run it like this:

python -m util.tag_images --input-folder path/to/input --output-folder path/to/output

Does this cover your use case?

gupta-keshav commented 4 years ago

Yes, Thank You!