erkil1452 / gaze360

Code for the Gaze360: Physically Unconstrained Gaze Estimation in the Wild Dataset
http://gaze360.csail.mit.edu
Other
225 stars 42 forks source link

Adapting to detectron2 : wrong predicted multiple heads boxes #5

Closed arduinepo closed 3 years ago

arduinepo commented 4 years ago

Hi,

I adapted the Colab tutorial to detectron2, and rewrote the script into three classes to make it clearer. It works well on single people pictures ; but not at all on multiple people pictures, for example : test30 Could anyone please help me ? I thank you a lot.

carlosimoes commented 4 years ago

@arduinepo I'm interested in what you're doing and if you want i can try to help in this project. I'm going to analyze the code and then i will say something. [Just to keep the topic alive and you know that i will take a look]

But at first glance have you already confirmed whether each person's head is being well analyzed in each frame (the masks). Because the gaze360 needs a crop image of the head individually to get the gaze vector.

arduinepo commented 4 years ago

Hi, thank you for your answer ! In fact I succeeded a few hours after posting this issue, quite easily by modifying some lines in the function extracts_heads__bbox : since detectron2 returns the cropped IUV image for each instance, the individual segmentation masks are not needed to obtain the individual heads. My code is on my office computer to which I usually connect via x2go and SSH, but my laptop has got a permission denied since this morning, so I will only commit on Monday morning. ;-) I'm now working on accelerating the program : after a timed run, with a GPU and a batched inputs for the DensePOse predictor, the slowest part is the extraction of the densepose results, the IUV arrays and the boxes ; I haven't yet feeded the gaze predictor with multiple inputs, nor timed the transformation of the extracted data before getting the gaze. I am going to explore DALI and multiprocessing, because I plan on retraining gaze360 with exact groundtruth values (usings markers in a lab room, maybe 2+ cameras) : the outputs don't satisfy me.

Hopedreams commented 3 years ago

Hi @arduinepo,I'm wondering if you've gotten the code to work to run Gaze360 with detectron2? I saw your comment at erkil1452/gaze360#5 and I'm curious about your progress.Can you release code?