aditya-vora / FCHD-Fully-Convolutional-Head-Detector

Code for FCHD - A fast and accurate head detector
Other
646 stars 182 forks source link

Bounding Boxes displacement error #15

Open pecia6 opened 5 years ago

pecia6 commented 5 years ago

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

SmartGx commented 5 years ago

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?

okideal commented 5 years ago

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

dagongji10 commented 5 years ago

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))’

okideal commented 5 years ago

This work is great but the code is absolutely disaster

aditya-vora commented 5 years ago

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.

okideal commented 5 years ago

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.

dagongji10 commented 5 years ago

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.

aditya-vora commented 5 years ago

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

dagongji10 commented 5 years ago

@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 = predbboxes[i,:]/scale' then the box can align to img_raw.

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

mrlonely001 commented 5 years ago

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 ~

pecia6 commented 5 years ago

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.

sagrawal1993 commented 5 years ago

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

sunjunlishi commented 5 years ago

i am facing same problem,Rect not ok

sunjunlishi commented 5 years ago

out test

sahilrider commented 5 years ago

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?

FarisHijazi commented 1 year ago

Could somebody please share the weights of the pretrained model? it seems to have been taken down You can email me at theefaris@gmail.com if you have the weights, thank you!