facebookresearch / facebookresearch/segment-anything
how to inference with onnx but no box prompt ,and points prompt?
- Dominant language
- Jupyter Notebook
- Stars
- 54.9k
- Forks
- 6.4k
- PR merge metrics
- No merged PRs in 30d
Description
how to inference with onnx but no box prompt ,and points prompt, sam in pytorch inference,it didn't need input prompt and points, becasue we didn't know the object position,and we need get whole mask in picture, how to achieve this requirements?
sam in pytorch inference code as follows:
data = MaskData()
for (points,) in batch_iterator(self.points_per_batch, points_for_image):
batch_data = self._process_batch(points, cropped_im_size, crop_box, orig_size)
data.cat(batch_data)
as so far, i found all demos about sam is given the box and points to get mask, how get whole object mask in picture without specific box? even i use return_single_mask=False to export onnx
Contributor guide
Research direction
The issue mentions SAM in PyTorch, the ONNX export option return_single_mask=False, and the MaskData/_process_batch inference path; start by comparing those references with the repository’s example demos. Done would require a documented or supported way to obtain a whole-image mask without box or point prompts, with its behavior made explicit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- pytorch
- Domain
- computer-vision, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100