-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Docs] Fix api docs in readthedocs (#34)
* Add __init__ to compelete docs * add code block for camera docs * Modify cameras __init__ * Modify apis __init__.py * Modify utils __init__.py * Replace collect package with func * Fix loop-import * Add scipy in readthedocs req * Modify readthedocs req * Add pytorch3d in readthedocs reqs * Mock pytorch3d and torch_renderer
- Loading branch information
Showing
10 changed files
with
229 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
from .inference import inference_model, init_model | ||
from .test import multi_gpu_test, single_gpu_test | ||
from .train import set_random_seed, train_model | ||
from mmhuman3d.apis import inference, test, train | ||
from mmhuman3d.apis.inference import LoadImage, inference_model, init_model | ||
from mmhuman3d.apis.test import ( | ||
collect_results_cpu, | ||
collect_results_gpu, | ||
multi_gpu_test, | ||
single_gpu_test, | ||
) | ||
from mmhuman3d.apis.train import set_random_seed, train_model | ||
|
||
__all__ = [ | ||
'set_random_seed', 'train_model', 'init_model', 'inference_model', | ||
'multi_gpu_test', 'single_gpu_test' | ||
'LoadImage', 'collect_results_cpu', 'collect_results_gpu', 'inference', | ||
'inference_model', 'init_model', 'multi_gpu_test', 'set_random_seed', | ||
'single_gpu_test', 'test', 'train', 'train_model' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
from .builder import build_cameras | ||
from .camera_parameter import CameraParameter | ||
from .cameras import ( | ||
from mmhuman3d.core.cameras import builder, camera_parameter, cameras | ||
from mmhuman3d.core.cameras.builder import CAMERAS, build_cameras | ||
from mmhuman3d.core.cameras.camera_parameter import CameraParameter | ||
from mmhuman3d.core.cameras.cameras import ( | ||
FoVOrthographicCameras, | ||
FoVPerspectiveCameras, | ||
NewAttributeCameras, | ||
OrthographicCameras, | ||
PerspectiveCameras, | ||
WeakPerspectiveCameras, | ||
compute_orbit_cameras, | ||
) | ||
|
||
__all__ = [ | ||
'WeakPerspectiveCameras', 'CameraParameter', 'compute_orbit_cameras', | ||
'FoVOrthographicCameras', 'FoVPerspectiveCameras', 'PerspectiveCameras', | ||
'OrthographicCameras', 'build_cameras' | ||
'CAMERAS', 'CameraParameter', 'FoVOrthographicCameras', | ||
'FoVPerspectiveCameras', 'NewAttributeCameras', 'OrthographicCameras', | ||
'PerspectiveCameras', 'WeakPerspectiveCameras', 'build_cameras', 'builder', | ||
'camera_parameter', 'cameras', 'compute_orbit_cameras' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from mmhuman3d.core.conventions import cameras, keypoints_mapping, segmentation | ||
from mmhuman3d.core.conventions.cameras import ( | ||
CAMERA_CONVENTIONS, | ||
convert_cameras, | ||
convert_K_3x3_to_4x4, | ||
convert_K_4x4_to_3x3, | ||
convert_ndc_to_screen, | ||
convert_perspective_to_weakperspective, | ||
convert_screen_to_ndc, | ||
convert_weakperspective_to_perspective, | ||
convert_world_view, | ||
enc_camera_convention, | ||
) | ||
from mmhuman3d.core.conventions.keypoints_mapping import ( | ||
KEYPOINTS_FACTORY, | ||
compress_converted_kps, | ||
convert_kps, | ||
get_flip_pairs, | ||
get_keypoint_idx, | ||
get_keypoint_idxs_by_part, | ||
get_keypoint_num, | ||
get_mapping, | ||
) | ||
from mmhuman3d.core.conventions.segmentation import body_segmentation | ||
|
||
__all__ = [ | ||
'CAMERA_CONVENTIONS', 'KEYPOINTS_FACTORY', 'body_segmentation', 'cameras', | ||
'compress_converted_kps', 'convert_K_3x3_to_4x4', 'convert_K_4x4_to_3x3', | ||
'convert_cameras', 'convert_kps', 'convert_ndc_to_screen', | ||
'convert_perspective_to_weakperspective', 'convert_screen_to_ndc', | ||
'convert_weakperspective_to_perspective', 'convert_world_view', | ||
'enc_camera_convention', 'get_flip_pairs', 'get_keypoint_idx', | ||
'get_keypoint_idxs_by_part', 'get_keypoint_num', 'get_mapping', | ||
'keypoints_mapping', 'segmentation' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from mmhuman3d.core.evaluation import mesh_eval, mpjpe | ||
from mmhuman3d.core.evaluation.mesh_eval import compute_similarity_transform | ||
from mmhuman3d.core.evaluation.mpjpe import keypoint_mpjpe | ||
|
||
__all__ = [ | ||
'compute_similarity_transform', 'keypoint_mpjpe', 'mesh_eval', 'mpjpe' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from mmhuman3d.data.data_structures import human_data | ||
from mmhuman3d.data.data_structures.human_data import HumanData | ||
|
||
__all__ = ['HumanData', 'human_data'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,112 @@ | ||
from .collect_env import collect_env | ||
from .logger import get_root_logger | ||
from mmhuman3d.utils.collect_env import collect_env | ||
from mmhuman3d.utils.demo_utils import ( | ||
box2cs, | ||
conver_verts_to_cam_coord, | ||
convert_bbox_to_intrinsic, | ||
convert_crop_cam_to_orig_img, | ||
convert_kp2d_to_bbox, | ||
get_default_hmr_intrinsic, | ||
prepare_frames, | ||
process_mmdet_results, | ||
process_mmtracking_results, | ||
smooth_process, | ||
xywh2xyxy, | ||
xyxy2xywh, | ||
) | ||
from mmhuman3d.utils.dist_utils import DistOptimizerHook, allreduce_grads | ||
from mmhuman3d.utils.ffmpeg_utils import ( | ||
array_to_images, | ||
array_to_video, | ||
compress_video, | ||
crop_video, | ||
gif_to_images, | ||
gif_to_video, | ||
images_to_array, | ||
images_to_gif, | ||
images_to_sorted_images, | ||
images_to_video, | ||
pad_for_libx264, | ||
slice_video, | ||
spatial_concat_video, | ||
temporal_concat_video, | ||
vid_info_reader, | ||
video_to_array, | ||
video_to_gif, | ||
video_to_images, | ||
video_writer, | ||
) | ||
from mmhuman3d.utils.geometry import ( | ||
batch_rodrigues, | ||
estimate_translation, | ||
estimate_translation_np, | ||
perspective_projection, | ||
quaternion_to_angle_axis, | ||
rotation_matrix_to_angle_axis, | ||
rotation_matrix_to_quaternion, | ||
) | ||
from mmhuman3d.utils.keypoint_utils import get_different_colors, search_limbs | ||
from mmhuman3d.utils.logger import get_root_logger | ||
from mmhuman3d.utils.mesh_utils import ( | ||
join_batch_meshes_as_scene, | ||
mesh_to_pointcloud_vc, | ||
save_meshes_as_plys, | ||
) | ||
from mmhuman3d.utils.misc import multi_apply, torch_to_numpy | ||
from mmhuman3d.utils.path_utils import ( | ||
Existence, | ||
check_input_path, | ||
check_path_existence, | ||
check_path_suffix, | ||
prepare_output_path, | ||
) | ||
from mmhuman3d.utils.transforms import ( | ||
Compose, | ||
aa_to_ee, | ||
aa_to_quat, | ||
aa_to_rot6d, | ||
aa_to_rotmat, | ||
aa_to_sja, | ||
ee_to_aa, | ||
ee_to_quat, | ||
ee_to_rot6d, | ||
ee_to_rotmat, | ||
quat_to_aa, | ||
quat_to_ee, | ||
quat_to_rot6d, | ||
quat_to_rotmat, | ||
rot6d_to_aa, | ||
rot6d_to_ee, | ||
rot6d_to_quat, | ||
rot6d_to_rotmat, | ||
rotmat_to_aa, | ||
rotmat_to_ee, | ||
rotmat_to_quat, | ||
rotmat_to_rot6d, | ||
sja_to_aa, | ||
) | ||
|
||
__all__ = [ | ||
'get_root_logger', | ||
'collect_env', | ||
'Compose', 'DistOptimizerHook', 'Existence', 'aa_to_ee', 'aa_to_quat', | ||
'aa_to_rot6d', 'aa_to_rotmat', 'aa_to_sja', 'allreduce_grads', | ||
'array_to_images', 'array_to_video', 'batch_rodrigues', 'box2cs', | ||
'check_input_path', 'check_path_existence', 'check_path_suffix', | ||
'collect_env', 'compress_video', 'conver_verts_to_cam_coord', | ||
'convert_bbox_to_intrinsic', 'convert_crop_cam_to_orig_img', | ||
'convert_kp2d_to_bbox', 'crop_video', 'ee_to_aa', 'ee_to_quat', | ||
'ee_to_rot6d', 'ee_to_rotmat', 'estimate_translation', | ||
'estimate_translation_np', 'get_default_hmr_intrinsic', | ||
'get_different_colors', 'get_root_logger', 'gif_to_images', 'gif_to_video', | ||
'images_to_array', 'images_to_gif', 'images_to_sorted_images', | ||
'images_to_video', 'join_batch_meshes_as_scene', 'mesh_to_pointcloud_vc', | ||
'multi_apply', 'pad_for_libx264', 'perspective_projection', | ||
'prepare_frames', 'prepare_output_path', 'process_mmdet_results', | ||
'process_mmtracking_results', 'quat_to_aa', 'quat_to_ee', 'quat_to_rot6d', | ||
'quat_to_rotmat', 'quaternion_to_angle_axis', 'rot6d_to_aa', 'rot6d_to_ee', | ||
'rot6d_to_quat', 'rot6d_to_rotmat', 'rotation_matrix_to_angle_axis', | ||
'rotation_matrix_to_quaternion', 'rotmat_to_aa', 'rotmat_to_ee', | ||
'rotmat_to_quat', 'rotmat_to_rot6d', 'save_meshes_as_plys', 'search_limbs', | ||
'sja_to_aa', 'slice_video', 'smooth_process', 'spatial_concat_video', | ||
'temporal_concat_video', 'torch_to_numpy', 'vid_info_reader', | ||
'video_to_array', 'video_to_gif', 'video_to_images', 'video_writer', | ||
'xywh2xyxy', 'xyxy2xywh' | ||
] |