MCPcopy Create free account

hub / github.com/IDEA-Research/T-Rex / functions

Functions30 in github.com/IDEA-Research/T-Rex

↓ 5 callersMethodvisual_prompt_inference
Visual prompt inference for both interactive and generic workflow. Args: target_image (Union[str, Image.Image]): The image to upl
trex/model_wrapper.py:112
↓ 3 callersFunctionencode_image
Encodes an image to a base64 string. Args: image (str or PIL.Image.Image): The image to encode. - If str: should be a va
trex/model_wrapper.py:12
↓ 3 callersFunctionvisualize
Plot bounding boxes and labels on an image. Args: image_pil (PIL.Image): The input image as a PIL Image object. model_targetoutpu
trex/visualize.py:7
↓ 2 callersMethodcall_api
(self, task_dict)
trex/model_wrapper.py:52
↓ 2 callersFunctionparse_require_file
(fpath)
setup.py:81
↓ 2 callersFunctionparse_visual_prompt
(points: List)
gradio_demo.py:166
↓ 2 callersMethodpostprocess
Postprocess the result from the API Args: object_batches (List[Dict]): List of Dicts. Each dict contains the prediction
trex/model_wrapper.py:243
↓ 1 callersFunctionarg_parse
()
gradio_demo.py:14
↓ 1 callersFunctionbuild_annotation
(boxes, mask)
gradio_demo.py:138
↓ 1 callersMethodconvert_embedding_prompt
Convert the prompt to the format required by the API
trex/model_wrapper.py:78
↓ 1 callersMethodconvert_visual_prompt
Convert the prompt to the format required by the API
trex/model_wrapper.py:91
↓ 1 callersMethodembedding_inference
Prompt inference workflow. Args: target_image (Union[str, Image.Image]): The image to upload. Can be a file path or PIL.Image
trex/model_wrapper.py:220
↓ 1 callersFunctiongen_packages_items
()
setup.py:89
↓ 1 callersFunctionget_args
()
demo_examples/embedding_inference.py:10
↓ 1 callersFunctionget_args
()
demo_examples/generic_inference.py:10
↓ 1 callersFunctionget_args
()
demo_examples/customize_embedding.py:10
↓ 1 callersFunctionget_args
()
demo_examples/interactive_inference.py:10
↓ 1 callersFunctionpack_model_input_generic
(generic_vp_dict)
gradio_demo.py:207
↓ 1 callersFunctionpack_model_input_interactive
(interactive_input)
gradio_demo.py:183
↓ 1 callersFunctionparse_line
Parse information from a line in a requirements text file.
setup.py:48
↓ 1 callersFunctionparse_requirements
Parse the package dependencies listed in a requirements file but strips specific versioning information. Args: fname (str): path to r
setup.py:28
↓ 1 callersFunctionplot_boxes_to_image
Plot bounding boxes and labels on an image. Args: image_pil (PIL.Image): The input image as a PIL Image object. tgt (Dict[str, Un
gradio_demo.py:29
↓ 1 callersFunctiontrex2_postprocess
( target_image, trex2_results, visual_threshold, return_point, point_width, return_sco
gradio_demo.py:225
↓ 1 callersFunctionwrite_version_file
()
setup.py:21
Method__init__
(self, token: str)
trex/model_wrapper.py:49
Functionclean_input
()
gradio_demo.py:162
Functiondraw_mask
(mask, draw, random_color=True)
gradio_demo.py:121
Functioninference
( target_image, interactive_input, generic_vp1, generic_vp2, generic_vp3, generic_vp4,
gradio_demo.py:254
Functionmulti_mask2one_mask
(masks)
gradio_demo.py:107
Functionnumpy2PIL
(numpy_image)
gradio_demo.py:116