FCHD-Fully-Convolutional-Head-Detector icon indicating copy to clipboard operation
FCHD-Fully-Convolutional-Head-Detector copied to clipboard

Bounding Boxes displacement error

Open pecia6 opened this issue 6 years ago • 16 comments

I have run "head_detection_demo.py" and I haven't received good results. The bounding boxes seem correct but there is a kind of displacement respect to ground truth.

prova2

pecia6 avatar Nov 21 '18 14:11 pecia6

I got the same problem as the above picture, and got some errors about urllib3. Can you tell me if you solve this problem now?

SmartGx avatar Nov 24 '18 02:11 SmartGx

change line 57 to utils.draw_bounding_box_on_image_array(img_raw, ymin/scale, xmin/scale, ymax/scale, xmax/scale)

okideal avatar Dec 29 '18 05:12 okideal

change line 57 to utils.draw_bounding_box_on_image_array(img_raw, ymin/scale, xmin/scale, ymax/scale, xmax/scale)

also need to place ‘_, H, W = img.shape’ after ‘img = img.transpose((2,0,1))’

dagongji10 avatar Dec 29 '18 05:12 dagongji10

This work is great but the code is absolutely disaster

okideal avatar Dec 29 '18 06:12 okideal

Hi Guys, I am sorry you are facing these issue of displacement error. However, I didn't face any such issue when I tested the model on this dataset. However, I need to debug the code once. Give me some time I will rectify the error and get back soon.

aditya-vora avatar Dec 29 '18 06:12 aditya-vora

And also the problem that was pointed out by

I got the same problem as the above picture, and got some errors about urllib3. Can you tell me if you solve this problem now?

I think you shouldn't use torchnet module in test phase since. It's better to clearly seperate the code in train part and test part.

okideal avatar Dec 29 '18 06:12 okideal

Hi Guys, I am sorry you are facing these issue of displacement error. However, I didn't face any such issue when I tested the model on this dataset. However, I need to debug the code once. Give me some time I will rectify the error and get back soon.

hei, brother, you really did a great work. I can run the test-demo now and get a nice result. Thanks for your work very much.

dagongji10 avatar Dec 29 '18 06:12 dagongji10

@dagongji10 Glad that you liked the work. May I know what changes you made in order to make it work?

aditya-vora avatar Dec 29 '18 06:12 aditya-vora

@dagongji10 Glad that you liked the work. May I know what changes you made in order to make it work?

I think maybe the code ‘, H, W = img.shape’ should after ‘img = img.transpose((2,0,1))’, so we can get the right H and scale. The box predict is very accurate,but when draw it on img_raw , maybe we can change like that: 'ymin, xmin, ymax, xmax = pred_bboxes[i,:]/scale' then the box can align to img_raw.

I don't konw whether am i right, but it really works for me.

dagongji10 avatar Dec 29 '18 06:12 dagongji10

change line 57 to utils.draw_bounding_box_on_image_array(img_raw, ymin/scale, xmin/scale, ymax/scale, xmax/scale)

also need to place ‘_, H, W = img.shape’ after ‘img = img.transpose((2,0,1))’

thanks bro, nice job, and @aditya-vora nice project ~

mrlonely001 avatar Jan 03 '19 03:01 mrlonely001

Hi Guys, I confirm that your fix solves the displacement problem, but it seems to make the performance worse.

For example, the image I posted previously becomes this:

prova3

There are four false negative more and a false positive more.

pecia6 avatar Jan 07 '19 09:01 pecia6

@pecia6 I am facing same problem with the accuracy. Have you found any solution?

sagrawal1993 avatar Feb 11 '19 13:02 sagrawal1993

i am facing same problem,Rect not ok

sunjunlishi avatar May 22 '19 08:05 sunjunlishi

out test

sunjunlishi avatar May 22 '19 08:05 sunjunlishi

out test

I tested this code on your image and I am also getting the same results. Definitely not OK! Did you find any other better methods for head detector?

sahilrider avatar Jul 09 '19 07:07 sahilrider

Could somebody please share the weights of the pretrained model? it seems to have been taken down You can email me at [email protected] if you have the weights, thank you!

FarisHijazi avatar Apr 29 '23 15:04 FarisHijazi