There is no assertion for len(img_files)==len(lm_files). If unsatisfied ( len(lm_files)<len(img_files), i.e. the face reconstruction backbone could not find landmarks for all given images ) this will eventually cause a hazard in the loop beginning on line 36, causing a continuous mismatch between images and their landmark files:
There is no assertion for
len(img_files)==len(lm_files)
. If unsatisfied (len(lm_files)<len(img_files)
, i.e. the face reconstruction backbone could not find landmarks for all given images ) this will eventually cause a hazard in the loop beginning on line 36, causing a continuous mismatch between images and their landmark files:https://github.com/NVlabs/eg3d/blob/7cf1fd1e99e1061e8b6ba850f91c94fe56e7afe4/dataset_preprocessing/ffhq/crop_images_in_the_wild.py#L26-L38