lingtengqiu / Open-PIFuhd

This is an implementation of PIFuHD based on PyTorch
MIT License
349 stars 39 forks source link

how to get ground truth of Normal ?? #10

Open ylab604 opened 2 years ago

ylab604 commented 2 years ago

how to get ground truth of Normal ??

lingtengqiu commented 2 years ago

U can use pyrender render or pytorch3d. when u render your normal map, u need to care of normal map directions. More specifically, when U rotate your mesh, your normal map also need to rotate degree the same as mesh. the normal map value is texture value when you render normal map.

ylab604 commented 2 years ago

Thank you for your answer. Can't I use the data generation in your Github?

lingtengqiu commented 2 years ago

Please bash the script

bash ./scripts/generate.sh
ylab604 commented 2 years ago

image image I extracted depth by modifying your code a little. Thank you. I used normalmap as it is. Can't I use it as it is?

lingtengqiu commented 2 years ago

I suggest u check whether the rotate normal map is right(especially for back view). Generally, the left side is closed to blue while right side is the red-category.

ylab604 commented 2 years ago

Thank you so much for your kind explanation. Could you please tell me how to do it? I did normalmap rendering of the thuman2.0 dataset with your code, but it seems that i was wrong. Which part of the code should I fix?

ylab604 commented 2 years ago

image here is my result on thuman2.0 dataset

lanlan17 commented 2 years ago

when i bash the script bash ./scripts/generate.sh there is a error ImportError: cannot import name 'mesh_core_cython' from 'engineer.render.face3d.mesh.cython' (unknown location) i don't know how to solve the problem could you give me some suggestion

ylab604 commented 2 years ago

sorry for late you need to set face3d go to https://github.com/YadiraF/face3d and follow read me for set engineer.render.face3d.mesh.cython

lanlan17 commented 2 years ago

recently i also use Thuman2.0 dataset to conduct experiments. when i render the normal. the error is "mesh is non-watertight for contained point query!" have you encountered the similar problem?

ylab604 commented 2 years ago

hmm... I didn't get that error, sorry for not being helpful. In my case, I tried it first with Render People, then proceeded. I recommend that you try Render People first.

lanlan17 commented 2 years ago

thank you for your reply! i have tried render people dataset! It worked. but Thuman2.0 has some problems.

ylab604 commented 2 years ago

If you write down the error in detail, I might be able to help, so please write in detail.

lanlan17 commented 2 years ago
image

like this,it doesn't generate normal map

lanlan17 commented 2 years ago

i have solved the problem the reason is that i accidentally commented out part of the code earlier thank you again for your patience

ylab604 commented 2 years ago

Great! Have a good day!

kings-rgb commented 2 years ago

i have solved the problem the reason is that i accidentally commented out part of the code earlier thank you again for your patience

hi, I have the same problem, but I donot change the code. where did you modify the code?

lanlan17 commented 2 years ago

i have solved the problem the reason is that i accidentally commented out part of the code earlier thank you again for your patience

hi, I have the same problem, but I donot change the code. where did you modify the code?

maybe the warning is related to your datasets, but it will not prevent you to generate the normal images

yangqinhui0423 commented 5 months ago

image image I extracted depth by modifying your code a little. Thank you. I used normalmap as it is. Can't I use it as it is?

Hey, could you tell me how to generate depth map? Many thanks.

ylab604 commented 5 months ago

build the generate depth code refer to generate normal code

yangqinhui0423 commented 5 months ago

build the generate depth code refer to generate normal code

Thanks for your quick answer! Does it mean refer to /tools/generate_normal_map.py in the project?

ylab604 commented 5 months ago

yes, I can't remember fully(because almost 2years ago). I think you would change the face3d render part (c++ part) normal 2 depth use depth formula