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_hicossl_video_embedding.py 777 B

1234567891011121314151617181920212223242526
  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 HICOSSLVideoEmbeddingTest(unittest.TestCase):
  8. def setUp(self) -> None:
  9. self.model_id = 'damo/cv_s3dg_video-embedding'
  10. @unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
  11. def test_run_modelhub(self):
  12. videossl_pipeline = pipeline(
  13. Tasks.video_embedding, model=self.model_id)
  14. result = videossl_pipeline(
  15. 'data/test/videos/action_recognition_test_video.mp4')
  16. print(f'video embedding output: {result}.')
  17. if __name__ == '__main__':
  18. unittest.main()