RECODE-H / annotations /annotation_103 /function_info.json
mcy98's picture
Upload folder using huggingface_hub
d7ff85b verified
Raw History Blame Contribute Delete
6.93 kB
[
{
"function_name": "forward",
"file_path": "Textual_Encoder",
"function_calls": [
{
"function_call_name": "tokenize",
"functionality": "Converts a list of text prompts into a tokenized format that CLIP's text encoder can process.",
"input": "p",
"output": "Tokenized prompts",
"location_or_namespace": "clip"
},
{
"function_call_name": "cat",
"functionality": "Concatenates the tokenized prompts into a single tensor.",
"input": "a sequence of tensors",
"output": "A single concatenated tensor",
"location_or_namespace": "torch"
},
{
"function_call_name": "cuda",
"functionality": "Moves the tensor to the GPU.",
"input": "",
"output": "The tensor on the GPU",
"location_or_namespace": "torch"
},
{
"function_call_name": "encode_text",
"functionality": "Encodes the tokenized text into a feature vector using the CLIP text encoder.",
"input": "tokenized text prompts",
"output": "textual features",
"location_or_namespace": "clip"
},
{
"function_call_name": "repeat",
"functionality": "Duplicates the text features for each of the NUM_VIEWS.",
"input": "dimensions to repeat along",
"output": "The repeated tensor",
"location_or_namespace": "torch.Tensor"
}
]
},
{
"function_name": "load_clip_to_cpu",
"file_path": "canonical_code.py",
"function_calls": [
{
"function_call_name": "_download",
"functionality": "Downloads the CLIP model from the specified URL.",
"input": "URL of the CLIP model",
"output": "Path to the downloaded model",
"location_or_namespace": "clip"
},
{
"function_call_name": "load",
"functionality": "Loads a JIT compiled PyTorch model from a file.",
"input": "model_path, map_location='cpu'",
"output": "The loaded JIT model",
"location_or_namespace": "torch.jit"
},
{
"function_call_name": "load",
"functionality": "Loads a PyTorch state dictionary from a file.",
"input": "model_path, map_location='cpu'",
"output": "The loaded state dictionary",
"location_or_namespace": "torch"
},
{
"function_call_name": "state_dict",
"functionality": "Returns the state dictionary of a PyTorch module.",
"input": "",
"output": "The model's state dictionary",
"location_or_namespace": "torch.nn.Module"
},
{
"function_call_name": "build_model",
"functionality": "Constructs a CLIP model from a state dictionary.",
"input": "A state dictionary",
"output": "The built CLIP model",
"location_or_namespace": "clip"
}
]
},
{
"function_name": "build_model",
"file_path": "PointCLIPV2_ZS",
"function_calls": [
{
"function_call_name": "load_clip_to_cpu",
"functionality": "Loads a pre-trained CLIP model onto the CPU.",
"input": "cfg",
"output": "A CLIP model instance",
"location_or_namespace": "canonical_code.py"
},
{
"function_call_name": "cuda",
"functionality": "Moves the CLIP model to the GPU.",
"input": "",
"output": "The CLIP model on the GPU",
"location_or_namespace": "torch.nn.Module"
},
{
"function_call_name": "Textual_Encoder",
"functionality": "Initializes the Textual_Encoder class to process text prompts.",
"input": "cfg, classnames, clip_model",
"output": "An instance of the Textual_Encoder class",
"location_or_namespace": "canonical_code.py"
},
{
"function_call_name": "Realistic_Projection",
"functionality": "Initializes the Realistic_Projection class, which handles the 3D to 2D projection.",
"input": "",
"output": "An instance of the Realistic_Projection class",
"location_or_namespace": "trainers/mv_utils_zs"
},
{
"function_call_name": "Tensor",
"functionality": "Creates a PyTorch tensor from a list of view weights.",
"input": "A list of view weights",
"output": "A PyTorch tensor",
"location_or_namespace": "torch"
}
]
},
{
"function_name": "real_proj",
"file_path": "PointCLIPV2_ZS",
"function_calls": [
{
"function_call_name": "get_img",
"functionality": "Performs the 3D to 2D projection steps.",
"input": "pc (point cloud)",
"output": "A 2D image (depth map)",
"location_or_namespace": "trainers/mv_utils_zs"
},
{
"function_call_name": "cuda",
"functionality": "Moves the image tensor to the GPU.",
"input": "",
"output": "The image tensor on the GPU",
"location_or_namespace": "torch"
},
{
"function_call_name": "interpolate",
"functionality": "Upsamples the projected image to the required size (224x224).",
"input": "img, size=(imsize, imsize), mode='bilinear', align_corners=True",
"output": "The interpolated image tensor",
"location_or_namespace": "torch.nn.functional"
}
]
},
{
"function_name": "model_inference",
"file_path": "PointCLIPV2_ZS",
"function_calls": [
{
"function_call_name": "real_proj",
"functionality": "Converts the 3D point cloud into multi-view 2D depth maps.",
"input": "pc (point cloud)",
"output": "A batch of images",
"location_or_namespace": "canonical_code.py"
},
{
"function_call_name": "type",
"functionality": "Casts the tensor to the correct data type (inherited from the CLIP model).",
"input": "self.dtype",
"output": "The tensor with the new data type",
"location_or_namespace": "torch.Tensor"
},
{
"function_call_name": "reshape",
"functionality": "Reshapes the tensor to a new size.",
"input": "The desired new dimensions",
"output": "The reshaped tensor",
"location_or_namespace": "torch.Tensor"
},
{
"function_call_name": "append",
"functionality": "Adds an item to the end of a list.",
"input": "item to append",
"output": "None",
"location_or_namespace": "list"
},
{
"function_call_name": "t",
"functionality": "Transposes the tensor.",
"input": "",
"output": "The transposed tensor",
"location_or_namespace": "torch.Tensor"
},
{
"function_call_name": "norm",
"functionality": "Calculates the L2 norm of the tensor along a specified dimension.",
"input": "The dimension to calculate the norm on",
"output": "The L2 norm",
"location_or_namespace": "torch.Tensor"
}
]
}
]