Files
modelscope/tests/pipelines/test_human3d_animation.py
Xingjun.Wang 210ab40c54 Upgrade datasets (#921)
* del _datasets_server import in hf_dataset_util

* fix streaming for youku-mplug and adopt latest datasets

* fix download config copy

* update ut

* add youku in test_general_datasets

* update UT for general dataset

* adapt to datasets version: 2.19.0 or later

* add assert for youku data UT

* fix disable_tqdm in some functions for 2.19.0 or later

* update get_module_with_script

* set trust_remote_code is True in load_dataset_with_ctx

* update print info

* update requirements for datasets version restriction

* fix _dataset_info

* add pillow

* update comments

* update comment

* reuse _download function in DataDownloadManager

* remove unused code

* update test_run_modelhub in Human3DAnimationTest

* set datasets>=2.18.0
2024-07-23 22:26:12 +08:00

34 lines
1.0 KiB
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': '000146', # 3f2a7538253e42a8
'action_dataset': 'damo/3DHuman_action_dataset',
'action': 'SwingDancing',
'save_dir': 'outputs',
'blender': 'blender',
}
output = human3d(input)
print('saved animation file to %s' % output)
print('human3d_animation.test_run_modelhub done')
if __name__ == '__main__':
unittest.main()