logo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readme
Files and versions

18 lines
509 B

import unittest
from towhee import pipeline
from PIL import Image
class TestImageEmbeddingResnet50(unittest.TestCase):
test_img = './test_data/test.jpg'
test_img = Image.open(test_img)
def test_image_embedding_resnet50(self):
self.dimension = 1000
embedding_pipeline = pipeline('towhee/image-embedding-resnet50')
embedding = embedding_pipeline(self.test_img)
assert (1, self.dimension) == op(img_tensor)[0].shape
if __name__ == '__main__':
unittest.main()