-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c92b103
commit d10bc7a
Showing
1 changed file
with
54 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import glob | ||
import os | ||
import pdb | ||
import random | ||
import json | ||
|
||
import cv2 | ||
import numpy as np | ||
import torch | ||
from tqdm import tqdm | ||
|
||
from mmhuman3d.core.cameras import build_cameras | ||
from mmhuman3d.core.conventions.keypoints_mapping import ( | ||
convert_kps, | ||
get_keypoint_idx, | ||
get_keypoint_idxs_by_part, | ||
) | ||
from mmhuman3d.models.body_models.utils import batch_transform_to_camera_frame | ||
from mmhuman3d.data.data_structures.human_data import HumanData | ||
from mmhuman3d.models.body_models.builder import build_body_model | ||
from .base_converter import BaseModeConverter | ||
from .builder import DATA_CONVERTERS | ||
|
||
@DATA_CONVERTERS.register_module() | ||
class EmdbConverter(BaseModeConverter): | ||
|
||
ACCEPTED_MODES = ['train'] | ||
|
||
def __init__(self, modes=[], *args, **kwargs): | ||
|
||
self.device = torch.device( | ||
'cuda') if torch.cuda.is_available() else torch.device('cpu') | ||
|
||
super(EmdbConverter, self).__init__(modes) | ||
|
||
def convert_by_mode(self, dataset_path: str, out_path: str, | ||
mode: str) -> dict: | ||
print('Converting EMDB dataset...') | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|