I make dataset with about 200 photos. 40% of them dont have faces on this photos (nature pictures).
I enter this command
face_recognition --show-distance true ./pictures_of_people_i_know/ ./unknown_pictures/
And script give me lot of warnings from "/pictures_of_people_i_know/" folder like
WARNING: No faces found in ./pictures_of_people_i_know/*. Ignoring file.
WARNING: No faces found in ./pictures_of_people_i_know/. Ignoring file.
WARNING: No faces found in ./pictures_of_people_i_know/*. Ignoring file.
So I need function to delete this photos from my folder, not just warning, I NEED DELETE THEM
How can I get this ?
I also try to add some code in face_recognition_cli.py
if len(encodings) == 0:
click.echo("WARNING: No faces found in {}. Ignoring file.".format(file))
os.remove(file)
This seems works well
Most helpful comment
I also try to add some code in face_recognition_cli.py
if len(encodings) == 0:
click.echo("WARNING: No faces found in {}. Ignoring file.".format(file))
os.remove(file)
This seems works well