RandLA-Net-pytorch icon indicating copy to clipboard operation
RandLA-Net-pytorch copied to clipboard

how to run test.py correctly and how to visualize the result?

Open yaoxingzhi opened this issue 3 years ago • 7 comments

thank you for your contribution! I have some questions about test.py, while I running this python file,the result is so weird as the following.

Loading data... 5_hallway_1_KDTree.pkl 6.2 MB loaded in 0.2s 5_hallway_15_KDTree.pkl 2.4 MB loaded in 0.0s 5_WC_2_KDTree.pkl 1.2 MB loaded in 0.0s 5_conferenceRoom_2_KDTree.pkl 3.7 MB loaded in 0.0s 5_conferenceRoom_1_KDTree.pkl 1.9 MB loaded in 0.0s 5_WC_1_KDTree.pkl 1.3 MB loaded in 0.0s 5_hallway_14_KDTree.pkl 1.4 MB loaded in 0.0s 5_hallway_12_KDTree.pkl 1.4 MB loaded in 0.0s 5_hallway_13_KDTree.pkl 2.4 MB loaded in 0.0s 5_hallway_11_KDTree.pkl 1.5 MB loaded in 0.0s 5_hallway_5_KDTree.pkl 5.1 MB loaded in 0.0s 5_conferenceRoom_3_KDTree.pkl 2.8 MB loaded in 0.0s 5_hallway_3_KDTree.pkl 2.3 MB loaded in 0.0s 5_hallway_10_KDTree.pkl 2.2 MB loaded in 0.0s 5_hallway_4_KDTree.pkl 1.9 MB loaded in 0.0s 5_hallway_2_KDTree.pkl 8.2 MB loaded in 0.0s

Preparing reprojected indices for testing Size of training : 16 Size of validation : 0 Loading model... Predicting labels... Accuracy: 0.22160644829273224 Writing results... Assigning labels to the point cloud... wrong field dimensions Done. Time elapsed: 2.2s

And I can not visualize the result about S3DIS task, could you please help me ?

yaoxingzhi avatar Nov 01 '22 02:11 yaoxingzhi

My results are almost the same with you when finishing running test.py. Then if you want to visualize the result, you can try tensorboard --logdir runs, and check the local host printed in the terminal hints. For example, mine is as below. The visualization result is at http://localhost:6006/.

(randlanet-pytorch) root@ubuntu:~/f/RandLA-Net-pytorch# tensorboard --logdir runs
TensorFlow installation not found - running with reduced feature set.
W1116 09:06:26.744739 140686038304576 server_ingester.py:187] Failed to communicate with data server at localhost:40801: <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.DEADLINE_EXCEEDED
        details = "Deadline Exceeded"
        debug_error_string = "UNKNOWN:Deadline Exceeded {created_time:"2022-11-16T09:06:26.743382497+08:00", grpc_status:4}"
>
Serving TensorBoard on localhost; to expose to the network, use a proxy or pass --bind_all
TensorBoard 2.11.0 at http://localhost:6006/ (Press CTRL+C to quit)

FalongFan avatar Nov 16 '22 01:11 FalongFan

My results are almost the same with you when finishing running test.py. Then if you want to visualize the result, you can try tensorboard --logdir runs, and check the local host printed in the terminal hints. For example, mine is as below. The visualization result is at http://localhost:6006/.

(randlanet-pytorch) root@ubuntu:~/f/RandLA-Net-pytorch# tensorboard --logdir runs
TensorFlow installation not found - running with reduced feature set.
W1116 09:06:26.744739 140686038304576 server_ingester.py:187] Failed to communicate with data server at localhost:40801: <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.DEADLINE_EXCEEDED
        details = "Deadline Exceeded"
        debug_error_string = "UNKNOWN:Deadline Exceeded {created_time:"2022-11-16T09:06:26.743382497+08:00", grpc_status:4}"
>
Serving TensorBoard on localhost; to expose to the network, use a proxy or pass --bind_all
TensorBoard 2.11.0 at http://localhost:6006/ (Press CTRL+C to quit)

Thank you for your reply, but I'm afraid my problem is not like what you said. What I want to visualize is the point cloud map after the semantic segmentation,I can visulize the result on tensorboard.

yaoxingzhi avatar Nov 18 '22 07:11 yaoxingzhi

image maybe you can check the test.py above,the two inputs' dimensions are not correct

jscksy avatar Jan 11 '23 12:01 jscksy

image maybe you can check the test.py above,the two inputs' dimensions are not correct

Thanks for the suggestion. Have you succeeded in implementing RandLA-Net-pytorch's work?

xiaohe3625 avatar Feb 17 '23 03:02 xiaohe3625

i occured this question too, whats MiniDijon8.ply meaning?

Dali936 avatar Aug 18 '23 05:08 Dali936

Hi, the problem is in the line where write_ply happens. It tries to write the predictions with tensor size[1,40960] along with cloud with tensor size [40960,3] and there is a mismatching in the second dimension of both. You can just expand your predictions by reshaping it : expanded_predictions = predictions.reshape(-1,1) also do not forget to send the clouds to cpu as well in order to avoid converting the cuda device tensor to numpy : cloud = points.squeeze(0).cpu().numpy()[:, :3]

hope this works for you

MohamedMansour89 avatar Aug 22 '23 08:08 MohamedMansour89

Hi, the test.py seems to only display partial results of point clouds, and the coordinates of the point cloud are different from the original point cloud.

tempted111 avatar Dec 04 '23 06:12 tempted111