sgmath12 / efficient-decision-based-black-box-adversarial-attacks-on-face-recognition

29 stars 5 forks source link

generate_adv has an error (warpAffine error) #2

Closed cod3r0k closed 2 years ago

cod3r0k commented 2 years ago

Hi, I want to test your work as below: python generate_adv.py data/lfw/Leon_Silver/Leon_Silver_0001.jpg and the error below has occurred. What should I do now?

  File "generate_adv.py", line 26, in alignment
    face_img = cv2.warpAffine(src_img, tfm, crop_size)
cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/imgwarp.cpp:2595: error: (-215:Assertion failed) src.cols > 0 && src.rows > 0 in function 'warpAffine'
sgmath12 commented 2 years ago

According to the error message, please refer to https://stackoverflow.com/questions/17132018/cvexception-warpaffine-rotate-frames.

I think you should check your file first.