emilianavt / OpenSeeFace

Robust realtime face and facial landmark tracking on CPU with Unity integration
BSD 2-Clause "Simplified" License
1.42k stars 152 forks source link

Run OpenSeeFaceLandmarks #70

Open namhai1810 opened 2 months ago

namhai1810 commented 2 months ago

Great work bro. However, why I run file model.py got this issued that cannot mapping **kwargs image image

image

emilianavt commented 2 months ago

Make sure that you are on commit c450c12ae6ffb1757f62dde3c2765da3c10f6def of geffnet.

namhai1810 commented 2 months ago

oh could you give me version of your geffnet, I only use pip install geffnet(its version 1.0.2)

emilianavt commented 2 months ago

I'd recommend cloning it from github and installing it that way.

namhai1810 commented 2 months ago

I have solve this problem, the main reason is the the latest geffnet. Many thanks

namhai1810 commented 2 months ago

I have observed the output of OpenSeeFaceLandmarks during training, which is of the shape (1, 198, 28, 28), with an input shape of (1, 3, 224, 224). However, our labels consist of 66 landmarks. What does the dimension 198 represent in the output? Additionally, could you provide some guidance on how to create DataLoaders for our data and process labels, given that our labels are in the form of (x, y) coordinates of landmarks?

emilianavt commented 2 months ago

I recommend reading through #1. Some discussion of such topics has taken place there. Regarding your question for the shapes, referring to the landmarks function posted there may help.

namhai1810 commented 2 months ago

I have created a heatmap of coordinates (x, y) based on a Gaussian distribution. However, I am encountering difficulties in converting these (x, y) coordinates into X_offset_map and Y_offset_map. Could you please provide guidance on how to create these offset maps?

Furthermore, I reviewed your landmark code and noticed a function named logit_arr to reverse the effect of the sigmoid function. Does the scale factor affect the way we create the offset map? @emilianavt

emilianavt commented 2 months ago

For the offset maps, you can find a nice explanation of how they work here in the "A Technical Deep Dive" section. The specific resolution numbers are different, but the technique is the same. The sigmoid function and scale factor adjust the steepness of the gradient on the offset masks.