Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/UX-Decoder/Semantic-SAM
/ functions
Functions
759 in github.com/UX-Decoder/Semantic-SAM
⨍
Functions
759
◇
Types & classes
112
↓ 1 callers
Function
check_forward_equal_with_pytorch_double
()
semantic_sam/body/encoder/ops/test.py:35
↓ 1 callers
Function
check_forward_equal_with_pytorch_float
()
semantic_sam/body/encoder/ops/test.py:51
↓ 1 callers
Function
check_gradient_numerical
(channels=4, grad_value=True, grad_sampling_loc=True, grad_attn_weight=True)
semantic_sam/body/encoder/ops/test.py:66
↓ 1 callers
Function
coco_encode_rle
(uncompressed_rle: Dict[str, Any])
utils/sam_utils/amg.py:294
↓ 1 callers
Method
compute_noc
(self)
datasets/evaluation/interactive_evaluation.py:103
↓ 1 callers
Function
convert_coco_poly_to_mask
(segmentations, height, width)
datasets/dataset_mappers/o365_instance_new_baseline_dataset_mapper.py:25
↓ 1 callers
Function
convert_coco_poly_to_mask
(segmentations, height, width)
datasets/dataset_mappers/coco_instance_new_baseline_dataset_mapper.py:21
↓ 1 callers
Method
draw_and_connect_keypoints
Draws keypoints of an instance and follows the rules for keypoint connections to draw lines between appropriate keypoints. This follo
utils/visualizer.py:799
↓ 1 callers
Method
draw_box
Args: box_coord (tuple): a tuple containing x0, y0, x1, y1 coordinates, where x0 and y0 are the coordinates of th
utils/visualizer.py:909
↓ 1 callers
Method
draw_circle
Args: circle_coord (list(int) or tuple(int)): contains the x and y coordinates of the center of the circle.
utils/visualizer.py:998
↓ 1 callers
Method
draw_panoptic_seg
Draw panoptic prediction annotations or results. Args: panoptic_seg (Tensor): of shape (height, width) where the values
utils/visualizer.py:483
↓ 1 callers
Method
draw_rotated_box_with_label
Draw a rotated box with label on its top-left corner. Args: rotated_box (tuple): a tuple containing (cnt_x, cnt_y, w, h,
utils/visualizer.py:943
↓ 1 callers
Method
draw_sem_seg
Draw semantic segmentation predictions/labels. Args: sem_seg (Tensor or ndarray): the segmentation of shape (H, W).
utils/visualizer.py:447
↓ 1 callers
Method
encode_json_sem_seg
Convert semantic segmentation to COCO stuff format with segments encoded as RLEs. See http://cocodataset.org/#format-results
datasets/evaluation/segmentation_evaluation.py:175
↓ 1 callers
Method
evaluate
Evaluates standard semantic segmentation metrics (http://cocodataset.org/#stuff-eval): * Mean intersection-over-union averaged acros
datasets/evaluation/segmentation_evaluation.py:115
↓ 1 callers
Method
evaluate_interactive
evaluate interactive segmentation on other datasets (i.e, coco)
semantic_sam/architectures/interactive_mask_dino.py:557
↓ 1 callers
Method
evaluate_interactive_granularity
evaluate multiple granualrity output on a subset of sam
semantic_sam/architectures/interactive_mask_dino.py:625
↓ 1 callers
Function
filter_empty_instances_by_box
( instances, by_box=True, by_mask=False, box_threshold=1e-5, return_mask=False )
datasets/dataset_mappers/part_data_filter_whole_new_instance_dataset_mapper.py:30
↓ 1 callers
Function
filter_empty_instances_by_box
( instances, by_box=True, by_mask=False, box_threshold=1e-5, return_mask=False )
datasets/dataset_mappers/pascal_instance_new_baseline_dataset_mapper.py:21
↓ 1 callers
Function
filter_empty_instances_by_box
( instances, by_box=True, by_mask=False, box_threshold=1e-5, return_mask=False )
datasets/dataset_mappers/coco_interactive_panoptic_new_baseline_dataset_mapper.py:21
↓ 1 callers
Function
filter_empty_instances_by_box
( instances, by_box=True, by_mask=False, box_threshold=1e-5, return_mask=False )
datasets/dataset_mappers/mask_former_instance_dataset_mapper.py:19
↓ 1 callers
Function
filter_images_with_only_crowd_annotations
Filter out images with none annotations or only crowd annotations (i.e., images without non-crowd annotations). A common training-time pr
datasets/build.py:79
↓ 1 callers
Method
forward
(self, x)
semantic_sam/backbone/focal_dw.py:36
↓ 1 callers
Method
forward
(self, x)
semantic_sam/backbone/swin_new.py:35
↓ 1 callers
Method
forward
(self, x)
semantic_sam/backbone/focal.py:36
↓ 1 callers
Method
forward
(self, x)
semantic_sam/backbone/swin.py:40
↓ 1 callers
Method
forward_features
(self, features)
semantic_sam/body/encoder/transformer_encoder_fpn.py:123
↓ 1 callers
Method
forward_features
(self, features)
semantic_sam/body/encoder/transformer_encoder_fpn.py:276
↓ 1 callers
Method
forward_ffn
(self, src)
semantic_sam/body/encoder/encoder_deform.py:127
↓ 1 callers
Method
forward_ffn
(self, tgt)
semantic_sam/body/decoder/utils/dino_decoder.py:235
↓ 1 callers
Method
forward_language_token
(self, texts, norm=False)
semantic_sam/language/vlpencoder.py:156
↓ 1 callers
Method
forward_post
( self, src, src_mask: Optional[Tensor] = None, src_key_padding_mask: Optional
semantic_sam/body/transformer_blocks.py:182
↓ 1 callers
Method
forward_post
( self, tgt, memory, tgt_mask: Optional[Tensor] = None, memory_mask: O
semantic_sam/body/transformer_blocks.py:262
↓ 1 callers
Method
forward_post
(self, tgt, tgt_mask: Optional[Tensor] = None, tgt_key_padding_mask:
semantic_sam/body/decoder/modules.py:35
↓ 1 callers
Method
forward_post
(self, tgt, memory, memory_mask: Optional[Tensor] = None, memory_key
semantic_sam/body/decoder/modules.py:93
↓ 1 callers
Method
forward_post
(self, tgt)
semantic_sam/body/decoder/modules.py:157
↓ 1 callers
Method
forward_pre
( self, src, src_mask: Optional[Tensor] = None, src_key_padding_mask: Optional
semantic_sam/body/transformer_blocks.py:201
↓ 1 callers
Method
forward_pre
( self, tgt, memory, tgt_mask: Optional[Tensor] = None, memory_mask: O
semantic_sam/body/transformer_blocks.py:293
↓ 1 callers
Method
forward_pre
(self, tgt, tgt_mask: Optional[Tensor] = None, tgt_key_padding_mask: O
semantic_sam/body/decoder/modules.py:47
↓ 1 callers
Method
forward_pre
(self, tgt, memory, memory_mask: Optional[Tensor] = None, memory_key_p
semantic_sam/body/decoder/modules.py:106
↓ 1 callers
Method
forward_pre
(self, tgt)
semantic_sam/body/decoder/modules.py:163
↓ 1 callers
Method
forward_seg
Args: batched_inputs: a list, batched outputs of :class:`DatasetMapper`. Each item in the list contains the input
semantic_sam/architectures/interactive_mask_dino.py:377
↓ 1 callers
Method
from_config
(cls, cfg, input_shape: Dict[str, ShapeSpec])
semantic_sam/body/encoder/transformer_encoder_fpn.py:112
↓ 1 callers
Function
gen_sineembed_for_position
(pos_tensor, dim=128)
semantic_sam/body/decoder/utils/utils.py:74
↓ 1 callers
Method
generate
Generates masks for the given image. Arguments: image (np.ndarray): The image to generate masks for, in HWC uint8 format.
tasks/automatic_mask_generator.py:156
↓ 1 callers
Function
generate_crop_boxes
Generates a list of crop boxes of different sizes. Each layer has (2**i)**2 boxes for the ith layer.
utils/sam_utils/amg.py:200
↓ 1 callers
Function
generate_lineidx
(filein, idxout)
datasets/utils/tsv/io_common.py:49
↓ 1 callers
Function
get_extensions
()
semantic_sam/body/encoder/ops/setup.py:26
↓ 1 callers
Function
get_lvis_instances_meta_v1
()
datasets/registration/register_lvis_eval.py:32
↓ 1 callers
Function
get_metadata
()
datasets/registration/register_scannet_panoptic.py:144
↓ 1 callers
Function
get_metadata
()
datasets/registration/register_coco_panoptic_annos_caption_grounding.py:52
↓ 1 callers
Function
get_metadata
()
datasets/registration/register_coco_panoptic_annos_caption.py:38
↓ 1 callers
Function
get_metadata
(name)
datasets/registration/register_vlp_datasets.py:33
↓ 1 callers
Function
get_metadata
()
datasets/registration/register_refcoco_dataset.py:42
↓ 1 callers
Function
get_metadata
()
datasets/registration/register_coco_panoptic_annos_semseg_interactive.py:31
↓ 1 callers
Function
get_metadata
()
datasets/registration/register_coco_panoptic_annos_caption_grounding_interactive.py:52
↓ 1 callers
Function
get_metadata
()
datasets/registration/register_coco_panoptic_annos_semseg_interactive_jointboxpoint.py:31
↓ 1 callers
Function
get_metadata
()
datasets/registration/register_bdd100k_panoseg.py:215
↓ 1 callers
Function
get_metadata
()
datasets/registration/register_ade20k_panoptic.py:326
↓ 1 callers
Function
get_metadata
()
datasets/registration/register_coco_panoptic_annos_semseg.py:31
↓ 1 callers
Function
get_metadata
()
datasets/registration/register_coco_panoptic_annos_caption_interactive.py:38
↓ 1 callers
Function
get_o365_metadata
()
datasets/registration/register_object365_od.py:31
↓ 1 callers
Function
get_point_coords_wrt_image
Convert box-normalized [0, 1] x [0, 1] point cooordinates to image-level coordinates. Args: boxes_coords (Tensor): A tensor of shape
semantic_sam/modules/point_features.py:194
↓ 1 callers
Method
get_reference_points
(spatial_shapes, valid_ratios, device)
semantic_sam/body/encoder/encoder_deform.py:152
↓ 1 callers
Method
get_valid_ratio
(self, mask)
semantic_sam/body/encoder/encoder_deform.py:57
↓ 1 callers
Method
get_valid_ratio
(self, mask)
semantic_sam/body/decoder/interactive_mask_dino.py:470
↓ 1 callers
Function
hook_switcher
(model, name)
utils/misc.py:23
↓ 1 callers
Method
instance_masks
(self)
utils/visualizer.py:220
↓ 1 callers
Method
interactive_forward_prediction_heads
(self, output, mask_features, pred_mask=True)
semantic_sam/body/decoder/interactive_mask_dino.py:611
↓ 1 callers
Function
iou_score_loss
(inputs, targets)
semantic_sam/modules/criterion_interactive_many_to_many.py:53
↓ 1 callers
Function
iou_score_loss
(inputs, targets)
semantic_sam/modules/criterion_interactive_many_to_one.py:72
↓ 1 callers
Function
is_box_near_crop_edge
Filter masks at the edge of a crop, but not at the edge of the original image.
utils/sam_utils/amg.py:78
↓ 1 callers
Function
is_lang_encoder
(model_name)
semantic_sam/language/LangEncoder/registry.py:17
↓ 1 callers
Function
is_model
(model_name)
semantic_sam/backbone/registry.py:13
↓ 1 callers
Function
is_model
(model_name)
semantic_sam/language/registry.py:12
↓ 1 callers
Function
is_model
(model_name)
semantic_sam/architectures/registry.py:12
↓ 1 callers
Function
is_model
(model_name)
semantic_sam/body/registry.py:13
↓ 1 callers
Function
is_model
(model_name)
semantic_sam/body/encoder/registry.py:12
↓ 1 callers
Function
is_model
(model_name)
semantic_sam/body/decoder/registry.py:12
↓ 1 callers
Function
lang_encoders
(model_name)
semantic_sam/language/LangEncoder/registry.py:13
↓ 1 callers
Method
layers
(self, features, mask=None,targets=None, target_queries=None, target_vlp=None, prediction_switch=None, task='s
semantic_sam/body/general_head.py:98
↓ 1 callers
Function
load_ade20k_panoptic_json
Args: image_dir (str): path to the raw dataset. e.g., "~/coco/train2017". gt_dir (str): path to the raw annotations. e.g., "~/coc
datasets/registration/register_ade20k_panoptic.py:217
↓ 1 callers
Function
load_bdd_instances
Load BDD annotations to Detectron2 format. Args: dirname: Contain "Annotations", "ImageSets", "JPEGImages" split (str): one
datasets/registration/register_bdd100k_semseg.py:21
↓ 1 callers
Function
load_bdd_panoptic_json
Args: image_dir (str): path to the raw dataset. e.g., "~/coco/train2017". gt_dir (str): path to the raw annotations. e.g., "~/coc
datasets/registration/register_bdd100k_panoseg.py:116
↓ 1 callers
Function
load_coco_panoptic_json
Args: image_dir (str): path to the raw dataset. e.g., "~/coco/train2017". gt_dir (str): path to the raw annotations. e.g., "~/coc
datasets/registration/register_coco_panoptic_annos_caption_grounding.py:96
↓ 1 callers
Function
load_coco_panoptic_json
Args: image_dir (str): path to the raw dataset. e.g., "~/coco/train2017". gt_dir (str): path to the raw annotations. e.g., "~/coc
datasets/registration/register_coco_panoptic_annos_caption.py:82
↓ 1 callers
Function
load_coco_panoptic_json
Args: image_dir (str): path to the raw dataset. e.g., "~/coco/train2017". gt_dir (str): path to the raw annotations. e.g., "~/coc
datasets/registration/register_coco_panoptic_annos_semseg_interactive.py:75
↓ 1 callers
Function
load_coco_panoptic_json
Args: image_dir (str): path to the raw dataset. e.g., "~/coco/train2017". gt_dir (str): path to the raw annotations. e.g., "~/coc
datasets/registration/register_coco_panoptic_annos_caption_grounding_interactive.py:96
↓ 1 callers
Function
load_coco_panoptic_json
Args: image_dir (str): path to the raw dataset. e.g., "~/coco/train2017". gt_dir (str): path to the raw annotations. e.g., "~/coc
datasets/registration/register_coco_panoptic_annos_semseg_interactive_jointboxpoint.py:75
↓ 1 callers
Function
load_coco_panoptic_json
Args: image_dir (str): path to the raw dataset. e.g., "~/coco/train2017". gt_dir (str): path to the raw annotations. e.g., "~/coc
datasets/registration/register_coco_panoptic_annos_semseg.py:75
↓ 1 callers
Function
load_coco_panoptic_json
Args: image_dir (str): path to the raw dataset. e.g., "~/coco/train2017". gt_dir (str): path to the raw annotations. e.g., "~/coc
datasets/registration/register_coco_panoptic_annos_caption_interactive.py:82
↓ 1 callers
Function
load_imagenet_images
Load ImageNet annotations to Detectron2 format. Args: dirname: Contain "Annotations", "ImageSets", "JPEGImages" split (str):
datasets/registration/register_imagenet_cls.py:22
↓ 1 callers
Function
load_lvis_json
Args: image_dir (str): path to the raw dataset. e.g., "~/coco/train2017". gt_dir (str): path to the raw annotations. e.g., "~/coc
datasets/registration/register_lvis_eval.py:71
↓ 1 callers
Function
load_object365_json
Args: image_dir (str): path to the raw dataset. e.g., "~/coco/train2017". gt_dir (str): path to the raw annotations. e.g., "~/coc
datasets/registration/register_object365_od.py:46
↓ 1 callers
Function
load_opt_from_config_files
Load opt from the config files, settings in later files can override those in previous files. Args: conf_files (list): a list of con
utils/arguments.py:47
↓ 1 callers
Function
load_pretrain_arrows
Args: image_dir (str): path to the raw dataset. e.g., "~/coco/train2017". Returns: list[dict]: a list of dicts in Detectron2
datasets/registration/register_vlp_datasets.py:40
↓ 1 callers
Function
load_pretrain_data
(arrow_root, meta, name, pretrain_arrows)
datasets/registration/register_vlp_datasets.py:57
↓ 1 callers
Method
load_pretrained
(self, pretrained='', pretrained_layers=[], verbose=True)
semantic_sam/language/LangEncoder/transformer.py:142
↓ 1 callers
Function
load_refcoco_json
Args: image_dir (str): path to the raw dataset. e.g., "~/coco/train2017". gt_dir (str): path to the raw annotations. e.g., "~/coc
datasets/registration/register_refcoco_dataset.py:47
↓ 1 callers
Function
load_sam_index
Load a json file with COCO's instances annotation format. Currently supports instance detection, instance segmentation, and person keypoi
datasets/registration/register_sam.py:62
← previous
next →
201–300 of 759, ranked by callers