MCPcopy Create free account

hub / github.com/PeterYYZhang/few-shot-self-prompt-SAM / functions

Functions116 in github.com/PeterYYZhang/few-shot-self-prompt-SAM

Methodforward
(self, x: torch.Tensor)
segment_anything/modeling/image_encoder.py:224
Methodforward
(self, x: torch.Tensor)
segment_anything/modeling/image_encoder.py:391
Methodforward
(self, x: torch.Tensor)
segment_anything/modeling/common.py:25
Methodforward
(self, x: torch.Tensor)
segment_anything/modeling/common.py:38
Methodforward
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
Methodforward
( self, queries: Tensor, keys: Tensor, query_pe: Tensor, key_pe: Tensor )
segment_anything/modeling/transformer.py:151
Methodforward
(self, q: Tensor, k: Tensor, v: Tensor)
segment_anything/modeling/transformer.py:218
Methodforward
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
Methodforward
Embeds different types of prompts, returning both sparse and dense embeddings. Arguments: points (tuple(torch.Tens
segment_anything/modeling/prompt_encoder.py:128
Methodforward
Generate positional encoding for a grid of the specified size.
segment_anything/modeling/prompt_encoder.py:194
Methodforward
( self, image_embeddings: torch.Tensor, point_coords: torch.Tensor, point_labe
segment_anything/utils/onnx.py:108
Methodgenerate
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
Functioniou_coef
(groundtruth_mask, pred_mask)
utils/utils.py:53
Functionshow_anns
(anns, ax)
utils/utils.py:9
Functionshow_mask
(mask, ax, random_color=False)
utils/utils.py:36
Functionshow_points
(coords, labels, ax, marker_size=375)
utils/utils.py:30
← previous101–116 of 116, ranked by callers