Skip to content

Commit

Permalink
Update inference_core.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hkchengrex authored Oct 28, 2023
1 parent 1ab2ef0 commit 6102b16
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cutie/inference/inference_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def _segment(self,

def step(self,
image: torch.Tensor,
mask: torch.Tensor = None,
mask: Optional[torch.Tensor] = None,
objects: Optional[List[int]] = None,
*,
idx_mask: bool = True,
Expand All @@ -185,12 +185,14 @@ def step(self,
image: 3*H*W
mask: H*W (if idx mask) or len(objects)*H*W or None
objects: list of object id.
objects: list of object ids that are valid in the mask Tensor.
The ids themselves do not need to be consecutive/in order, but they need to be
in the same position in the list as the corresponding mask
in the tensor in non-idx-mask mode.
objects is ignored if the mask is None.
If idx_mask is False and objects is None, we sequentially infer the object ids.
idx_mask: if True, mask is expected to contain an object id at every pixel.
If False, mask should have multiple channels with each channel representing one object.
end: if we are at the end of the sequence, we do not need to update memory
if unsure just set it to False
delete_buffer: whether to delete the image feature buffer after this step
Expand Down

0 comments on commit 6102b16

Please sign in to comment.