SYMBOL INDEX (281 symbols across 33 files) FILE: main.py function args (line 24) | def args(): FILE: scripts/blender_scripts/render_ori.py function clear_scene (line 39) | def clear_scene(): function clear_lights (line 44) | def clear_lights(): function AddBackground (line 51) | def AddBackground(hdr_pth): function import_model (line 75) | def import_model(path): function scene_root_objects (line 95) | def scene_root_objects(): function scene_bbox (line 101) | def scene_bbox(single_obj=None, ignore_matrix=False): function rotate_to_zzz (line 117) | def rotate_to_zzz(): function scene_meshes (line 122) | def scene_meshes(): function normalize_scene (line 128) | def normalize_scene(rotate=False): function create_camera (line 150) | def create_camera(): function set_camera (line 158) | def set_camera(direction, camera_dist=2.0): function randomize_camera (line 169) | def randomize_camera(camera_dist=2.0): function pan_camera (line 174) | def pan_camera(time, axis="Z", camera_dist=2.0, elevation=-0.1): function place_camera (line 186) | def place_camera(time, camera_pose_mode="random", camera_dist_min=2.0, c... function create_light (line 198) | def create_light(location, energy=1.0, angle=0.5 * math.pi / 180): function create_light_cap3d (line 213) | def create_light_cap3d(name, light_type, energy, location, rotation): function three_point_lighting (line 221) | def three_point_lighting(): function _create_light (line 249) | def _create_light( function randomize_lighting (line 284) | def randomize_lighting() -> Dict[str, bpy.types.Object]: function create_random_lights (line 341) | def create_random_lights(count=4, distance=2.0, energy=1.5): function create_camera_light (line 347) | def create_camera_light(): function create_uniform_light (line 352) | def create_uniform_light(backend): function create_vertex_color_shaders (line 361) | def create_vertex_color_shaders(): function create_default_materials (line 407) | def create_default_materials(): function AddWhiteBackground (line 415) | def AddWhiteBackground(): function find_materials (line 440) | def find_materials(): function get_socket_value (line 450) | def get_socket_value(tree, socket): function clear_socket_input (line 460) | def clear_socket_input(tree, socket): function set_socket_value (line 466) | def set_socket_value(tree, socket, socket_and_default): function setup_nodes (line 478) | def setup_nodes(output_path, capturing_material_alpha: bool = False): function render_scene (line 544) | def render_scene(output_path, fast_mode: bool): function scene_fov (line 597) | def scene_fov(): function write_camera_metadata (line 609) | def write_camera_metadata(path): function save_rendering_dataset (line 630) | def save_rendering_dataset( function main (line 705) | def main(): FILE: scripts/blender_scripts/render_pbr.py function CleanScene (line 30) | def CleanScene(): function AddBackground (line 62) | def AddBackground(hdr_pth): function paste_mat (line 86) | def paste_mat(args): function clear_lights (line 186) | def clear_lights(): function scene_root_objects (line 193) | def scene_root_objects(): function scene_bbox (line 199) | def scene_bbox(single_obj=None, ignore_matrix=False): function rotate_to_zzz (line 215) | def rotate_to_zzz(): function scene_meshes (line 220) | def scene_meshes(): function normalize_scene (line 226) | def normalize_scene(rotate=False): function create_camera (line 250) | def create_camera(): function set_camera (line 258) | def set_camera(direction, camera_dist=2.0): function randomize_camera (line 269) | def randomize_camera(camera_dist=2.0): function pan_camera (line 274) | def pan_camera(time, axis="Z", camera_dist=2.0, elevation=-0.1): function place_camera (line 286) | def place_camera(time, camera_pose_mode="random", camera_dist_min=2.0, c... function create_light (line 298) | def create_light(location, energy=1.0, angle=0.5 * math.pi / 180): function create_light_cap3d (line 313) | def create_light_cap3d(name, light_type, energy, location, rotation): function three_point_lighting (line 321) | def three_point_lighting(): function _create_light (line 349) | def _create_light( function randomize_lighting (line 384) | def randomize_lighting() -> Dict[str, bpy.types.Object]: function create_random_lights (line 441) | def create_random_lights(count=4, distance=2.0, energy=1.5): function create_camera_light (line 447) | def create_camera_light(): function create_uniform_light (line 452) | def create_uniform_light(backend): function create_vertex_color_shaders (line 461) | def create_vertex_color_shaders(): function create_default_materials (line 507) | def create_default_materials(): function AddWhiteBackground (line 515) | def AddWhiteBackground(): function find_materials (line 540) | def find_materials(): function get_socket_value (line 550) | def get_socket_value(tree, socket): function clear_socket_input (line 560) | def clear_socket_input(tree, socket): function set_socket_value (line 566) | def set_socket_value(tree, socket, socket_and_default): function setup_nodes (line 578) | def setup_nodes(output_path, capturing_material_alpha: bool = False): function render_scene (line 644) | def render_scene(output_path, fast_mode: bool): function scene_fov (line 697) | def scene_fov(): function write_camera_metadata (line 709) | def write_camera_metadata(path): function save_rendering_dataset (line 730) | def save_rendering_dataset( function main (line 817) | def main(): FILE: scripts/gpt_anno/gpt4_query_mat.py function process_image (line 23) | def process_image(image_path): FILE: scripts/kaolin_scripts/load_cfg.py function load_config (line 7) | def load_config(yaml_path): function render_model (line 18) | def render_model(eval_cfg): function paint_model_w_mask (line 22) | def paint_model_w_mask(train_cfg): FILE: scripts/kaolin_scripts/src/configs/train_config.py class RenderConfig (line 8) | class RenderConfig: class GuideConfig (line 35) | class GuideConfig: class OptimConfig (line 78) | class OptimConfig: class LogConfig (line 93) | class LogConfig: method exp_dir (line 113) | def exp_dir(self) -> Path: class TrainConfig (line 118) | class TrainConfig: FILE: scripts/kaolin_scripts/src/models/mesh.py class Mesh (line 6) | class Mesh: method __init__ (line 7) | def __init__(self,obj_path, device): method calculate_face_normals (line 31) | def calculate_face_normals(vertices: torch.Tensor, faces: torch.Tensor): method standardize_mesh (line 45) | def standardize_mesh(self,inplace=False): method normalize_mesh (line 56) | def normalize_mesh(self,inplace=False, target_scale=1, dy=0, use_origi... FILE: scripts/kaolin_scripts/src/models/render.py class Renderer (line 5) | class Renderer: method __init__ (line 8) | def __init__(self, device, dim=(224, 224), interpolation_mode='nearest'): method get_camera_from_view (line 20) | def get_camera_from_view(elev, azim, r=3.0, look_at_height=0.0): method normalize_depth (line 34) | def normalize_depth(self, depth_map): method render_single_view (line 45) | def render_single_view(self, mesh, face_attributes, elev=0, azim=0, ra... method render_single_view_texture (line 72) | def render_single_view_texture(self, verts, faces, uv_face_attr, textu... method project_uv_single_view (line 109) | def project_uv_single_view(self, verts, faces, uv_face_attr, elev=0, a... method project_single_view (line 123) | def project_single_view(self, verts, faces, elev=0, azim=0, radius=2, FILE: scripts/kaolin_scripts/src/models/textured_mesh.py function build_cotan_laplacian_torch (line 19) | def build_cotan_laplacian_torch(points_tensor: torch.Tensor, tris_tensor... function build_graph_laplacian_torch (line 44) | def build_graph_laplacian_torch(tris_tensor: torch.Tensor) -> np.ndarray: function eigen_problem (line 70) | def eigen_problem(Lap, k=20, e=0.0) -> (torch.Tensor, torch.Tensor): function choose_multi_modal (line 83) | def choose_multi_modal(n: int, k: int): class TexturedMeshModel (line 97) | class TexturedMeshModel(nn.Module): method __init__ (line 98) | def __init__(self, method L (line 149) | def L(self) -> np.ndarray: method eigens (line 154) | def eigens(self, k: int, e: float) -> (torch.Tensor, torch.Tensor): method normalize_vertices (line 163) | def normalize_vertices(vertices: torch.Tensor, mesh_scale: float = 1.0... method spectral_augmentations (line 170) | def spectral_augmentations(self, vertices: torch.Tensor) -> torch.Tensor: method axis_augmentations (line 185) | def axis_augmentations(self, vertices: torch.Tensor, stretch_factor: f... method augment_vertices (line 196) | def augment_vertices(self): method init_meshes (line 204) | def init_meshes(self, env_sphere_path='data/assets/env_sphere.obj'): method zero_meta (line 212) | def zero_meta(self): method init_paint (line 216) | def init_paint(self, num_backgrounds=1): method invert_color (line 234) | def invert_color(self, color: torch.Tensor) -> torch.Tensor: method change_default_to_median (line 247) | def change_default_to_median(self, save_name='./tmp/diff_mask_test.png'): method init_texture_map (line 263) | def init_texture_map(self): method forward (line 301) | def forward(self, x): method get_params (line 304) | def get_params(self): method export_mesh (line 308) | def export_mesh(self, path): method render (line 365) | def render(self, theta=None, phi=None, radius=None, background=None, FILE: scripts/kaolin_scripts/src/training/trainer.py class TEXTure (line 25) | class TEXTure: method __init__ (line 27) | def __init__(self, cfg: TrainConfig): method init_mesh_model (line 50) | def init_mesh_model(self) -> nn.Module: method init_dataloaders (line 64) | def init_dataloaders(self) -> Dict[str, DataLoader]: method init_logger (line 76) | def init_logger(self): method paint (line 82) | def paint(self): method evaluate (line 136) | def evaluate(self, dataloader: DataLoader, save_path: Path, save_as_vi... method full_eval (line 162) | def full_eval(self, output_dir: Path = None): method paint_viewpoint (line 175) | def paint_viewpoint(self, data: Dict[str, Any], pre_mask=None, pre_out... method eval_render (line 218) | def eval_render(self, data): method calculate_trimap (line 243) | def calculate_trimap(self, rgb_render_raw: torch.Tensor, method project_back (line 294) | def project_back(self, render_cache: Dict[str, Any], background: Any, ... FILE: scripts/kaolin_scripts/src/training/views_dataset.py function rand_poses (line 12) | def rand_poses(size, device, radius_range=(1.0, 1.5), theta_range=(0.0, ... function rand_modal_poses (line 47) | def rand_modal_poses(size, device, radius_range=(1.4, 1.6), theta_range=... function circle_poses (line 74) | def circle_poses(device, radius=1.25, theta=60.0, phi=0.0, angle_overhea... class MultiviewDataset (line 86) | class MultiviewDataset: method __init__ (line 87) | def __init__(self, cfg: RenderConfig, device): method collate (line 116) | def collate(self, index): method dataloader (line 138) | def dataloader(self): class ViewsDataset (line 145) | class ViewsDataset: method __init__ (line 146) | def __init__(self, cfg: RenderConfig, device, size=100, random_views=F... method collate (line 154) | def collate(self, index): method dataloader (line 177) | def dataloader(self): FILE: scripts/kaolin_scripts/src/utils.py function get_view_direction (line 15) | def get_view_direction(thetas, phis, overhead, front): function tensor2numpy (line 43) | def tensor2numpy(tensor: torch.Tensor) -> np.ndarray: function make_path (line 49) | def make_path(path: Path) -> Path: function save_colormap (line 54) | def save_colormap(tensor: torch.Tensor, path: Path): function seed_everything (line 58) | def seed_everything(seed): function smooth_image (line 68) | def smooth_image(self, img: torch.Tensor, sigma: float) -> torch.Tensor: function get_nonzero_region (line 74) | def get_nonzero_region(mask: torch.Tensor): function gaussian_fn (line 95) | def gaussian_fn(M, std): function gkern (line 102) | def gkern(kernlen=256, std=128): function gaussian_blur (line 109) | def gaussian_blur(image: torch.Tensor, kernel_size: int, std: int) -> to... function color_with_shade (line 118) | def color_with_shade(color: List[float], z_normals: torch.Tensor, light_... FILE: som/ops/build/lib.linux-x86_64-cpython-38/functions/ms_deform_attn_func.py class MSDeformAttnFunction (line 32) | class MSDeformAttnFunction(Function): method forward (line 34) | def forward(ctx, value, value_spatial_shapes, value_level_start_index,... method backward (line 43) | def backward(ctx, grad_output): function ms_deform_attn_core_pytorch (line 52) | def ms_deform_attn_core_pytorch(value, value_spatial_shapes, sampling_lo... FILE: som/ops/build/lib.linux-x86_64-cpython-38/modules/ms_deform_attn.py function _is_power_of_2 (line 28) | def _is_power_of_2(n): class MSDeformAttn (line 34) | class MSDeformAttn(nn.Module): method __init__ (line 35) | def __init__(self, d_model=256, n_levels=4, n_heads=8, n_points=4): method _reset_parameters (line 66) | def _reset_parameters(self): method forward (line 82) | def forward(self, query, reference_points, input_flatten, input_spatia... FILE: som/ops/functions/ms_deform_attn_func.py class MSDeformAttnFunction (line 32) | class MSDeformAttnFunction(Function): method forward (line 34) | def forward(ctx, value, value_spatial_shapes, value_level_start_index,... method backward (line 43) | def backward(ctx, grad_output): function ms_deform_attn_core_pytorch (line 52) | def ms_deform_attn_core_pytorch(value, value_spatial_shapes, sampling_lo... FILE: som/ops/modules/ms_deform_attn.py function _is_power_of_2 (line 28) | def _is_power_of_2(n): class MSDeformAttn (line 34) | class MSDeformAttn(nn.Module): method __init__ (line 35) | def __init__(self, d_model=256, n_levels=4, n_heads=8, n_points=4): method _reset_parameters (line 66) | def _reset_parameters(self): method forward (line 82) | def forward(self, query, reference_points, input_flatten, input_spatia... FILE: som/ops/setup.py function get_extensions (line 26) | def get_extensions(): FILE: som/ops/src/cpu/ms_deform_attn_cpu.cpp function ms_deform_attn_cpu_forward (line 22) | at::Tensor function ms_deform_attn_cpu_backward (line 34) | std::vector FILE: som/ops/src/ms_deform_attn.h function im2col_step (line 32) | int im2col_step) FILE: som/ops/src/vision.cpp function PYBIND11_MODULE (line 18) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: som/ops/test.py function check_forward_equal_with_pytorch_double (line 35) | def check_forward_equal_with_pytorch_double(): function check_forward_equal_with_pytorch_float (line 51) | def check_forward_equal_with_pytorch_float(): function check_gradient_numerical (line 66) | def check_gradient_numerical(channels=4, grad_value=True, grad_sampling_... FILE: som/sesam_serial.py function inference (line 25) | def inference(image, slider, mode, alpha, label_mode, anno_mode,points_p... function seg_serial (line 68) | def seg_serial(input_dir, fine_grain=False): function seg_serial_single (line 90) | def seg_serial_single(input_dir, img_index, seg_slider=1.92): FILE: som/task_adapter/semantic_sam/tasks/automatic_mask_generator.py function prompt_switch (line 35) | def prompt_switch(p): class SemanticSamAutomaticMaskGenerator (line 53) | class SemanticSamAutomaticMaskGenerator: method __init__ (line 54) | def __init__( method generate (line 156) | def generate(self, image: np.ndarray) -> List[Dict[str, Any]]: method _generate_masks (line 215) | def _generate_masks(self, image: np.ndarray) -> MaskData: method _process_crop (line 246) | def _process_crop( method _process_batch (line 287) | def _process_batch( method postprocess_small_regions (line 345) | def postprocess_small_regions( FILE: som/task_adapter/semantic_sam/tasks/inference_semsam_m2m_auto.py function get_white_ratio (line 15) | def get_white_ratio(image_ori, mask): function inference_semsam_auto (line 24) | def inference_semsam_auto(model, image, level, all_classes, all_parts, t... FILE: som/task_adapter/semantic_sam/tasks/interactive_idino_1o1_box.py function interactive_infer_image_box (line 20) | def interactive_infer_image_box(model, image,all_classes,all_parts, thre... function remove_small_regions (line 120) | def remove_small_regions( FILE: som/task_adapter/semantic_sam/tasks/interactive_idino_m2m.py function interactive_infer_image (line 17) | def interactive_infer_image(model, image,all_classes,all_parts, thresh,t... function interactive_infer_image_3l (line 109) | def interactive_infer_image_3l(model, image,all_classes,all_parts, thres... function interactive_infer_image_semantic (line 206) | def interactive_infer_image_semantic(model, image,all_classes,all_parts,... function remove_small_regions (line 298) | def remove_small_regions( FILE: som/task_adapter/semantic_sam/tasks/interactive_predictor.py class SemanticSAMPredictor (line 11) | class SemanticSAMPredictor: method __init__ (line 12) | def __init__(self, model, thresh=0.5, text_size=640, hole_scale=100, i... method predict (line 26) | def predict(self, image_ori, image, point=None): method process_multi_mask (line 57) | def process_multi_mask(self, masks, ious, image_ori): method predict_masks (line 110) | def predict_masks(self, image_ori, image, point=None): method remove_small_regions (line 115) | def remove_small_regions( FILE: som/task_adapter/utils/visualizer.py class ColorMode (line 38) | class ColorMode(Enum): class GenericMask (line 60) | class GenericMask: method __init__ (line 68) | def __init__(self, mask_or_polygons, height, width): method mask (line 100) | def mask(self): method polygons (line 106) | def polygons(self): method has_holes (line 112) | def has_holes(self): method mask_to_polygons (line 120) | def mask_to_polygons(self, mask): method polygons_to_mask (line 139) | def polygons_to_mask(self, polygons): method area (line 144) | def area(self): method bbox (line 147) | def bbox(self): class _PanopticPrediction (line 156) | class _PanopticPrediction: method __init__ (line 161) | def __init__(self, panoptic_seg, segments_info, metadata=None): method non_empty_mask (line 197) | def non_empty_mask(self): method semantic_masks (line 213) | def semantic_masks(self): method instance_masks (line 221) | def instance_masks(self): function _create_text_labels (line 231) | def _create_text_labels(classes, scores, class_names, is_crowd=None): class VisImage (line 258) | class VisImage: method __init__ (line 259) | def __init__(self, img, scale=1.5):#! Scale这里也改了 method _setup_figure (line 270) | def _setup_figure(self, img): method reset_image (line 295) | def reset_image(self, img): method save (line 303) | def save(self, filepath): method get_image (line 311) | def get_image(self): class Visualizer (line 332) | class Visualizer: method __init__ (line 358) | def __init__(self, img_rgb, metadata=None, scale=1.0, instance_mode=Co... method draw_instance_predictions (line 389) | def draw_instance_predictions(self, predictions): method draw_sem_seg (line 452) | def draw_sem_seg(self, sem_seg, area_threshold=None, alpha=0.7): method draw_panoptic_seg (line 488) | def draw_panoptic_seg(self, panoptic_seg, segments_info, area_threshol... method draw_dataset_dict (line 555) | def draw_dataset_dict(self, dic): method overlay_instances (line 624) | def overlay_instances( method overlay_rotated_instances (line 766) | def overlay_rotated_instances(self, boxes=None, labels=None, assigned_... method draw_and_connect_keypoints (line 804) | def draw_and_connect_keypoints(self, keypoints): method draw_text (line 867) | def draw_text( method draw_box (line 928) | def draw_box(self, box_coord, alpha=0.5, edge_color="g", line_style="-"): method draw_rotated_box_with_label (line 962) | def draw_rotated_box_with_label( method draw_circle (line 1017) | def draw_circle(self, circle_coord, color, radius=3): method draw_line (line 1035) | def draw_line(self, x_data, y_data, color, linestyle="-", linewidth=No... method draw_binary_mask (line 1066) | def draw_binary_mask( method draw_binary_mask_with_number (line 1117) | def draw_binary_mask_with_number( method draw_soft_mask (line 1180) | def draw_soft_mask(self, soft_mask, color=None, *, text=None, alpha=0.5): method draw_polygon (line 1208) | def draw_polygon(self, segment, color, edge_color=None, alpha=0.5): method _jitter (line 1244) | def _jitter(self, color): method _create_grayscale_image (line 1264) | def _create_grayscale_image(self, mask=None): method _change_color_brightness (line 1275) | def _change_color_brightness(self, color, brightness_factor): method _convert_boxes (line 1300) | def _convert_boxes(self, boxes): method _convert_masks (line 1309) | def _convert_masks(self, masks_or_polygons): method _draw_number_in_mask (line 1332) | def _draw_number_in_mask(self, binary_mask, text, color, label_mode='1'): method _draw_text_in_mask (line 1373) | def _draw_text_in_mask(self, binary_mask, text, color): method _convert_keypoints (line 1393) | def _convert_keypoints(self, keypoints): method get_output (line 1399) | def get_output(self): FILE: utils/gen_config.py function gen_eval_yaml (line 8) | def gen_eval_yaml(input_str, texture_pth, pixel, obj_pth): function gen_train_yaml (line 37) | def gen_train_yaml(input_str, mat2im_path, result_path, pixel, obj_pth): function remove_file (line 65) | def remove_file(folder_path, suffix): function remove_dir (line 75) | def remove_dir(folder_path): FILE: utils/gpt4_query.py function process_image (line 32) | def process_image(image_path, api_key, prompt): function query_shape (line 78) | def query_shape(folder_path, img_pth, api_key, type_str=None): function query_overall (line 117) | def query_overall(folder_path, leave_list, api_key, obj_info=None): function query_refine (line 170) | def query_refine(folder_path, leave_list, api_key, obj_info=None, force=... function query_description (line 224) | def query_description(folder_path, leave_list, api_key, obj_info=None, f... FILE: utils/mask_postprocess.py function process_mask_list (line 8) | def process_mask_list(image, mask_list, mean_threshold, stddev_threshold): function refine_masks (line 42) | def refine_masks(result_path, leave_index=None): FILE: utils/texture_postprocess.py function region_refine (line 15) | def region_refine(masks_dir = 'experiments/obj_train/masks', albedo_pth ... function pixel_estimate (line 85) | def pixel_estimate(masks_refine_dir = 'experiments/obj_train/masks_refin... function mask_hist (line 165) | def mask_hist(image_pth, mask_pth, pixel): function normal_hist (line 185) | def normal_hist(img_pth, pixel): function convert_cv2_to_pil (line 197) | def convert_cv2_to_pil(opencv_img): function divide_masks (line 204) | def divide_masks(mask_dir='experiments/obj_train/masks'): function find_closest_key (line 235) | def find_closest_key(albedo_avgs, number): function merge (line 248) | def merge(mat_parts_dir): function format_string (line 292) | def format_string(s): FILE: utils/tools.py function sort_gpt_result (line 9) | def sort_gpt_result(input_pth, leave_list): function count_materials (line 37) | def count_materials(materials_data): function select_most_frequent_materials (line 50) | def select_most_frequent_materials(materials_data): function paste_image (line 67) | def paste_image(result_pth, leave_list=[0,3,4,7]): function sort_categories (line 91) | def sort_categories(im2mat_pth): function get_texture_pth (line 105) | def get_texture_pth(obj_dir): function calculate_non_white_area (line 136) | def calculate_non_white_area(image_path): function get_max_area (line 148) | def get_max_area(result_path): function pp_dic_result (line 163) | def pp_dic_result(output_str): function check_mat_valid (line 189) | def check_mat_valid(mat, count): function get_texture_img (line 201) | def get_texture_img(texture_pth):