AniPortrait icon indicating copy to clipboard operation
AniPortrait copied to clipboard

A small bug when preprocessing the VFHQ dataset

Open lxycopper opened this issue 9 months ago • 1 comments

Good work and congratulations!

I came across a small bug when I preprocess the VFHQ dataset with the scripts scripts/preprocess_dataset.py. It is about reading files:

ibpng error: Read Error
cv2.error: OpenCV(4.8.1) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed...

That's because there is an image in the VFHQ dataset which has a transparent part. image The image's location is at "VFHQ_dataset/Clip+8jwB6QSzjy4+P0+C1+F17517-17845/00000184.png" simply removing this image or adding a judgement sentence at line100-line101 in scripts/preprocess_dataset.py can fix this issue.

if img is None:
    continue

Hope this can help someone.

lxycopper avatar Apr 29 '24 09:04 lxycopper

Oh yes, excluding the invalid images is crucial. Thank you so much!

Zejun-Yang avatar May 06 '24 07:05 Zejun-Yang