MCPcopy Create free account

hub / github.com/UX-Decoder/Semantic-SAM / functions

Functions759 in github.com/UX-Decoder/Semantic-SAM

Methodforward
Performs the matching Params: outputs: This is a dict that contains at least these entries: "pred_logits": Tenso
semantic_sam/modules/matcher.py:196
Methodforward
r""" Args: query, key, value: map a query and a set of key-value pairs to an output. See "Attention Is All You Need" for more
semantic_sam/modules/attention.py:426
Methodforward
(self, x, mask=None)
semantic_sam/modules/position_encoding.py:29
Methodforward
(self, x)
semantic_sam/language/LangEncoder/transformer.py:30
Methodforward
(self, x: torch.Tensor)
semantic_sam/language/LangEncoder/transformer.py:40
Methodforward
(self, x: torch.Tensor, key_padding_mask: torch.Tensor = None)
semantic_sam/language/LangEncoder/transformer.py:75
Methodforward
(self, input_ids, attention_mask=None)
semantic_sam/language/LangEncoder/transformer.py:194
Methodforward
forward for all data, including sa-1b, generic seg, part seg data currently only support interactive segmentation on sa-1b, stay tune
semantic_sam/architectures/interactive_mask_dino.py:342
Methodforward
(self, src, mask, query_embed, pos_embed)
semantic_sam/body/transformer_blocks.py:61
Methodforward
( self, src, mask: Optional[Tensor] = None, src_key_padding_mask: Optional[Ten
semantic_sam/body/transformer_blocks.py:85
Methodforward
( self, tgt, memory, tgt_mask: Optional[Tensor] = None, memory_mask: O
semantic_sam/body/transformer_blocks.py:113
Methodforward
( self, src, src_mask: Optional[Tensor] = None, src_key_padding_mask: Optional
semantic_sam/body/transformer_blocks.py:219
Methodforward
( self, tgt, memory, tgt_mask: Optional[Tensor] = None, memory_mask: O
semantic_sam/body/transformer_blocks.py:324
Methodforward
(self, features, mask=None, targets=None, target_queries=None, target_vlp=None, task='seg', extra={})
semantic_sam/body/general_head.py:95
Methodforward
(self, srcs, masks, pos_embeds, use_ckpt=False)
semantic_sam/body/encoder/encoder_deform.py:66
Methodforward
(self, src, pos, reference_points, spatial_shapes, level_start_index, padding_mask=None)
semantic_sam/body/encoder/encoder_deform.py:133
Methodforward
(self, src, spatial_shapes, level_start_index, valid_ratios, pos=None, padding_mask=None, use_ckpt=False)
semantic_sam/body/encoder/encoder_deform.py:166
Methodforward
(self, features, targets=None)
semantic_sam/body/encoder/transformer_encoder_fpn.py:145
Methodforward
(self, src, mask, pos_embed)
semantic_sam/body/encoder/transformer_encoder_fpn.py:180
Methodforward
(self, features, targets=None)
semantic_sam/body/encoder/transformer_encoder_fpn.py:304
Methodforward
:param query (N, Length_{query}, C) :param reference_points (N, Length_{query}, n_levels, 2), range
semantic_sam/body/encoder/ops/modules/ms_deform_attn.py:82
Methodforward
(ctx, value, value_spatial_shapes, value_level_start_index, sampling_locations, attention_weights, im2col_step
semantic_sam/body/encoder/ops/functions/ms_deform_attn_func.py:34
Methodforward
task: seg/det TODO add sam
semantic_sam/body/decoder/interactive_mask_dino.py:500
Methodforward
(self, tgt, tgt_mask: Optional[Tensor] = None, tgt_key_padding_mask: Optional[
semantic_sam/body/decoder/modules.py:59
Methodforward
(self, tgt, memory, memory_mask: Optional[Tensor] = None, memory_key_padding_m
semantic_sam/body/decoder/modules.py:120
Methodforward
(self, tgt)
semantic_sam/body/decoder/modules.py:169
Methodforward
(self, x)
semantic_sam/body/decoder/modules.py:195
Methodforward
(self, x)
semantic_sam/body/decoder/utils/utils.py:20
Methodforward
Input: - tgt: nq, bs, d_model - memory: hw, bs, d_model - pos: hw, bs, d_model - refpoints_un
semantic_sam/body/decoder/utils/dino_decoder.py:96
Methodforward
Input: - tgt/tgt_query_pos: nq, bs, d_model -
semantic_sam/body/decoder/utils/dino_decoder.py:242
Methodforward_decoder
(self, features, mask=None,targets=None, target_queries=None, target_vlp=None, prediction_switch=None, task='s
semantic_sam/body/general_head.py:83
Methodforward_encoder
(self, features, mask=None,targets=None, target_queries=None, target_vlp=None, prediction_switch=None, task='s
semantic_sam/body/general_head.py:78
Methodfrom_config
(cls, cfg)
semantic_sam/language/vlpencoder.py:46
Methodfrom_config
(cls, cfg)
semantic_sam/language/encoder.py:33
Methodfrom_config
(cls, cfg)
semantic_sam/architectures/interactive_mask_dino.py:134
Methodfrom_config
(cls, cfg, input_shape: Dict[str, ShapeSpec], lang_encoder: nn.Module, extra: dict)
semantic_sam/body/general_head.py:56
Methodfrom_config
(cls, cfg, input_shape: Dict[str, ShapeSpec], *args, **kwargs)
semantic_sam/body/encoder/encoder_deform.py:330
Methodfrom_config
(cls, cfg, input_shape: Dict[str, ShapeSpec])
semantic_sam/body/encoder/transformer_encoder_fpn.py:262
Methodfrom_config
(cls, cfg, in_channels, lang_encoder, mask_classification, extra)
semantic_sam/body/decoder/interactive_mask_dino.py:178
Methodfrom_config
(cls, cfg, is_train=True)
datasets/dataset_mappers/lvis_dataset_mapper.py:107
Methodfrom_config
(cls, cfg, is_train=True)
datasets/dataset_mappers/sam_baseline_dataset_mapper_json.py:113
Methodfrom_config
(cls, cfg, is_train=True, dataset_name="")
datasets/dataset_mappers/part_data_filter_whole_new_instance_dataset_mapper.py:153
Methodfrom_config
(cls, cfg, is_train=True)
datasets/dataset_mappers/pascal_instance_new_baseline_dataset_mapper.py:133
Methodfrom_config
(cls, cfg, is_train=True)
datasets/dataset_mappers/sam_baseline_dataset_mapper.py:166
Methodfrom_config
(cls, cfg, is_train=True, dataset_name='no')
datasets/dataset_mappers/mask_former_semantic_dataset_mapper.py:62
Methodfrom_config
(cls, cfg, is_train=True)
datasets/dataset_mappers/imagenet_dataset_mapper.py:66
Methodfrom_config
(cls, cfg, is_train=True)
datasets/dataset_mappers/o365_instance_new_baseline_dataset_mapper.py:116
Methodfrom_config
(cls, cfg, is_train=True)
datasets/dataset_mappers/coco_panoptic_new_baseline_dataset_mapper.py:97
Methodfrom_config
(cls, cfg, is_train: bool = True)
datasets/dataset_mappers/inference_mapper_with_gt.py:87
Methodfrom_config
(cls, cfg, is_train=True)
datasets/dataset_mappers/coco_interactive_panoptic_new_baseline_dataset_mapper.py:118
Methodfrom_config
(cls, cfg, is_train=True)
datasets/dataset_mappers/coco_instance_new_baseline_dataset_mapper.py:112
Methodfrom_config
(cls, cfg, is_train=True)
datasets/dataset_mappers/mask_former_instance_dataset_mapper.py:81
Functiongen_encoder_output_proposals
Input: - memory: bs, \sum{hw}, d_model - memory_padding_mask: bs, \sum{hw} - spatial_shapes: nlevel, 2 Output:
semantic_sam/body/decoder/utils/utils.py:33
Functiongeneralized_box_iou_padded
Generalized IoU from https://giou.stanford.edu/ The boxes should be in [x0, y0, x1, y1] format Returns a [N, M] pairwise matrix, where
semantic_sam/utils/box_ops.py:68
Functiongenerate_regular_grid_point_coords
Generate regular square grid of points in [0, 1] x [0, 1] coordinate space. Args: R (int): The number of grids to sample, one for ea
semantic_sam/modules/point_features.py:47
Functionget_class_names
(name, background=True)
semantic_sam/utils/misc.py:177
Functionget_focal_backbone
(cfg)
semantic_sam/backbone/focal_dw.py:779
Functionget_focal_backbone
(cfg)
semantic_sam/backbone/focal.py:682
Functionget_interactive_maskdino_head
(cfg, input_shape, lang_encoder, extra)
semantic_sam/body/general_head.py:106
Functionget_interactive_maskdino_transformer_decoder
(cfg, in_channels, lang_encoder, mask_classification, extra)
semantic_sam/body/decoder/interactive_mask_dino.py:667
Functionget_language_model
(cfg, **kwargs)
semantic_sam/language/vlpencoder.py:184
Functionget_language_model
(cfg, **kwargs)
semantic_sam/language/encoder.py:131
Functionget_maskdino_encoder_deform
Build a pixel decoder from `cfg.MODEL.MASK_FORMER.PIXEL_DECODER_NAME`.
semantic_sam/body/encoder/encoder_deform.py:426
Methodget_output
Returns: output (VisImage): the image output containing the visualizations added to the image.
utils/visualizer.py:1276
Functionget_segmentation_model
(cfg, **kwargs)
semantic_sam/architectures/interactive_mask_dino.py:694
Functionget_swin_backbone
(cfg)
semantic_sam/backbone/swin.py:842
Methodget_text_embeddings
(self, class_names, name='default', is_eval=False, add_bgd=False, prompt=True, norm=True)
semantic_sam/language/vlpencoder.py:70
Methodget_text_embeddings
(self, class_names, name='default', is_eval=False, add_bgd=False, prompt=True, norm=True)
semantic_sam/language/encoder.py:54
Methodget_text_token_embeddings
(self, txts, name='default', token=False, norm=False)
semantic_sam/language/vlpencoder.py:127
Functionget_transformer_encoder_fpn
Build a pixel decoder from `cfg.MODEL.MASK_FORMER.PIXEL_DECODER_NAME`.
semantic_sam/body/encoder/transformer_encoder_fpn.py:312
Functionget_uncertain_point_coords_on_grid
Find `num_points` most uncertain points from `uncertainty_map` grid. Args: uncertainty_map (Tensor): A tensor of shape (N, 1, H, W)
semantic_sam/modules/point_features.py:121
Methodhas_holes
(self)
utils/visualizer.py:111
Functionhook_metadata
(metadata, name)
utils/misc.py:11
Functionhook_opt
(model, name)
utils/misc.py:16
Functioninference
(image,level=[0],*args, **kwargs)
demo_auto_generation.py:53
Functioninference
(image,text,text_part,text_thresh,*args, **kwargs)
demo.py:56
Functioninit_distributed_mode
(args)
utils/dist.py:19
Methodinit_weights
Initialize the weights in backbone. Args: pretrained (str, optional): Path to pre-trained weights. Defaults to No
semantic_sam/backbone/focal_dw.py:549
Methodinit_weights
Initialize the weights in backbone. Args: pretrained (str, optional): Path to pre-trained weights. Defaults to Non
semantic_sam/backbone/swin_new.py:635
Methodinit_weights
Initialize the weights in backbone. Args: pretrained (str, optional): Path to pre-trained weights. Defaults to No
semantic_sam/backbone/focal.py:452
Methodinit_weights
Initialize the weights in backbone. Args: pretrained (str, optional): Path to pre-trained weights. Defaults to Non
semantic_sam/backbone/swin.py:646
Functioninteractive_infer_image
(model, image,all_classes,all_parts, thresh,text_size,hole_scale,island_scale,semantic, refimg=None, reftxt=No
tasks/interactive_idino_m2m.py:17
Functioninteractive_infer_image
(model, image,level,all_classes,all_parts, thresh,text_size,hole_scale,island_scale,semantic, refimg=None, ref
tasks/interactive_idino_m2m_auto.py:21
Functionlang_encoder
(config_encoder, tokenizer, verbose, **kwargs)
semantic_sam/language/LangEncoder/transformer.py:210
Functionload_opt_command
(args)
utils/arguments.py:67
Methodloss_boxes
Compute the losses related to the bounding boxes, the L1 regression loss and the GIoU loss targets dicts must contain the key "boxes" conta
semantic_sam/modules/criterion_interactive_many_to_many.py:289
Methodloss_boxes
Compute the losses related to the bounding boxes, the L1 regression loss and the GIoU loss targets dicts must contain the key "boxes" conta
semantic_sam/modules/criterion_interactive_many_to_one.py:260
Methodloss_boxes_panoptic
Compute the losses related to the bounding boxes, the L1 regression loss and the GIoU loss targets dicts must contain the key "boxes" conta
semantic_sam/modules/criterion_interactive_many_to_one.py:288
Methodloss_labels
Classification loss (Binary focal loss) targets dicts must contain the key "labels" containing a tensor of dim [nb_target_boxes]
semantic_sam/modules/criterion_interactive_many_to_many.py:225
Methodloss_labels
Classification loss (Binary focal loss) targets dicts must contain the key "labels" containing a tensor of dim [nb_target_boxes]
semantic_sam/modules/criterion_interactive_many_to_one.py:189
Methodloss_labels_ce
Classification loss (NLL) targets dicts must contain the key "labels" containing a tensor of dim [nb_target_boxes]
semantic_sam/modules/criterion_interactive_many_to_many.py:170
Methodloss_labels_ce
Classification loss (NLL) targets dicts must contain the key "labels" containing a tensor of dim [nb_target_boxes]
semantic_sam/modules/criterion_interactive_many_to_one.py:171
Methodloss_labels_masked
Classification loss (Binary focal loss) targets dicts must contain the key "labels" containing a tensor of dim [nb_target_boxes]
semantic_sam/modules/criterion_interactive_many_to_many.py:195
Methodloss_labels_part
Classification loss (Binary focal loss) targets dicts must contain the key "labels" containing a tensor of dim [nb_target_boxes]
semantic_sam/modules/criterion_interactive_many_to_many.py:259
Methodloss_labels_part
Classification loss (Binary focal loss) targets dicts must contain the key "labels" containing a tensor of dim [nb_target_boxes]
semantic_sam/modules/criterion_interactive_many_to_one.py:226
Methodloss_masks
Compute the losses related to the masks: the focal loss and the dice loss. targets dicts must contain the key "masks" containing a tensor of d
semantic_sam/modules/criterion_interactive_many_to_many.py:322
Methodloss_masks
Compute the losses related to the masks: the focal loss and the dice loss. targets dicts must contain the key "masks" containing a tensor of d
semantic_sam/modules/criterion_interactive_many_to_one.py:313
Functionmain
(args=None)
train_net.py:393
Methodmask
(self)
utils/visualizer.py:99
Functionmasks_to_boxes
Compute the bounding boxes around the provided masks The masks should be in format [N, H, W] where N is the number of masks, (H, W) are the spati
semantic_sam/utils/box_ops.py:92
← previousnext →601–700 of 759, ranked by callers