Thanks to visit codestin.com
Credit goes to github.com

Skip to content

list index out of range when attempting to use face_processing #47

@heaversm

Description

@heaversm

running the following:

python dataset_utils.py --input_src ./img/ --output_dir ./faces/ --save_mode split --action face --w 256 --h 256 --centered --face_crop 0.7 --target_face_image ./targetface.jpg

where ./img/ is a directory relative to the script that has jpgs of all images with faces, and ./faces/ is an empty folder on the drive, and ./targetface.jpg is a reference jpg. I get this error:

Traceback (most recent call last):
  File "dataset_utils.py", line 236, in <module>
    main(args)
  File "dataset_utils.py", line 134, in main
    target_encodings = get_encodings(target_face_image) if target_face_image else None
  File "/home/paperspace/Projects/ml4a-guides/utils/face_processing.py", line 23, in get_encodings
    target_encodings = face_recognition.face_encodings(target_face_img)[0]
IndexError: list index out of range

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions