You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_action_detection.py 723 B

12345678910111213141516171819202122
  1. # Copyright (c) Alibaba, Inc. and its affiliates.
  2. import unittest
  3. from modelscope.pipelines import pipeline
  4. from modelscope.utils.constant import ModelFile, Tasks
  5. from modelscope.utils.test_utils import test_level
  6. class ActionDetectionTest(unittest.TestCase):
  7. @unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
  8. def test_run(self):
  9. action_detection_pipline = pipeline(
  10. Tasks.action_detection,
  11. model='damo/cv_ResNetC3D_action-detection_detection2d')
  12. result = action_detection_pipline(
  13. 'data/test/videos/action_detection_test_video.mp4')
  14. print('action detection results:', result)
  15. if __name__ == '__main__':
  16. unittest.main()