mirror of
https://github.com/modelscope/modelscope.git
synced 2026-02-24 12:10:09 +01:00
Fix master UT on level0
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/12599393 * reset ut level for test_run_with_model_name_for_unite_large and test_run_with_model_name_for_unite_base * fix master UT for level0 * update EasyCVFace2DKeypointsPipelineTest skip info
This commit is contained in:
@@ -10,7 +10,7 @@ from modelscope.utils.test_utils import test_level
|
||||
|
||||
class EasyCVFace2DKeypointsPipelineTest(unittest.TestCase):
|
||||
|
||||
@unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
|
||||
@unittest.skip('skip easycv related cases')
|
||||
def test_face_2d_keypoints(self):
|
||||
img_path = 'data/test/images/face_detection.png'
|
||||
model_id = 'damo/cv_mobilenet_face-2d-keypoints_alignment'
|
||||
|
||||
@@ -60,7 +60,7 @@ class FaceReconstructionTest(unittest.TestCase, DemoCompatibilityCheck):
|
||||
Tasks.face_reconstruction, model=model_dir)
|
||||
self.pipeline_inference(face_reconstruction, self.test_image)
|
||||
|
||||
@unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
|
||||
@unittest.skipUnless(test_level() >= 2, 'skip test in current test level')
|
||||
def test_run_modelhub(self):
|
||||
face_reconstruction = pipeline(
|
||||
Tasks.face_reconstruction,
|
||||
|
||||
@@ -23,7 +23,7 @@ class Hand2DKeypointsPipelineTest(unittest.TestCase):
|
||||
self.assertEqual(results[OutputKeys.KEYPOINTS].shape[2], 3)
|
||||
self.assertEqual(results[OutputKeys.BOXES].shape[1], 4)
|
||||
|
||||
@unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
|
||||
@unittest.skip('skip test in current test level: no pipeline implemented')
|
||||
def test_hand_2d_keypoints_with_default_model(self):
|
||||
img_path = 'data/test/images/hand_keypoints.jpg'
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class ObjectDetectionTest(unittest.TestCase, DemoCompatibilityCheck):
|
||||
self.task = Tasks.domain_specific_object_detection
|
||||
self.model_id = 'damo/cv_yolox-pai_hand-detection'
|
||||
|
||||
@unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
|
||||
@unittest.skip('skip test in current test level: no pipeline implemented')
|
||||
def test_hand_detection_pipeline(self):
|
||||
test_image = 'data/test/images/hand_detection.jpg'
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ from modelscope.utils.test_utils import test_level
|
||||
|
||||
class EasyCVFace2DKeypointsPipelineTest(unittest.TestCase):
|
||||
|
||||
@unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
|
||||
@unittest.skip('skip easycv related cases')
|
||||
def test_human_wholebody_keypoint(self):
|
||||
img_path = 'data/test/images/keypoints_detect/img_test_wholebody.jpg'
|
||||
model_id = 'damo/cv_hrnetw48_human-wholebody-keypoint_image'
|
||||
|
||||
@@ -19,7 +19,7 @@ class ImagePanopticSegmentationTest(unittest.TestCase, DemoCompatibilityCheck):
|
||||
self.task = Tasks.image_segmentation
|
||||
self.model_id = 'damo/cv_swinL_panoptic-segmentation_cocopan'
|
||||
|
||||
@unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
|
||||
@unittest.skip('skip test in current test level: no pipeline implemented')
|
||||
def test_image_panoptic_segmentation(self):
|
||||
input_location = 'data/test/images/image_panoptic_segmentation.jpg'
|
||||
pan_segmentor = pipeline(Tasks.image_segmentation, model=self.model_id)
|
||||
@@ -29,7 +29,7 @@ class ImagePanopticSegmentationTest(unittest.TestCase, DemoCompatibilityCheck):
|
||||
cv2.imwrite('result.jpg', draw_img)
|
||||
print('print test_image_panoptic_segmentation return success')
|
||||
|
||||
@unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
|
||||
@unittest.skip('skip test in current test level: no pipeline implemented')
|
||||
def test_image_panoptic_segmentation_from_PIL(self):
|
||||
input_location = 'data/test/images/image_panoptic_segmentation.jpg'
|
||||
pan_segmentor = pipeline(Tasks.image_segmentation, model=self.model_id)
|
||||
|
||||
@@ -47,7 +47,7 @@ class ObjectDetectionTest(unittest.TestCase, DemoCompatibilityCheck):
|
||||
def test_demo_compatibility(self):
|
||||
self.compatibility_check()
|
||||
|
||||
@unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
|
||||
@unittest.skip('skip test in current test level: no pipeline implemented')
|
||||
def test_image_object_detection_auto_pipeline(self):
|
||||
model_id = 'damo/cv_yolox_image-object-detection-auto'
|
||||
test_image = 'data/test/images/auto_demo.jpg'
|
||||
@@ -59,7 +59,7 @@ class ObjectDetectionTest(unittest.TestCase, DemoCompatibilityCheck):
|
||||
image_object_detection_auto.show_result(test_image, result,
|
||||
'auto_demo_ret.jpg')
|
||||
|
||||
@unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
|
||||
@unittest.skip('skip test in current test level: no pipeline implemented')
|
||||
def test_image_object_detection_dino_pipeline(self):
|
||||
model_id = 'damo/cv_swinl_image-object-detection_dino'
|
||||
test_image = 'data/test/images/image_detection.jpg'
|
||||
|
||||
@@ -22,7 +22,7 @@ class RealtimeObjectDetectionTest(unittest.TestCase, DemoCompatibilityCheck):
|
||||
self.test_image = 'data/test/images/keypoints_detect/000000438862.jpg'
|
||||
self.task = Tasks.image_object_detection
|
||||
|
||||
@unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
|
||||
@unittest.skip('skip test in current test level: no pipeline implemented')
|
||||
def test_run_easycv_yolox(self):
|
||||
realtime_object_detection = pipeline(
|
||||
Tasks.image_object_detection, model=self.easycv_small_model_id)
|
||||
@@ -34,7 +34,7 @@ class RealtimeObjectDetectionTest(unittest.TestCase, DemoCompatibilityCheck):
|
||||
else:
|
||||
raise ValueError('process error')
|
||||
|
||||
@unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
|
||||
@unittest.skip('skip test in current test level: no pipeline implemented')
|
||||
def test_run_easycv_yolox_nano(self):
|
||||
realtime_object_detection = pipeline(
|
||||
Tasks.image_object_detection, model=self.easycv_nano_model_id)
|
||||
|
||||
Reference in New Issue
Block a user