PRBonn / point-cloud-prediction

Self-supervised Point Cloud Prediction Using 3D Spatio-temporal Convolutional Networks
https://www.ipb.uni-bonn.de/wp-content/papercite-data/pdf/mersch2021corl.pdf
MIT License
141 stars 25 forks source link

Problem about visualization #4

Closed Apocalypse2403 closed 2 years ago

Apocalypse2403 commented 2 years ago

Hi Benedikt,

I've done the training and testing about the network, and I appreciate your help.

However, I met another problem about visualization after that.

I run the command as

python pcf/test.py -m cc56eea/pcf_20211209_172403 -l 5 -s

and

python pcf/visualize.py -p /pcf/runs/cc56eea/pcf_20211209_172403/test/point_clouds

Then I got noting but an empty window about open3d. Also, there are warnings about the lack of some .ply files like this 30cac4d81d9714fb61eb326faf166ac

I noticed that in the visualization.py, the saved .ply data should be

├── sequence │ ├── gt | | ├──frame.ply │ ├─── pred | | ├── frame | │ | ├─── (frame+1).ply

But I got the every frame_id with 5 future prediction .ply files such as

41df79c339b4f242004cae6a51653d0

So I can't visualize the results.

benemer commented 2 years ago

Hi,

the visualizer can not find the .ply files because an absolute path to /pcf/runs/cc56eea/pcf_20211209_172403/test/point_clouds is given and does not exist. This is a mistake in the README, I just updated it. The provided path should be relative: pcf/runs/cc56eea/pcf_20211209_172403/test/point_clouds.

The generated files are correct. In pred, each directory with name i contains the predicted future frames from t+1 on. In your example, you have the predicted frames 5 to 9 at the current frame 4 (using the past frames 0 to 4 in the default setting).

Thanks for the catch.

Apocalypse2403 commented 2 years ago

Hi Benemer,

I changed the prediction point clouds path to relative pcf/runs/cc56eea/pcf_20211209_172403/test/point_clouds

But still have problem. Actually, the code is finding the frames that doesn't exists. In my example, I run the test

python pcf/test.py -m cc56eea/pcf_20211208_162403 -l 5 -s

and here's the result

1639637341(1)

then I run the visualize code

python pcf/visualize.py -p pcf/runs/COMMIT/EXPERIMENT_DATE_TIME/test/point_clouds

1639637427(1)

As we can see, the code is finding the prediction of frame 000024, but under the test, there is no prediction of frame 24 saved. Here is my prediction result files 1639637563(1)

Is there any mistake I made in training or testing?

benemer commented 2 years ago

This is expected, since with passing the flag -l 5, you only test on 5 batches of the test set. With batch size 4, this results in 20 predictions a frames 4 to 23. These are the folders you can find in pred.

In your case, the last folder 000023 contains the prediction of frames 24 to 28 at the current frame 23 given the past frames 19 to 23. This is why the visualizer tells you that it will render predicted scans in the frame interval [5,28].

When you try to access predictions at frame 24 (meaning predicted frames 25 to 29), it can not find them since they were not generated. To visualize all scans, just omit the -l flag and run

python pcf/test.py -m cc56eea/pcf_20211208_162403 -s

Best regards, Benedikt

Apocalypse2403 commented 2 years ago

Hi, Benedikt

I run the test as

python pcf/test.py -m cc56eea/pcf_20211208_162403 -s

and here is the result 2b08bdeea0890a330b3959af9a84b06

after that the visualization code still cant find the frames as

91c5d00bcf90fd096776dd2dfba1701

I checked the prediction files

b848746eca61441bffa2160b0151c21

the whole frames of seq 08 were predicted, yet the visualization code will still find the frames dictionary that doesn't exist, such as 004066. The prediciton dictionary of seq 08 only has 004065

9a0ab9485599a2a3b2b83bf7780f6c7

Maybe I made some mistakes through data preparing?

benemer commented 2 years ago

Can you print your config file and how many files you have in point_clouds/08/gt?

Did you press any keys before the warning appeared? I think you try to visualize from a current step where no future scans are available.

If sequence 08 has 4070 frames, you can not predict the future frames from 004066, since there is no ground truth future scan available at frame 004071. This is why you only find the predictions at current frames 000005 to 004065.

Apocalypse2403 commented 2 years ago

Can you print your config file and how many files you have in point_clouds/08/gt?

Did you press any keys before the warning appeared? I think you try to visualize from a current step where no future scans are available.

If sequence 08 has 4070 frames, you can not predict the future frames from 004066, since there is no ground truth future scan available at frame 004071. This is why you only find the predictions at current frames 000005 to 004065.

In point_clouds/08/gt, there are 4066 frames from 000005 to 004070. And in the prediction dictionary, the last prediction is 004065 which contains the frame 004066-004070.

I think the prediction files and gt files are correct, is that so?

As for the visualize command, I pressed an S to start the visualization as the instruction shown in terminal. d62914cfe39948bb83f0f48d8fe6d7f

benemer commented 2 years ago

Yes, all files are correct. When pressing S, the visualizer will go through all frames. As soon as it reaches frame 004066, no prediction is available due to the missing ground truth and the warning occurs.

Since I do not see any issue with the code, I will now close this one. Please re-open it or start a new one if you have further questions.

Best regards Benedikt