Skip to content

Commit

Permalink
init emdb dataset 230905
Browse files Browse the repository at this point in the history
  • Loading branch information
Wei-Chen-hub committed Sep 5, 2023
1 parent c92b103 commit d10bc7a
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions mmhuman3d/data/data_converters/emdb.py
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...')
















0 comments on commit d10bc7a

Please sign in to comment.