Skip to content

Commit

Permalink
init pw3d 230818
Browse files Browse the repository at this point in the history
  • Loading branch information
Wei-Chen-hub committed Aug 18, 2023
1 parent cb30c33 commit 329234e
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 94 deletions.
8 changes: 5 additions & 3 deletions mmhuman3d/data/data_converters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from .freihand import FreihandConverter
from .gta_human import GTAHumanConverter
from .gta_human2 import GTAHuman2Converter
from .h36m_neural_annot import H36mNeuralConverter
from .h36m_hybrik import H36mHybrIKConverter
from .h36m_neural_annot import H36mNeuralConverter
from .h36m_smplx import H36mSMPLXConverter
from .hanco import HancoConverter
from .hsc4d import Hsc4dConverter
Expand All @@ -35,10 +35,11 @@
from .mpi_inf_3dhp import MpiInf3dhpConverter
from .mpi_inf_3dhp_hybrik import MpiInf3dhpHybrIKConverter
from .mpii_neural_annot import MpiiNeuralConverter
from .mscoco_neural_annot import MscocoNeuralConverter
from .penn_action import PennActionConverter
from .posetrack import PosetrackConverter
from .pw3d import Pw3dConverter
from .pw3d_hybrik import Pw3dHybrIKConverter
from .pw3d_neural_annot import Pw3dNeuralConverter
from .renbody import RenbodyConverter
from .sgnify import SgnifyConverter
from .shapy import ShapyConverter
Expand Down Expand Up @@ -67,7 +68,7 @@
'MpiInf3dhpConverter',
'PennActionConverter',
'PosetrackConverter',
'Pw3dConverter',
'Pw3dNeuralConverter',
'Up3dConverter',
'CrowdposeConverter',
'EftConverter',
Expand Down Expand Up @@ -109,4 +110,5 @@
'BlurhandConverter',
'Hsc4dConverter',
'MotionXConverter',
'MscocoNeuralConverter',
]
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


@DATA_CONVERTERS.register_module()
class Pw3dConverter(BaseModeConverter):
class Pw3dNeuralConverter(BaseModeConverter):
"""3D Poses in the Wild dataset `Recovering Accurate 3D Human Pose in The
Wild Using IMUs and a Moving Camera' ECCV'2018 More details can be found in
the `paper.
Expand All @@ -28,7 +28,7 @@ class Pw3dConverter(BaseModeConverter):
ACCEPTED_MODES = ['train', 'test']

def __init__(self, modes: List = []) -> None:
super(Pw3dConverter, self).__init__(modes)
super(Pw3dNeuralConverter, self).__init__(modes)

def convert_by_mode(self, dataset_path: str, out_path: str,
mode: str) -> dict:
Expand Down
16 changes: 12 additions & 4 deletions tools/convert_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
type='CocoWholebodyConverter', modes=['train', 'val'], prefix='coco'),
crowdpose=dict(
type='CrowdposeConverter', modes=['train', 'val', 'test', 'trainval']),
pw3d=dict(type='Pw3dConverter', modes=['train', 'test']),
h36m_p1=dict(
type='H36mConverter',
modes=['train', 'valid'],
Expand Down Expand Up @@ -83,6 +82,8 @@
type='GTAHuman2Converter', # synthetic
prefix='gta_human2',
modes=['single', 'multiple']),
pw3d=dict(
type='Pw3dNeuralConverter', prefix='pw3d', modes=['train', 'test']),
synbody=dict(
type='SynbodyConverter', # synthetic
prefix='synbody',
Expand All @@ -105,14 +106,17 @@
prefix='cimi4d',
modes=['train']),
ehf=dict(
type='EhfConverter', # real'
type='EhfConverter', # real
prefix='ehf',
modes=['val']),
hsc4d=dict(
type='Hsc4dConverter', # real, in progress
prefix='hsc4d',
modes=['train']),
h36m=dict(type='H36mConverter', modes=['train', 'val'], prefix='h36m'),
h36m=dict(
type='H36mNeuralConverter', # real, studio
prefix='h36m',
modes=['val', 'train']),
motionx=dict(
type='MotionXConverter', # real, in progress
prefix='motionx',
Expand All @@ -125,6 +129,10 @@
type='MpiiConverter', # real multi-human?
prefix='mpii',
modes=['train', 'test']),
mscoco=dict(
type='MscocoNeuralConverter', # real, have some multihuman
prefix='mscoco',
modes=['train']),
renbody=dict(
type='RenbodyConverter', # real
prefix='renbody',
Expand Down Expand Up @@ -236,7 +244,7 @@ def main():

if ('modes' in cfg.keys()) and (args.modes != []):
assert all(x in cfg['modes'] for x in args.modes), \
f'Unsupported mode found, supported mode for' \
f'Unsupported mode found, supported mode for ' \
f'{cfg["prefix"]} is {cfg["modes"]}'
cfg['modes'] = args.modes
elif ('modes' in cfg.keys()) and (args.modes == []):
Expand Down
18 changes: 14 additions & 4 deletions tools/convert_datasets_commands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ python tools/convert_datasets.py \
--output_path /mnt/d/datasets/moyo/output \
--modes train

# mscoco-converter
python tools/convert_datasets.py \
--datasets mscoco \
--root_path /mnt/d/datasets \
--output_path /mnt/d/datasets/mscoco/output \
--modes train

# mpii-converter
python tools/convert_datasets.py \
--datasets mpii \
Expand Down Expand Up @@ -175,15 +182,13 @@ python tools/convert_datasets.py \
# ------------------------------server--------------------------------

# agora
python tools/convert_datasets.py
python tools/convert_datasets.py \
--datasets agora \
--root_path /mnt/lustrenew/share_data/caizhongang/data/datasets \
--output_path /mnt/lustre/share_data/weichen1/converted_humandata \
--output_path /mnt/lustre/share_data/weichen1/converted_humandata_new \
--modes train_3840




# renbody
python tools/convert_datasets.py \
--datasets renbody \
Expand All @@ -207,3 +212,8 @@ python tools/preprocess/synbody_preprocess_mp.py \
--root_path /mnt/lustre/share_data/weichen1/datasets/synbody \
--output_path /mnt/lustre/share_data/weichen1/datasets/synbody/preprocess \
--prefix Synbody_v0 --num_proc 1



mirror -R -c -v moyo moyo --parallel=5
python tools/postprocess/humandata_sample.py
81 changes: 0 additions & 81 deletions tools/preprocess/mpii.py

This file was deleted.

0 comments on commit 329234e

Please sign in to comment.