MCPcopy Create free account

hub / github.com/MiliLab/UniGeoSeg / functions

Functions763 in github.com/MiliLab/UniGeoSeg

↓ 2 callersMethod_get_maskmem_pos_enc
`maskmem_pos_enc` is the same across frames and objects, so we cache it as a constant in the inference session to reduce session stor
unigeoseg/model/multimodal_encoder/sam2/sam2_video_predictor.py:841
↓ 2 callersMethod_get_src_permutation_idx
(self, indices)
unigeoseg/model/mask_decoder/mask_criterion/pretrain_criterion.py:254
↓ 2 callersMethod_get_src_permutation_idx
(self, indices)
unigeoseg/model/mask_decoder/Mask2Former_Simplify/utils/criterion.py:224
↓ 2 callersFunction_hf_download
(model_id)
unigeoseg/model/multimodal_encoder/sam2/build_sam.py:144
↓ 2 callersFunction_load_checkpoint
(model, ckpt_path)
unigeoseg/model/multimodal_encoder/sam2/build_sam.py:164
↓ 2 callersFunction_load_img_as_tensor
(img_path, image_size)
unigeoseg/model/multimodal_encoder/sam2/utils/misc.py:92
↓ 2 callersMethod_load_lazy
Load an attribute and add it to self, if it isn't already loaded. :param attr_name: The name of the attribute to be loaded. :
unigeoseg/model/mask_decoder/Mask2Former_Simplify/dataset/NuImages/nuimages.py:134
↓ 2 callersMethod_make_layer
(self, block, planes, blocks, stride=1, dcn=None)
unigeoseg/model/multimodal_projector/builder.py:189
↓ 2 callersMethod_make_layer
(self, block, planes, blocks,norm_shape, stride=1, dcn=None)
unigeoseg/model/multimodal_projector/builder.py:244
↓ 2 callersMethod_make_layer
(self, block, planes, blocks, stride=1, dcn=None)
unigeoseg/model/multimodal_projector/builder.py:297
↓ 2 callersFunction_max_by_axis
(the_list)
unigeoseg/model/mask_decoder/Mask2Former_Simplify/utils/misc.py:22
↓ 2 callersFunction_onnx_nested_tensor_from_tensor_list
(tensor_list: List[Tensor])
unigeoseg/model/mask_decoder/Mask2Former_Simplify/utils/misc.py:112
↓ 2 callersMethod_pe
(self, B, device, *cache_key)
unigeoseg/model/multimodal_encoder/sam2/modeling/position_encoding.py:90
↓ 2 callersMethod_pe_encoding
Positionally encode points that are normalized to [0,1].
unigeoseg/model/multimodal_encoder/sam2/modeling/position_encoding.py:147
↓ 2 callersMethod_prep_prompts
( self, point_coords, point_labels, box, mask_logits, normalize_coords, img_idx=-1 )
unigeoseg/model/multimodal_encoder/sam2/sam2_image_predictor.py:305
↓ 2 callersMethod_recombine_heads
(self, x: Tensor)
unigeoseg/model/multimodal_encoder/sam2/modeling/sam/transformer.py:225
↓ 2 callersMethod_reset_tracking_results
Reset all tracking inputs and results across the videos.
unigeoseg/model/multimodal_encoder/sam2/sam2_video_predictor_legacy.py:860
↓ 2 callersMethod_set_aux_loss
(self, outputs_SEG_class, outputs_class_name_class, outputs_seg_masks)
unigeoseg/model/mask_decoder/Mask2Former_Simplify/modeling/transformer_decoder/mask2former_transformer_decoder.py:781
↓ 2 callersMethodadd_new_points_or_box
Add new points to a frame.
unigeoseg/model/multimodal_encoder/sam2/sam2_video_predictor.py:161
↓ 2 callersFunctionauto_upgrade
(config)
unigeoseg/model/utils.py:4
↓ 2 callersFunctionbatch_iterator
(batch_size: int, *args)
unigeoseg/model/multimodal_encoder/sam2/utils/amg.py:100
↓ 2 callersFunctionbatched_mask_to_box
Calculates boxes in XYXY format around masks. Return [0,0,0,0] for an empty mask. For input shape C1xC2x...xHxW, the output shape is C1xC2x..
unigeoseg/model/multimodal_encoder/sam2/utils/amg.py:305
↓ 2 callersFunctionbox_xyxy_to_xywh
(box_xyxy: torch.Tensor)
unigeoseg/model/multimodal_encoder/sam2/utils/amg.py:93
↓ 2 callersFunctionbuild_sam2_hf
(model_id, **kwargs)
unigeoseg/model/multimodal_encoder/sam2/build_sam.py:152
↓ 2 callersFunctionbuild_sam2_video_predictor
( config_file, ckpt_path=None, device="cuda", mode="eval", hydra_overrides_extra=[], a
unigeoseg/model/multimodal_encoder/sam2/build_sam.py:100
↓ 2 callersFunctionbuild_sam2_video_predictor_hf
(model_id, **kwargs)
unigeoseg/model/multimodal_encoder/sam2/build_sam.py:157
↓ 2 callersFunctioncalculate_stability_score
Computes the stability score for a batch of masks. The stability score is the IoU between the binary masks obtained by thresholding the p
unigeoseg/model/multimodal_encoder/sam2/utils/amg.py:158
↓ 2 callersMethodcheck_sweeps
Check that the sweeps folder was downloaded if required. :param filename: The filename of the sample_data.
unigeoseg/model/mask_decoder/Mask2Former_Simplify/dataset/NuImages/nuimages.py:191
↓ 2 callersMethodconcat_image_seg_embeds
(self, input_id, img_feature, label, seg_query, seg_query_mask, refer_embe
unigeoseg/model/language_model/llava_phi.py:464
↓ 2 callersFunctionconcat_points
Add new points and labels to previous point inputs (add at the end).
unigeoseg/model/multimodal_encoder/sam2/utils/misc.py:341
↓ 2 callersFunctionconv3x3
3x3 convolution with padding
unigeoseg/model/mask_decoder/Mask2Former_Simplify/modeling/backbone/resnet.py:28
↓ 2 callersFunctioncrop_len
(orig_len, n_crops, overlap)
unigeoseg/model/multimodal_encoder/sam2/utils/amg.py:217
↓ 2 callersFunctiondo_pool
(x: torch.Tensor, pool: nn.Module, norm: nn.Module = None)
unigeoseg/model/multimodal_encoder/hieradet.py:33
↓ 2 callersFunctiondo_pool
(x: torch.Tensor, pool: nn.Module, norm: nn.Module = None)
unigeoseg/model/multimodal_encoder/sam2/modeling/backbones/hieradet.py:25
↓ 2 callersMethodembed_refer_ids
(self, refer_ids)
unigeoseg/model/language_model/llava_phi.py:459
↓ 2 callersMethodencode_images
(self, images)
unigeoseg/model/llava_arch.py:58
↓ 2 callersMethodeval_seg
( self, input_ids: Optional[torch.LongTensor] = None, attention_mask: Optional[torch.T
unigeoseg/model/language_model/llava_phi.py:1209
↓ 2 callersFunctionfill_holes_in_mask_scores
A post processor to fill small holes in mask scores with area under `max_area`.
unigeoseg/model/multimodal_encoder/sam2/utils/misc.py:312
↓ 2 callersMethodforward
(self, img_list=None)
unigeoseg/model/mask_decoder/Mask2Former_Simplify/Segmentation.py:134
↓ 2 callersMethodforward_prediction_heads
(self, output, mask_features, attn_mask_target_size)
unigeoseg/model/mask_decoder/Mask2Former_Simplify/modeling/transformer_decoder/mask2former_transformer_decoder.py:361
↓ 2 callersMethodforward_with_coords
Positionally encode points that are not normalized to [0,1].
unigeoseg/model/multimodal_encoder/sam2/modeling/position_encoding.py:169
↓ 2 callersMethodfromfile
(filename)
unigeoseg/model/mask_decoder/Mask2Former_Simplify/configs/config.py:72
↓ 2 callersMethodfromfile
(filename)
unigeoseg/mask_config/config.py:72
↓ 2 callersMethodgetMask
(self, ref_id)
unigeoseg/eval_and_test/refer.py:279
↓ 2 callersMethodget_SEG_embedding
(self, hidden_states, refer_embedding_indices, return_all=False, prompt_type='reason')
unigeoseg/model/language_model/llava_phi.py:865
↓ 2 callersFunctionget_clones
(module, N)
unigeoseg/model/multimodal_encoder/sam2/modeling/sam2_utils.py:88
↓ 2 callersMethodget_img_ratio
(self, img_size, target_size)
unigeoseg/model/mask_decoder/Mask2Former_Simplify/Segmentation.py:71
↓ 2 callersMethodget_loss
(self, loss, outputs, targets, indices, num_masks)
unigeoseg/model/mask_decoder/mask_criterion/pretrain_criterion.py:272
↓ 2 callersMethodget_loss
(self, loss, outputs, targets, indices, num_masks)
unigeoseg/model/mask_decoder/Mask2Former_Simplify/utils/criterion.py:242
↓ 2 callersMethodget_prompt
(self)
unigeoseg/conversation.py:29
↓ 2 callersMethodget_sample_content
For a given sample, return all the sample_datas in chronological order. :param sample_token: Sample token. :return: A list of
unigeoseg/model/mask_decoder/Mask2Former_Simplify/dataset/NuImages/nuimages.py:435
↓ 2 callersMethodget_seg_query
(self, hidden_states, seg_query_masks)
unigeoseg/model/language_model/llava_phi.py:1190
↓ 2 callersMethodget_segmentation
Produces two segmentation masks as numpy arrays of size H x W each, where H and W are the height and width of the camera image respec
unigeoseg/model/mask_decoder/Mask2Former_Simplify/dataset/NuImages/nuimages.py:541
↓ 2 callersFunctionget_uncertain_point_coords_with_randomness
Sample points in [0, 1] x [0, 1] coordinate space based on their uncertainty. The unceratinties are calculated for each point using 'unce
unigeoseg/model/mask_decoder/Mask2Former_Simplify/utils/point_features.py:29
↓ 2 callersMethodget_vision_tower_feature
(self, images)
unigeoseg/model/language_model/llava_phi.py:290
↓ 2 callersFunctionis_dist_avail_and_initialized
()
unigeoseg/model/mask_decoder/Mask2Former_Simplify/utils/misc.py:141
↓ 2 callersFunctionload_parallal_model
(model, state_dict_)
unigeoseg/model/mask_decoder/Mask2Former_Simplify/utils/misc.py:148
↓ 2 callersFunctionload_video_frames
Load the video frames from video_path. The frames are resized to image_size as in the model and are loaded to GPU if offload_video_to_cpu=Fal
unigeoseg/model/multimodal_encoder/sam2/utils/misc.py:172
↓ 2 callersFunctionmask_to_rle_pytorch
Encodes masks to an uncompressed RLE, in the format expected by pycoco tools.
unigeoseg/model/multimodal_encoder/sam2/utils/amg.py:109
↓ 2 callersFunctionname_to_index_mapping
Build a mapping from name to index to look up index in O(1) time. :param category: The nuImages category table. :return: The mapping from
unigeoseg/model/mask_decoder/Mask2Former_Simplify/dataset/NuImages/utils.py:76
↓ 2 callersFunctionnested_tensor_from_tensor_list
(tensor_list: List[Tensor])
unigeoseg/model/mask_decoder/Mask2Former_Simplify/utils/misc.py:85
↓ 2 callersFunctionplt_box_on_img
(ax, box, fill=False, alpha=0.5, color='r', linestyle='-')
unigeoseg/model/mask_decoder/Mask2Former_Simplify/dataset/aug_strategy.py:100
↓ 2 callersMethodprepare_inputs_labels_for_multimodal
( self, input_ids, attention_mask, past_key_values, labels, images, token_refer_id=Non
unigeoseg/model/language_model/llava_phi.py:687
↓ 2 callersFunctionremove_small_regions
Removes small disconnected regions and holes in a mask. Returns the mask and an indicator of if the mask has been modified.
unigeoseg/model/multimodal_encoder/sam2/utils/amg.py:269
↓ 2 callersMethodrender_predict
:param img: 原始图片 :param mask: 网络输出,格式:[h, w]
unigeoseg/model/mask_decoder/Mask2Former_Simplify/dataset/NuImages/nuimages.py:609
↓ 2 callersMethodresize_padding
(self, img, outsize, Interpolation=Image.BILINEAR)
unigeoseg/model/mask_decoder/Mask2Former_Simplify/dataset/dataset.py:105
↓ 2 callersFunctionrle_to_mask
Compute a binary mask from an uncompressed RLE.
unigeoseg/model/multimodal_encoder/sam2/utils/amg.py:140
↓ 2 callersMethodround2nearest_multiple
(self, x, p)
unigeoseg/model/mask_decoder/Mask2Former_Simplify/Segmentation.py:68
↓ 2 callersMethodround2nearest_multiple
(self, x, p)
unigeoseg/model/mask_decoder/Mask2Former_Simplify/dataset/dataset.py:92
↓ 2 callersFunctionuncrop_boxes_xyxy
(boxes: torch.Tensor, crop_box: List[int])
unigeoseg/model/multimodal_encoder/sam2/utils/amg.py:239
↓ 2 callersFunctionwindow_partition
Args: x: (B, H, W, C) window_size (int): window size Returns: windows: (num_windows*B, window_size, window_siz
unigeoseg/model/multimodal_encoder/swin_trans.py:37
↓ 2 callersFunctionwindow_partition
Partition into non-overlapping windows with padding if needed. Args: x (tensor): input tokens with [B, H, W, C]. window_size
unigeoseg/model/multimodal_encoder/sam2/modeling/backbones/utils.py:16
↓ 2 callersFunctionwindow_partition
Args: x: (B, H, W, C) window_size (int): window size Returns: windows: (num_windows*B, window_size, window_size, C)
unigeoseg/model/mask_decoder/Mask2Former_Simplify/modeling/backbone/swin.py:45
↓ 2 callersFunctionwindow_unpartition
Window unpartition into original sequences and removing padding. Args: x (tensor): input tokens with [B * num_windows, window_size, w
unigeoseg/model/multimodal_encoder/sam2/modeling/backbones/utils.py:39
↓ 2 callersMethodwith_pos_embed
(self, tensor, pos: Optional[Tensor])
unigeoseg/model/mask_decoder/Mask2Former_Simplify/modeling/transformer_decoder/transformer.py:179
↓ 2 callersMethodwith_pos_embed
(self, tensor, pos: Optional[Tensor])
unigeoseg/model/mask_decoder/Mask2Former_Simplify/modeling/transformer_decoder/mask2former_transformer_decoder.py:32
↓ 1 callersFunctionFeedForward
(dim, mult=4)
unigeoseg/model/language_model/projector.py:9
↓ 1 callersMethod__enter__
(self)
unigeoseg/model/mask_decoder/Mask2Former_Simplify/utils/summary.py:113
↓ 1 callersMethod__getattr__
(self, name)
unigeoseg/model/mask_decoder/Mask2Former_Simplify/configs/config.py:137
↓ 1 callersMethod__getattr__
(self, name)
unigeoseg/mask_config/config.py:137
↓ 1 callersMethod__init__
(self, hidden_size=2048, num_latents=8, enable_adaptive=True)
unigeoseg/model/language_model/lightweight_text_vision_fusion.py:79
↓ 1 callersMethod__init__
(self, dim, dim_head=64, heads=8, enable_dynamic=True)
unigeoseg/model/language_model/lightweight_dynamic_attention.py:15
↓ 1 callersMethod__init__
(self, dim=512, depth=3, dim_head=64, heads=8, ff_mult=4)
unigeoseg/model/language_model/projector.py:62
↓ 1 callersMethod__init__
( self, fill_hole_area=0, # whether to apply non-overlapping constraints on the output
unigeoseg/model/multimodal_encoder/sam2/sam2_video_predictor.py:22
↓ 1 callersMethod__init__
( self, d_model: int, pos_enc_at_input: bool, layer: nn.Module, num_la
unigeoseg/model/multimodal_encoder/sam2/modeling/memory_attention.py:103
↓ 1 callersMethod__init__
( self, num_pos_feats, temperature: int = 10000, normalize: bool = True,
unigeoseg/model/multimodal_encoder/sam2/modeling/position_encoding.py:22
↓ 1 callersMethod__init__
Initialize the neck :param trunk: the backbone :param position_encoding: the positional encoding to use :param d_model: the di
unigeoseg/model/multimodal_encoder/sam2/modeling/backbones/image_encoder.py:52
↓ 1 callersMethod__init__
(self, cfg, input_shape)
unigeoseg/model/mask_decoder/Mask2Former_Simplify/modeling/MaskFormerModel.py:24
↓ 1 callersMethod__init__
(self, input_dim, hidden_dim, output_dim, num_layers)
unigeoseg/model/mask_decoder/Mask2Former_Simplify/modeling/transformer_decoder/maskformer_transformer_decoder.py:112
↓ 1 callersMethod__init__
(self, num_classes, alpha=0.5, gamma=2, weight=None, ignore_index=0)
unigeoseg/model/mask_decoder/Mask2Former_Simplify/utils/criterion.py:342
↓ 1 callersMethod_build_sam_heads
Build SAM-style prompt encoder and mask decoder.
unigeoseg/model/multimodal_encoder/sam2/modeling/sam2_base.py:207
↓ 1 callersMethod_compile_all_components
(self)
unigeoseg/model/multimodal_encoder/sam2/sam2_video_predictor.py:983
↓ 1 callersFunction_create_gradient_clipper
Creates gradient clipping closure to clip by value or by norm, according to the provided config.
unigeoseg/model/mask_decoder/Mask2Former_Simplify/utils/solver.py:21
↓ 1 callersMethod_dynamic_multimask_via_stability
When outputting a single mask, if the stability score from the current single-mask output (based on output token 0) falls below a thr
unigeoseg/model/multimodal_encoder/sam2/modeling/sam/mask_decoder.py:259
↓ 1 callersMethod_embed_boxes
Embeds box prompts.
unigeoseg/model/multimodal_encoder/sam2/modeling/sam/prompt_encoder.py:123
↓ 1 callersMethod_embed_masks
Embeds mask inputs.
unigeoseg/model/multimodal_encoder/sam2/modeling/sam/prompt_encoder.py:134
↓ 1 callersMethod_embed_points
Embeds point prompts.
unigeoseg/model/multimodal_encoder/sam2/modeling/sam/prompt_encoder.py:79
↓ 1 callersMethod_encode_memory_in_output
( self, current_vision_feats, feat_sizes, point_inputs, run_mem_encode
unigeoseg/model/multimodal_encoder/sam2/modeling/sam2_base.py:789
↓ 1 callersMethod_encode_new_memory
Identical to the corresponding method in the parent (SAM2VideoPredictor), but cloning the memories and their pos enc to enable compil
unigeoseg/model/multimodal_encoder/sam2/sam2_video_predictor.py:1171
↓ 1 callersMethod_forward_ca
(self, tgt, memory, query_pos, pos, num_k_exclude_rope=0)
unigeoseg/model/multimodal_encoder/sam2/modeling/memory_attention.py:66
← previousnext →101–200 of 763, ranked by callers