-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to fit scenes from other datasets #7
Comments
We have not tried datasets available at your link, but it seems like Redwood comes with everything you need: RGB images (you can ignore depth), .ply reconstructions, and camera poses. It seems that .log trajectory files are the view matrices already converted to the format required for Neural Point-Based Graphics (sometimes it's required to invert some axes or some matrices; in this case, you can try writing to the dataset authors about the exact format of their camera poses). Next, you'll need to make a paths file and a scene config -- there is a tutorial in the readme and some comments in this issue. If you succeed in running this data, we would love to hear your feedback here - this would be really helpful for others! |
@seva100 does the .ply file needs to have color information or not necessarily? Because the one provided from the redwood is colorless. In principle if I need color I could recreate it with the color images and the agisoft/colmap software. |
No, .ply file does not need to have color information. It only needs to contain XYZ coordinates of the points. |
Hi @seva100, I've managed to train the network with the redwood dataset but the output seems not correct. I've tried two approaches since with the default parameters I was getting a CUDA out of memory RuntimeError. So what I've tried are the following training modes, in the first one I've reduced the image size and in the second the batch size:
for the first case I've got a VAL LOSS 926.9789898726192 and for the second 872.1955623209042 which from what I understand it is high, could you please confirm whether these values are considered bad or good. While the viewer output of course does not seem that good as well: While I should be getting something similar to that: Any idea what I might have doing wrong. |
Hi @ttsesm, I think most likely you'll need to play with the camera poses, as they are often provided in different ways. The format we expect is the same as the one given by Agisoft; you can find a good reference here (the only exception is that we invert the 2nd and 3rd columns of R matrix afterwards). In short, [R t | 0 1] should be a world2camera transformation matrix, so if for Redwood it is camera2world, you'll need to invert this matrix. Also, check that your intrinsic matrix is correct (it should be of a form [f 0 cx | 0 f cy | 0 0 1], where f is converted to pixels, and (cx, cy) should be close to an image center point). About the high values of VGG loss: I think this depends on the dataset; we had numbers of 700-800 in case of a good convergence too. Also, I would try to decrease batch size to 1 for both training and validation (this should not significantly affect the quality) and set 512x512 crop size. |
I see, yup it seems that you are right the redwood provides a camera2world transformation according to the trajectory description here. I will try to invert them and try again. My cam intrinsic shouldn't be a problem since they are correctly defined as you can see below:
|
Yes, please also try to change the sign of the 2nd and 3rd column. In the end, the matrices should correspond to the OpenGL coordinate system which has +X axis headed right, -Y up, -Z forward. Perhaps the following trick can help to validate that your matrices are correct. Once you make some transformation of the view matrices and train something (at least for 1 epoch), you can open the |
I've tried to use the
|
Hhmm, inverting the pose matrices and then changing the sign of the 2nd and 3rd column did not work as well. I should be doing something wrong somewhere else or something. Is there a way to apply some debugging on the fly or at least to check that what I am using for the the training is correct. |
Ok, looks like the For example, when executed with the and we can see that the points project to the same places as in the respective ground truth image. This should be a working debugging procedure for the view matrices. |
@seva100 with the and my loss dropped as well to 491.04269130734633 which I guess is also a good sign. I tried to visualize the output with the viewer:
and I am getting the following output: what I've noticed is that there are a lot of black areas in the view, is this fine considering that my rgb images are capturing quite well the whole scene? |
@ttsesm great to hear that the problem with view matrices was resolved; there is always a hassle with the poses coming from various external sources. |
Hi Artem, indeed I had the |
@ttsesm hard to say at this point what could be the reason. Can you please post here:
I also have a hypothesis that some regions are missing in the .ply file you use. This might actually cause these black regions. |
For training I used the following command: while for viewing: If you want to train the scene by yourself you can download all the configs and data that I've used from the following link (I have set the folders to be in the same structure as you are using). You will need to comment though the Line 438 in c0cf6f2
model['normals'] = data.vertex_normals since apparently the provided .ply does not contain nx , ny and nz variables and apply a small change in line Line 384 in c0cf6f2
target_list = [os.path.join(config['target_path'], target_name_func(str(i).zfill(6))) for i in camera_labels] since the image names are provided with prefixed zeros.
|
@ttsesm, I've trained the network with I've trained for 39 epochs, and with such crop size more epochs might be needed to achieve better results. You can also try the 2nd way I suggested (512x512 crop size and less aggressive zoom augmentations). Though, the results already seem quite acceptable to me. |
Hi Artem, thank you a lot for the feedback. Indeed the |
@seva100 I can confirm that both approaches, i.e. Thanks for the help, hopefully these info will be helpful for others as well. |
@ttsesm Great to hear! Line 384 in c0cf6f2
and just change target_name_func in the paths config. For example, I used the following paths_example.yaml for the Redwood bedroom:
|
Hi guys,
I would be interested to know whether it is possible to fit different scenes based on other existing datasets. For example I would like to understand and get an idea how to fit the redwood dataset (http://redwood-data.org/). I have read the README regarding how to fit our own scenes but it is not clear to me how to do the same with the e.g. the redwood data.
Thus, would be easy to give some feedback here how to do that.
Thanks.
The text was updated successfully, but these errors were encountered: