MCPcopy Create free account

hub / github.com/JIA-Lab-research/VisionReasoner / functions

Functions358 in github.com/JIA-Lab-research/VisionReasoner

↓ 13 callersFunctionapply_distortion
Applies radial or OpenCV distortion to the given 2D points. Args: extra_params (torch.Tensor or numpy.ndarray): Distortion parameter
vision_reasoner/models/vggt/dependency/distortion.py:99
↓ 12 callersMethod_generate_model_output
Generate raw model output for images and instructions Args: images (PIL.Image or List[PIL.Image]): Input image(s
vision_reasoner/models/visurf_model.py:246
↓ 10 callersMethod_generate_model_output
Generate raw model output for images and instructions Args: images (PIL.Image or List[PIL.Image]): Input image(s
vision_reasoner/models/vision_reasoner_model.py:223
↓ 8 callersMethodextract_bbox_points_think
Extract bounding boxes, points, and thinking process from model output Args: output_text (str): Raw output text
vision_reasoner/models/vision_reasoner_model.py:113
↓ 8 callersMethodextract_bbox_points_think
Extract bounding boxes, points, and thinking process from model output Args: output_text (str): Raw output text
vision_reasoner/models/visurf_model.py:117
↓ 7 callersFunction_ensure_torch
Convert input to torch tensor if it's not already one.
vision_reasoner/models/vggt/dependency/distortion.py:22
↓ 5 callersMethoddetect_objects_yolo
Detect objects in an image based on a query using YOLO model Args: image: Input image query: Text qu
vision_reasoner/models/vision_reasoner_model.py:361
↓ 5 callersMethoddetect_objects_yolo
Detect objects in an image based on a query using YOLO model Args: image: Input image query: Text qu
vision_reasoner/models/visurf_model.py:388
↓ 5 callersMethodif_yolo_condition
Check if YOLO should be used for the given query Args: query (str): Text query describing what to detect
vision_reasoner/models/vision_reasoner_model.py:404
↓ 5 callersMethodif_yolo_condition
Check if YOLO should be used for the given query Args: query (str): Text query describing what to detect
vision_reasoner/models/visurf_model.py:431
↓ 4 callersFunction_bilinear_intepolate
(x, stride, H, W)
vision_reasoner/models/vggt/dependency/track_modules/blocks.py:151
↓ 4 callersFunction_make_fusion_block
(features: int, size: int = None, has_residual: bool = True, groups: int = 1)
vision_reasoner/models/vggt/heads/dpt_head.py:299
↓ 4 callersMethod_make_layer
(self, dim, stride=1)
vision_reasoner/models/vggt/dependency/track_modules/blocks.py:58
↓ 4 callersMethodgenerate_response
Generate response from the model Args: image (PIL.Image): Input image prompt (str): Text prompt
vision_reasoner/models/qwen_vl_cot.py:154
↓ 4 callersMethodgenerate_response
Generate response from the model Args: image (PIL.Image): Input image prompt (str): Text prompt
vision_reasoner/models/qwen_vl.py:121
↓ 4 callersMethodprepare_tokens_with_masks
(self, x, masks=None)
vision_reasoner/models/vggt/layers/vision_transformer.py:214
↓ 3 callersMethod__init__
( self, in_features, hidden_features=None, out_features=None, act_laye
vision_reasoner/models/vggt/heads/track_modules/modules.py:100
↓ 3 callersMethod__init__
(self, fmaps, num_levels=4, radius=4, multiple_track_feats=False, padding_mode="zeros")
vision_reasoner/models/vggt/dependency/track_modules/blocks.py:265
↓ 3 callersMethod__init__
( self, in_features, hidden_features=None, out_features=None, act_laye
vision_reasoner/models/vggt/dependency/track_modules/modules.py:100
↓ 3 callersMethod_forward_impl
Implementation of the forward pass through the DPT head. This method processes a specific chunk of frames from the sequence.
vision_reasoner/models/vggt/heads/dpt_head.py:172
↓ 3 callersFunctionbase_pose_act
Apply basic activation function to pose parameters. Args: pose_enc: Tensor containing encoded pose parameters act_type: Acti
vision_reasoner/models/vggt/heads/head_act.py:38
↓ 3 callersMethodextract_json_from_response
Extract JSON content from model response using triple quotes Args: response_text (str): Model response text
vision_reasoner/models/qwen_vl_cot.py:111
↓ 3 callersMethodextract_json_from_response
Extract JSON content from model response using triple quotes Args: response_text (str): Model response text
vision_reasoner/models/qwen_vl.py:82
↓ 3 callersFunctioninverse_log_transform
Apply inverse log transform: sign(y) * (exp(|y|) - 1) Args: y: Input tensor Returns: Transformed tensor
vision_reasoner/models/vggt/heads/head_act.py:115
↓ 2 callersMethod__init__
( self, dim_in: int, patch_size: int = 14, output_dim: int = 4, activa
vision_reasoner/models/vggt/heads/dpt_head.py:43
↓ 2 callersMethod_apply_1d_rope
Applies 1D rotary position embeddings along one dimension. Args: tokens: Input token features. positions: Position in
vision_reasoner/models/vggt/layers/rope.py:133
↓ 2 callersMethod_apply_pos_embed
Apply positional embedding to tensor x.
vision_reasoner/models/vggt/heads/dpt_head.py:249
↓ 2 callersFunction_build_pycolmap_intri
Helper function to get camera parameters based on camera type. Args: fidx: Frame index intrinsics: Camera intrinsic paramete
vision_reasoner/models/vggt/dependency/np_to_pycolmap.py:293
↓ 2 callersMethod_extract_category
Extract predicted category from model response
vision_reasoner/models/task_router.py:100
↓ 2 callersFunction_forward_on_query
Process a single query frame for track prediction. Args: query_index: Index of the query frame images: Tensor of shape [S, 3
vision_reasoner/models/vggt/dependency/track_predict.py:135
↓ 2 callersMethod_get_model_responses
Get batch model responses Args: instructions: List of instructions Returns: list: List o
vision_reasoner/models/task_router.py:57
↓ 2 callersMethod_make_layer
(self, dim, stride=1)
vision_reasoner/models/vggt/dependency/track_modules/blocks.py:126
↓ 2 callersMethodanswer_question
Answer a question about an image Args: image: Input image question: Text question
vision_reasoner/models/qwen_vl_cot.py:642
↓ 2 callersMethodanswer_question
Answer a question about an image Args: image: Input image question: Text question
vision_reasoner/models/vision_reasoner_model.py:726
↓ 2 callersMethodanswer_question
Answer a question about an image Args: image: Input image question: Text question
vision_reasoner/models/qwen_vl.py:590
↓ 2 callersFunctionbilinear_sampler
r"""Sample a tensor using bilinear interpolation `bilinear_sampler(input, coords)` samples a tensor :attr:`input` at coordinates :attr:`coord
vision_reasoner/models/vggt/heads/track_modules/utils.py:124
↓ 2 callersFunctionbilinear_sampler
r"""Sample a tensor using bilinear interpolation `bilinear_sampler(input, coords)` samples a tensor :attr:`input` at coordinates :attr:`coord
vision_reasoner/models/vggt/dependency/track_modules/utils.py:125
↓ 2 callersFunctioncompute_bbox_iou
(bbox1, bbox2)
evaluation/evaluation_segmentation.py:41
↓ 2 callersFunctioncompute_score_fn
Compute the scores, i.e., the standard deviation of the 2D similarity heatmaps, given the query point features and reference frame feature ma
vision_reasoner/models/vggt/dependency/track_modules/track_refine.py:302
↓ 2 callersMethodcount_objects
Count objects in an image based on a query Args: image: Input image query: Text query describing wha
vision_reasoner/models/qwen_vl_cot.py:511
↓ 2 callersMethodcount_objects
Count objects in an image based on a query Args: image: Input image query: Text query describing wha
vision_reasoner/models/vision_reasoner_model.py:625
↓ 2 callersMethodcount_objects
Count objects in an image based on a query Args: image: Input image query: Text query describing wha
vision_reasoner/models/qwen_vl.py:462
↓ 2 callersFunctioncustom_interpolate
Custom interpolate to avoid INT_MAX issues in nn.functional.interpolate.
vision_reasoner/models/vggt/heads/dpt_head.py:459
↓ 2 callersMethoddepth_estimation
(self, image, query)
vision_reasoner/models/vision_reasoner_model.py:823
↓ 2 callersMethoddetect_objects
Detect objects in an image based on a query Args: image: Input image query: Text query describing wh
vision_reasoner/models/qwen_vl_cot.py:280
↓ 2 callersMethoddetect_objects
Detect objects in an image based on a query Args: image: Input image query: Text query describing wh
vision_reasoner/models/vision_reasoner_model.py:420
↓ 2 callersMethoddetect_objects
Detect objects in an image based on a query Args: image: Input image query: Text query describing wh
vision_reasoner/models/qwen_vl.py:247
↓ 2 callersMethoddetect_objects_batch
Detect objects in a batch of images Args: images: List of input images queries: List of text queries
vision_reasoner/models/qwen_vl.py:323
↓ 2 callersFunctiondraw_links
(image, keypoints, scores, keypoint_edges, link_colors, keypoint_score_threshold, thickness, show_keypoint_wei
vision_reasoner/utils.py:182
↓ 2 callersFunctiondraw_points
(image, keypoints, scores, pose_keypoint_color, keypoint_score_threshold, radius, show_keypoint_weight)
vision_reasoner/utils.py:168
↓ 2 callersFunctiondrop_add_residual_stochastic_depth
( x: Tensor, residual_func: Callable[[Tensor], Tensor], sample_drop_ratio: float = 0.0, pos=None )
vision_reasoner/models/vggt/layers/block.py:101
↓ 2 callersFunctiondrop_add_residual_stochastic_depth_list
( x_list: List[Tensor], residual_func: Callable[[Tensor, Any], Tensor], sample_drop_ratio: float =
vision_reasoner/models/vggt/layers/block.py:175
↓ 2 callersMethodextract_math_answer
Extract answer for math tasks
vision_reasoner/models/visurf_model.py:180
↓ 2 callersMethodextract_qa_answer
Extract answer for QA tasks Args: output_text (str): Raw output text from the model Returns
vision_reasoner/models/vision_reasoner_model.py:159
↓ 2 callersMethodextract_qa_answer
Extract answer for QA tasks Args: output_text (str): Raw output text from the model Returns
vision_reasoner/models/visurf_model.py:163
↓ 2 callersMethodgenerate_image
Generate an image based on a query Args: refer_image_path: Path to the reference image image_prompt:
vision_reasoner/models/vision_reasoner_model.py:786
↓ 2 callersMethodgenerate_masks
Generate segmentation masks for given image, bounding boxes and points Args: image (PIL.Image): Input image
vision_reasoner/models/vision_reasoner_model.py:176
↓ 2 callersMethodgenerate_masks
Generate segmentation masks for given image, bounding boxes and points Args: image (PIL.Image): Input image
vision_reasoner/models/visurf_model.py:199
↓ 2 callersFunctionget_1d_sincos_pos_embed_from_grid
This function generates a 1D positional embedding from a given grid using sine and cosine functions. Args: - embed_dim: The embedding di
vision_reasoner/models/vggt/heads/track_modules/utils.py:64
↓ 2 callersFunctionget_1d_sincos_pos_embed_from_grid
This function generates a 1D positional embedding from a given grid using sine and cosine functions. Args: - embed_dim: The embedding di
vision_reasoner/models/vggt/dependency/track_modules/utils.py:65
↓ 2 callersFunctionget_attn_bias_and_cat
this will perform the index select, cat the tensors, and provide the attn_bias from cache
vision_reasoner/models/vggt/layers/block.py:151
↓ 2 callersFunctioninitialize_feature_extractors
Initialize feature extractors that can be reused based on a method string. Args: max_query_num: Maximum number of keypoints to extra
vision_reasoner/models/vggt/dependency/vggsfm_utils.py:189
↓ 2 callersFunctioniterative_undistortion
Iteratively undistort the normalized tracks using the given distortion parameters. Args: params (torch.Tensor or numpy.ndarray): Dis
vision_reasoner/models/vggt/dependency/distortion.py:51
↓ 2 callersFunctionload_and_preprocess_images
A quick start function to load and preprocess images for model input. This assumes the images should have the same shape for easier batching,
vision_reasoner/models/vggt/utils/load_fn.py:97
↓ 2 callersFunctionmake_2tuple
(x)
vision_reasoner/models/vggt/layers/patch_embed.py:16
↓ 2 callersFunctionmake_sincos_pos_embed
This function generates a 1D positional embedding from a given grid using sine and cosine functions. Args: - embed_dim: The embedding di
vision_reasoner/models/vggt/heads/utils.py:36
↓ 2 callersFunctionparse
(x)
vision_reasoner/models/vggt/heads/track_modules/modules.py:20
↓ 2 callersMethodprocess_images_to_fmaps
This function processes images for inference. Args: images (torch.Tensor): The images to be processed with shape S x 3 x
vision_reasoner/models/vggt/dependency/vggsfm_tracker.py:106
↓ 2 callersMethodprocess_single_image
Process a single image with given instruction Args: image (PIL.Image): Input image instruction (str)
vision_reasoner/models/vision_reasoner_model.py:312
↓ 2 callersFunctionproject_3D_points_np
NumPy clone of ``project_3D_points``. Parameters ---------- points3D : (N,3) world-space points. extrinsics : (B
vision_reasoner/models/vggt/dependency/projection.py:50
↓ 2 callersFunctionsample_features4d
r"""Sample spatial features `sample_features4d(input, coords)` samples the spatial features :attr:`input` represented by a 4D tensor :math:`(
vision_reasoner/models/vggt/heads/track_modules/utils.py:193
↓ 2 callersFunctionsample_features4d
r"""Sample spatial features `sample_features4d(input, coords)` samples the spatial features :attr:`input` represented by a 4D tensor :math:`(
vision_reasoner/models/vggt/dependency/track_modules/utils.py:186
↓ 2 callersMethodsegment_objects
Segment objects in an image based on a query Args: image: Input image query: Text query describing w
vision_reasoner/models/qwen_vl_cot.py:427
↓ 2 callersMethodsegment_objects
Segment objects in an image based on a query Args: image: Input image query: Text query describing w
vision_reasoner/models/vision_reasoner_model.py:524
↓ 2 callersMethodsegment_objects
Segment objects in an image based on a query Args: image: Input image query: Text query describing w
vision_reasoner/models/qwen_vl.py:380
↓ 2 callersMethodsegment_objects_batch
Segment objects in a batch of images Args: images: List of input images queries: List of text querie
vision_reasoner/models/qwen_vl.py:445
↓ 2 callersFunctionslice_expand_and_flatten
Processes specialized tokens with shape (1, 2, X, C) for multi-frame processing: 1) Uses the first position (index=0) for the first frame onl
vision_reasoner/models/vggt/models/aggregator.py:308
↓ 2 callersFunctionswitch_tensor_order
Reorder tensors along a specific dimension according to the given order. Args: tensors: List of tensors to reorder order: Te
vision_reasoner/models/vggt/dependency/vggsfm_utils.py:174
↓ 1 callersMethod__build_patch_embed__
Build the patch embed layer. If 'conv', we use a simple PatchEmbed conv layer. Otherwise, we use a vision transformer.
vision_reasoner/models/vggt/models/aggregator.py:143
↓ 1 callersMethod__init__
Initializes the position generator with an empty cache.
vision_reasoner/models/vggt/layers/rope.py:35
↓ 1 callersMethod__init__
( self, in_features: int, hidden_features: Optional[int] = None, out_features:
vision_reasoner/models/vggt/layers/swiglu_ffn.py:15
↓ 1 callersMethod__init__
Build a pyramid of feature maps from the input. fmaps: Tensor (B, S, C, H, W) num_levels: number of pyramid levels (each dow
vision_reasoner/models/vggt/heads/track_modules/blocks.py:138
↓ 1 callersFunction_augment_non_visible_frames
Augment tracking for frames with insufficient visibility. Args: pred_tracks: List of numpy arrays containing predicted tracks.
vision_reasoner/models/vggt/dependency/track_predict.py:232
↓ 1 callersMethod_compute_frequency_components
Computes frequency components for rotary embeddings. Args: dim: Feature dimension (must be even). seq_len: Maximum se
vision_reasoner/models/vggt/layers/rope.py:86
↓ 1 callersMethod_determine_task_type
Determine the task type based on the instruction Args: instruction (str): Text instruction or query
vision_reasoner/models/qwen_vl_cot.py:213
↓ 1 callersMethod_determine_task_type
Determine the task type based on the instruction Args: instruction (str): Text instruction or query
vision_reasoner/models/qwen_vl.py:180
↓ 1 callersMethod_get_intermediate_layers_chunked
(self, x, n=1)
vision_reasoner/models/vggt/layers/vision_transformer.py:285
↓ 1 callersMethod_get_intermediate_layers_not_chunked
(self, x, n=1)
vision_reasoner/models/vggt/layers/vision_transformer.py:273
↓ 1 callersMethod_get_model_response
Get model response for a single instruction
vision_reasoner/models/task_router.py:53
↓ 1 callersFunction_is_numpy
(x: ArrayLike)
vision_reasoner/models/vggt/dependency/distortion.py:14
↓ 1 callersFunction_is_torch
(x: ArrayLike)
vision_reasoner/models/vggt/dependency/distortion.py:18
↓ 1 callersFunction_make_scratch
(in_shape: List[int], out_shape: int, groups: int = 1, expand: bool = False)
vision_reasoner/models/vggt/heads/dpt_head.py:313
↓ 1 callersFunction_ntuple
(n)
vision_reasoner/models/vggt/heads/track_modules/modules.py:19
↓ 1 callersFunction_ntuple
(n)
vision_reasoner/models/vggt/dependency/track_modules/modules.py:19
↓ 1 callersMethod_process_frame_attention
Process frame attention blocks. We keep tokens in shape (B*S, P, C).
vision_reasoner/models/vggt/models/aggregator.py:260
↓ 1 callersMethod_process_global_attention
Process global attention blocks. We keep tokens in shape (B, S*P, C).
vision_reasoner/models/vggt/models/aggregator.py:284
↓ 1 callersMethod_rotate_features
Performs feature rotation by splitting and recombining feature dimensions. Args: x: Input tensor to rotate. Returns:
vision_reasoner/models/vggt/layers/rope.py:120
↓ 1 callersFunction_sqrt_positive_part
Returns torch.sqrt(torch.max(0, x)) but with a zero subgradient where x is 0.
vision_reasoner/models/vggt/utils/rotation.py:106
↓ 1 callersFunctionactivate_head
Process network output to extract 3D points and confidence values. Args: out: Network output tensor (B, C, H, W) activation:
vision_reasoner/models/vggt/heads/head_act.py:61
↓ 1 callersFunctionactivate_pose
Activate pose parameters with specified activation functions. Args: pred_pose_enc: Tensor containing encoded pose parameters [transl
vision_reasoner/models/vggt/heads/head_act.py:12
next →1–100 of 358, ranked by callers