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_image.py 421 B

12345678910111213141516171819
  1. # Copyright (c) Alibaba, Inc. and its affiliates.
  2. import unittest
  3. import PIL
  4. from modelscope.preprocessors import load_image
  5. class ImagePreprocessorTest(unittest.TestCase):
  6. def test_load(self):
  7. img = load_image('data/test/images/image_matting.png')
  8. self.assertTrue(isinstance(img, PIL.Image.Image))
  9. self.assertEqual(img.size, (948, 533))
  10. if __name__ == '__main__':
  11. unittest.main()