facebookresearch / neuralvolumes

Training and Evaluation Code for Neural Volumes
Other
420 stars 52 forks source link

Location of the volume #4

Closed lochuynh1989 closed 4 years ago

lochuynh1989 commented 4 years ago

Hi there,

I wonder whether the origin of the volume is (0,0,0)?

I'm testing the method on a public dataset (http://people.csail.mit.edu/drdaniel/mesh_animation), and I know exactly where (0,0,0) is in the images. But the volume seems to float around the scene. This is the first preview for training process: prog_000001

Each camera is pointing to the opposite side of the scene, so I expect the same for the volume location in images. But for some reason, they are on the same side in the images. Can you help?

Thank you.

stephenlombardi commented 4 years ago

Hi,

The origin of the volume is dictated by the data inside pose.txt. I provided an example pose.txt for the dry ice dataset but that's a specific transformation for that particular dataset; you'll have to change it if you're using your own data. See my post here for an explanation of that file: https://github.com/facebookresearch/neuralvolumes/issues/1#issuecomment-591602762

If you know the origin of the scene is [0, 0, 0] then you should be able to just put an identity matrix inside the pose.txt file.

lochuynh1989 commented 4 years ago

I have run the code with identity matrix in pose.txt and got the above result. I tried to change the translation in pose.txt, but it only worked on 1 set of cameras. For example, on the the first column, I changed the translation vector to [1,0,0], the volume moved to the right on the first camera and to the left on the second one. As you mention, I may need to convert my world space into your world space and get the new KRTs. What should I do to get that?

stephenlombardi commented 4 years ago

My guess is the focal length/principal point are wrong. Note that the dataset (dryice1.py) I've provided modifies the focal length and principal point in the KRT file because I'm using downsampled images (https://github.com/facebookresearch/neuralvolumes/issues/1#issuecomment-573916197), you'll probably have to correct that.