aRI0U / RandLA-Net-pytorch

PyTorch implementation of RandLA-Net
346 stars 52 forks source link

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

Open yaoxingzhi opened 2 years ago

yaoxingzhi commented 2 years ago

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 ?

LeongVan commented 2 years ago

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)
yaoxingzhi commented 2 years ago

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.

jscksy commented 1 year ago

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

xiaohe3625 commented 1 year ago

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?

944104439 commented 1 year ago

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

MohamedMansour89 commented 1 year ago

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

tempted111 commented 12 months ago

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.