12 lines
349 B
Python
12 lines
349 B
Python
import towhee
|
|
|
|
class Resnet50:
|
|
def resnet50_extract_feat(self, img_path):
|
|
feat = towhee.glob(img_path).image_decode().image_embedding.timm(model_name='resnet50').tensor_normalize().to_list()
|
|
print(feat[0])
|
|
return feat[0]
|
|
|
|
if __name__ == '__main__':
|
|
print('This script is running as the main program.')
|
|
#resnet =
|