Home > Mobile >  How to Auto delete a image file that does not detect the face while running in the cmd - FER (python
How to Auto delete a image file that does not detect the face while running in the cmd - FER (python

Time:04-23

I was test running an deep learning algorithm (FER) and running 4,000 images and the speed is very slow and when it cant recognise an image in the command prompt it will stop running and I have to delete the image re-run the command prompt again. Is there a solution to auto delete a image in the command prompt if it cant recognise the facial expression image?

CodePudding user response:

  results = k.detect_(image)
        stop = timeit.default_timer()
        if results == []:
            os.remove(content_image_path)
            print("This file is deleted:",content_image_path)
        else:

//use the if statement and below

  • Related