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_cmdssl_video_embedding.py 709 B

1234567891011121314151617181920212223
  1. # Copyright (c) Alibaba, Inc. and its affiliates.
  2. # !/usr/bin/env python
  3. import unittest
  4. from modelscope.pipelines import pipeline
  5. from modelscope.utils.constant import Tasks
  6. from modelscope.utils.test_utils import test_level
  7. class CMDSSLVideoEmbeddingTest(unittest.TestCase):
  8. @unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
  9. def test_run_modelhub(self):
  10. videossl_pipeline = pipeline(
  11. Tasks.video_embedding, model='damo/cv_r2p1d_video_embedding')
  12. result = videossl_pipeline(
  13. 'data/test/videos/action_recognition_test_video.mp4')
  14. print(f'video embedding output: {result}.')
  15. if __name__ == '__main__':
  16. unittest.main()