Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get SAM Generate Masks #50

Open
Yoow4 opened this issue Jul 10, 2024 · 3 comments
Open

How to get SAM Generate Masks #50

Yoow4 opened this issue Jul 10, 2024 · 3 comments

Comments

@Yoow4
Copy link

Yoow4 commented Jul 10, 2024

Hi,
I would like to know more details about how to use SAM to get the segmentation masks on 2D frames and then map them into the 3D space via depth information.
When I use it, SAM sets the following parameters
mask_generator = SamAutomaticMaskGenerator( model=sam, points_per_side=64, pred_iou_thresh=0.86, box_nms_thresh= 0.7, stability_score_thresh=0.92, crop_n_layers=1, crop_n_points_downscale_factor=2, min_mask_region_area=200, # Requires open-cv to run post-processing )
But I can't get the same segmentation effect as you, how can I set the parameters and use the depth map to project to 3D space。
Hope to get your answer.
Thanks.

@yhyang-myron
Copy link
Member

yhyang-myron commented Jul 10, 2024

Hi, we get 3D point clouds with 2D RGB, depth and camera parameters at here.
And we process 2D masks at here.

@Yoow4
Copy link
Author

Yoow4 commented Jul 15, 2024

Hi,
For the last step, when I run sam3d.py I get the.pth file.
I look at the pcd_ensemble function
with open(org_path) as f: segments = json.load(f)
It needs a.json file.

What should I do to get the.json file.

@flybiubiu
Copy link

Hi, For the last step, when I run sam3d.py I get the.pth file. I look at the pcd_ensemble function with open(org_path) as f: segments = json.load(f) It needs a.json file.

What should I do to get the.json file.

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants