Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PeterYYZhang/few-shot-self-prompt-SAM
/ functions
Functions
116 in github.com/PeterYYZhang/few-shot-self-prompt-SAM
⨍
Functions
116
◇
Types & classes
19
Method
forward
(self, x: torch.Tensor)
segment_anything/modeling/image_encoder.py:224
Method
forward
(self, x: torch.Tensor)
segment_anything/modeling/image_encoder.py:391
Method
forward
(self, x: torch.Tensor)
segment_anything/modeling/common.py:25
Method
forward
(self, x: torch.Tensor)
segment_anything/modeling/common.py:38
Method
forward
Args: image_embedding (torch.Tensor): image to attend to. Should be shape B x embedding_dim x h x w for any h and w.
segment_anything/modeling/transformer.py:62
Method
forward
( self, queries: Tensor, keys: Tensor, query_pe: Tensor, key_pe: Tensor )
segment_anything/modeling/transformer.py:151
Method
forward
(self, q: Tensor, k: Tensor, v: Tensor)
segment_anything/modeling/transformer.py:218
Method
forward
Predicts masks end-to-end from provided images and prompts. If prompts are not known in advance, using SamPredictor is recomm
segment_anything/modeling/sam.py:54
Method
forward
Embeds different types of prompts, returning both sparse and dense embeddings. Arguments: points (tuple(torch.Tens
segment_anything/modeling/prompt_encoder.py:128
Method
forward
Generate positional encoding for a grid of the specified size.
segment_anything/modeling/prompt_encoder.py:194
Method
forward
( self, image_embeddings: torch.Tensor, point_coords: torch.Tensor, point_labe
segment_anything/utils/onnx.py:108
Method
generate
Generates masks for the given image. Arguments: image (np.ndarray): The image to generate masks for, in HWC uint8 format.
segment_anything/automatic_mask_generator.py:137
Function
iou_coef
(groundtruth_mask, pred_mask)
utils/utils.py:53
Function
show_anns
(anns, ax)
utils/utils.py:9
Function
show_mask
(mask, ax, random_color=False)
utils/utils.py:36
Function
show_points
(coords, labels, ax, marker_size=375)
utils/utils.py:30
← previous
101–116 of 116, ranked by callers