Files
modelscope/tests/pipelines/test_tbs_detection.py

20 lines
576 B
Python
Raw Permalink Normal View History

import unittest
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
from modelscope.utils.test_utils import test_level
2023-05-22 10:53:18 +08:00
class ObjectDetectionTest(unittest.TestCase):
@unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
def test_run_with_model_name(self):
tbs_detect = pipeline(
Tasks.image_object_detection, model='landingAI/LD_CytoBrainCerv')
outputs = tbs_detect(input='data/test/images/tbs_detection.jpg')
print(outputs)
if __name__ == '__main__':
unittest.main()