mirror of
https://github.com/modelscope/modelscope.git
synced 2026-09-02 20:21:46 +02:00
新增3D人物模型渲染pipeline 新增3D角色自动驱动pipeline Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/14146042 * upload 3dhuman render and animation code * remove chumpy dependence * feat: Fix conflict, auto commit by WebIDE * modify code structure, add user inputs, etc. * add output path
33 lines
1010 B
Python
33 lines
1010 B
Python
# Copyright (c) Alibaba, Inc. and its affiliates.
|
|
import unittest
|
|
|
|
from modelscope.pipelines import pipeline
|
|
from modelscope.utils.constant import Tasks
|
|
from modelscope.utils.test_utils import test_level
|
|
|
|
|
|
class Human3DAnimationTest(unittest.TestCase):
|
|
|
|
def setUp(self) -> None:
|
|
self.model_id = 'damo/cv_3d-human-animation'
|
|
self.task = Tasks.human3d_animation
|
|
|
|
@unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
|
|
def test_run_modelhub(self):
|
|
human3d = pipeline(self.task, model=self.model_id)
|
|
input = {
|
|
'dataset_id': 'damo/3DHuman_synthetic_dataset',
|
|
'case_id': '3f2a7538253e42a8',
|
|
'action_dataset': 'damo/3DHuman_action_dataset',
|
|
'action': 'SwingDancing',
|
|
'save_dir': 'outputs',
|
|
}
|
|
output = human3d(input)
|
|
print('saved animation file to %s' % output)
|
|
|
|
print('human3d_animation.test_run_modelhub done')
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|