SegAnyGAussians icon indicating copy to clipboard operation
SegAnyGAussians copied to clipboard

a problem about prompt_segmenting

Open Alexsong-yu opened this issue 1 year ago • 1 comments

When I use the original images in the dataset without processing, I will report an error like this

root@I1993568c2b00601e90:/hy-tmp/SegAnyGAussians# python prompt_segmenting.py Looking for config file in ./output/e01280aa-a/cfg_args Config file found: ./output/e01280aa-a/cfg_args Loading trained model at iteration -1, 30000 Reading camera 34/34 Loading Training Cameras Loading Test Cameras There are 34 views in the dataset. 0.05493569374084473 0.0071582794189453125 10 running k-means on cuda.. resuming [running kmeans]: 9it [00:00, 525.51it/s, center_shift=0.000000, iteration=9, tol=0.000100]
0.0347135066986084 tensor(3410, device='cuda:0') 0.11548805236816406 tensor(563.6510, device='cuda:0') std_nearest_k_distance /hy-tmp/SegAnyGAussians/prompt_segmenting.py:153: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor). target_mask = torch.tensor(sam_mask, device=grad_catch_2dmask.device) tensor(4.4595, device='cuda:0') std_nearest_k_distance tensor(0.8292, device='cuda:0') std_nearest_k_distance tensor(0.3955, device='cuda:0') std_nearest_k_distance tensor(0.3851, device='cuda:0') std_nearest_k_distance tensor(0.3400, device='cuda:0') std_nearest_k_distance tensor([[0.0000, 0.4895]], device='cuda:0') test threshold Traceback (most recent call last): File "/hy-tmp/SegAnyGAussians/prompt_segmenting.py", line 563, in filtered_points, filtered_mask, thresh = postprocess_grad_based_statistical_filtering(pcd=selected_xyz.clone(), precomputed_mask=mask_.clone(), feature_gaussians=feature_gaussians, view=view, sam_mask=ref_mask.clone(), pipeline_args=pipeline.extract(args)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/hy-tmp/SegAnyGAussians/prompt_segmenting.py", line 196, in postprocess_grad_based_statistical_filtering mask = nearest_k_distance.mean(dim = -1) <= test_threshold ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: The size of tensor a (3349) must match the size of tensor b (2) at non-singleton dimension 1

Alexsong-yu avatar Apr 29 '24 11:04 Alexsong-yu

Hi. This seems to be the problem of segmentation target. Does this problem remain when shift to segment other objects?

Jumpat avatar May 11 '24 06:05 Jumpat