yasaminjafarian / HDNet_TikTok

MIT License
337 stars 36 forks source link

Formatting of training data #13

Closed Depersonalizc closed 3 years ago

Depersonalizc commented 3 years ago

Hi Yasamin, awesome work! I'm trying to train the model on my own dataset, and I wonder if you could clarify the formats of the labeled data. Specifically, for normal, what should the channel 1,2,3 of the txt files each store? And how did you convert them into visualization?

yasaminjafarian commented 3 years ago

Hi. Thanks for your comments. The format can be found here. Each 1,2,3 is the first to third channel of the normal vector. You can check how the visualization is done in the inference code.

Depersonalizc commented 3 years ago

Thanks for the reply! I'm still a bit unsure about the format of the normal vectors. Are they camera-space normals in OpenGL format (channel 1-right, 2-up, 3-back) ?

Depersonalizc commented 3 years ago

After some fiddling with your sample data, I'm guessing that the normals ought to be in camera-space and stored in OpenCV format (channel 1-right, 2-down, 3-front). Is that correct? 😀😀

yasaminjafarian commented 3 years ago

It is in camera space. I have computed the normal in the 3D world coordinate and multiplied it by the camera rotation matrix to get it in camera space. So yeah it should be what you mentioned.

Depersonalizc commented 3 years ago

I see. Many thanks for your replies!

fishfishson commented 3 years ago

It is in camera space. I have computed the normal in the 3D world coordinate and multiplied it by the camera rotation matrix to get it in camera space. So yeah it should be what you mentioned.

Hi author, could you pls tell me how you generate GT normal map from mesh? use pyrender?

yasaminjafarian commented 3 years ago

Hi. I use the nearest neighbors to compute the normals myself but you can also use the off-the-shelf pipelines.