bxiang233 / ForAINet

official source code for paper entitled "Automated forest inventory: analysis of high-density airborne LiDAR point clouds with 3D deep learning"
41 stars 8 forks source link

Testing without evaluation - Inference on own data #4

Open borgarpa opened 2 months ago

borgarpa commented 2 months ago

Hi,

I was wondering if there is a way to run inference on my own data to get a merged prediction as described in the paper, but without having to run evaluation. We are planning to use the model to select trees to cut for thinning operations over large areas, so I need the code to run as fast as possible.

I guess it would also be enough to know which parts of the code I need to modify.

Cheers!

bxiang233 commented 2 months ago

Hi,

I was wondering if there is a way to run inference on my own data to get a merged prediction as described in the paper, but without having to run evaluation. We are planning to use the model to select trees to cut for thinning operations over large areas, so I need the code to run as fast as possible.

I guess it would also be enough to know which parts of the code I need to modify.

Cheers!

Hi, you could have a look at this function, hope it helps! https://github.com/bxiang233/ForAINet/blob/7481014855a41559c231ecdd97674b951ccc755d/PointCloudSegmentation/torch_points3d/metrics/panoptic_tracker_pointgroup_treeins_partseg.py#L509

reesecritchlow commented 1 month ago

Hi, following up on this, is there any simple way to run an inference on a simple, unlabelled ply file?

bxiang233 commented 1 month ago

Hi, following up on this, is there any simple way to run an inference on a simple, unlabelled ply file?

Hi, please set all the values of semantic_labels and instance_labels to 0. https://github.com/bxiang233/ForAINet/blob/main/PointCloudSegmentation/torch_points3d/datasets/segmentation/treeins_set1.py#L73 https://github.com/bxiang233/ForAINet/blob/7481014855a41559c231ecdd97674b951ccc755d/PointCloudSegmentation/torch_points3d/datasets/segmentation/treeins_set1.py#L76

reesecritchlow commented 1 month ago

Thanks for the reply. Another question, for the block_merging method, what would be the approach for utilizing the method?

bxiang233 commented 1 month ago

Thanks for the reply. Another question, for the block_merging method, what would be the approach for utilizing the method?

Hi, we use the block_merging method during inference, here is the implementation: https://github.com/bxiang233/ForAINet/blob/7481014855a41559c231ecdd97674b951ccc755d/PointCloudSegmentation/torch_points3d/metrics/panoptic_tracker_pointgroup_treeins_partseg.py#L509

reesecritchlow commented 1 month ago

Hi, thanks for your response! Would you be able to clarify at all where in the code to actually go about doing the implementation and what parameters to feed to it? I haven't been able to find any code relating to inference, so any clarification would be greatly appreciated!