shamangary / FSA-Net

[CVPR19] FSA-Net: Learning Fine-Grained Structure Aggregation for Head Pose Estimation from a Single Image
Apache License 2.0
607 stars 153 forks source link

Face bounding box is outside the input image #57

Open tsminh opened 4 years ago

tsminh commented 4 years ago

I met a problem that the bounding box laying outside of my input image (360x640).

Something like this.

https://i.imgur.com/Tdcu0bU.png

So when i run into this line

faces[i,:,:,:] = cv2.resize(input_img[yw1:yw2 + 1, xw1:xw2 + 1, :], (img_size, img_size))

it throws this error:

cv2.error: OpenCV(4.1.1) /io/opencv/modules/imgproc/src/resize.cpp:3720: error: (-215:Assertion failed) !ssize.empty() in function 'resize'

Is this a problem of res10_300x300_ssd_iter_140000 model ?

I also scale my input image larger (720x1280 for example) but it s still.