facebookresearch/segment-anything

how to inference with onnx but no box prompt ,and points prompt?

cqray1990 opened this issue · 0 comments

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