diff --git a/README.md b/README.md index 4cc414d..4313627 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ who maintains SOTA deep-learning models and tools in computer vision. ## Code Example -Load an image from path './towhee.jpg' +Load an image from path './towhee.jpeg' and use the pre-trained ResNet50 model ('resnet50') to generate an image embedding. *Write the pipeline in simplified style:* @@ -23,7 +23,7 @@ and use the pre-trained ResNet50 model ('resnet50') to generate an image embeddi ```python import towhee -towhee.glob('./towhee.jpg') \ +towhee.glob('./towhee.jpeg') \ .image_decode() \ .image_embedding.timm(model_name='resnet50') \ .show() @@ -35,7 +35,7 @@ towhee.glob('./towhee.jpg') \ ```python import towhee -towhee.glob['path']('./towhee.jpg') \ +towhee.glob['path']('./towhee.jpeg') \ .image_decode['path', 'img']() \ .image_embedding.timm['img', 'vec'](model_name='resnet50') \ .select['img', 'vec']() \ diff --git a/test_onnx.py b/test_onnx.py index a1a5684..50d5ada 100644 --- a/test_onnx.py +++ b/test_onnx.py @@ -7,74 +7,74 @@ f.write('model_name, run_op, save_onnx, check_onnx\n') # models = TimmImage.supported_model_names()[:1] models = [ - # 'vgg11', + 'vgg11', 'resnet18', - # 'resnetv2_50', - # 'seresnet33ts', - # 'skresnet18', - # 'resnext26ts', - # 'seresnext26d_32x4d', - # 'skresnext50_32x4d', - # 'convit_base', - # 'inception_v4', - # 'efficientnet_b0', + 'resnetv2_50', + 'seresnet33ts', + 'skresnet18', + 'resnext26ts', + 'seresnext26d_32x4d', + 'skresnext50_32x4d', + 'convit_base', + 'inception_v4', + 'efficientnet_b0', 'tf_efficientnet_b0', - # 'swin_base_patch4_window7_224', - # 'vit_base_patch8_224', - # 'beit_base_patch16_224', - # 'convnext_base', - # 'crossvit_9_240', - # 'convmixer_768_32', - # 'coat_lite_mini', - # 'inception_v3', - # 'cait_m36_384', - # 'cspdarknet53', - # 'deit_base_distilled_patch16_224', - # 'densenet121', - # 'dla34', - # 'dm_nfnet_f0', - # 'nf_regnet_b1', - # 'nf_resnet50', - # 'dpn68', - # 'ese_vovnet19b_dw', - # 'fbnetc_100', - # 'fbnetv3_b', - # 'halonet26t', - # 'eca_halonext26ts', - # 'sehalonet33ts', - # 'hardcorenas_a', - # 'hrnet_w18', - # 'jx_nest_base', - # 'lcnet_050', - # 'levit_128', - # 'mixer_b16_224', - # 'mixnet_s', - # 'mnasnet_100', - # 'mobilenetv2_050', - # 'mobilenetv3_large_100', - # 'nasnetalarge', - # 'pit_b_224', - # 'pnasnet5large', - # 'regnetx_002', - # 'repvgg_a2', - # 'res2net50_14w_8s', - # 'res2next50', - # 'resmlp_12_224', - # 'resnest14d', - # 'rexnet_100', - # 'selecsls42b', - # 'semnasnet_075', - # 'tinynet_a', - # 'tnt_s_patch16_224', - # 'tresnet_l', - # 'twins_pcpvt_base', - # 'visformer_small', - # 'xception', - # 'xcit_large_24_p8_224', - # 'ghostnet_100', - # 'gmlp_s16_224', - # 'lambda_resnet26rpt_256', - # 'spnasnet_100', + 'swin_base_patch4_window7_224', + 'vit_base_patch8_224', + 'beit_base_patch16_224', + 'convnext_base', + 'crossvit_9_240', + 'convmixer_768_32', + 'coat_lite_mini', + 'inception_v3', + 'cait_m36_384', + 'cspdarknet53', + 'deit_base_distilled_patch16_224', + 'densenet121', + 'dla34', + 'dm_nfnet_f0', + 'nf_regnet_b1', + 'nf_resnet50', + 'dpn68', + 'ese_vovnet19b_dw', + 'fbnetc_100', + 'fbnetv3_b', + 'halonet26t', + 'eca_halonext26ts', + 'sehalonet33ts', + 'hardcorenas_a', + 'hrnet_w18', + 'jx_nest_base', + 'lcnet_050', + 'levit_128', + 'mixer_b16_224', + 'mixnet_s', + 'mnasnet_100', + 'mobilenetv2_050', + 'mobilenetv3_large_100', + 'nasnetalarge', + 'pit_b_224', + 'pnasnet5large', + 'regnetx_002', + 'repvgg_a2', + 'res2net50_14w_8s', + 'res2next50', + 'resmlp_12_224', + 'resnest14d', + 'rexnet_100', + 'selecsls42b', + 'semnasnet_075', + 'tinynet_a', + 'tnt_s_patch16_224', + 'tresnet_l', + 'twins_pcpvt_base', + 'visformer_small', + 'xception', + 'xcit_large_24_p8_224', + 'ghostnet_100', + 'gmlp_s16_224', + 'lambda_resnet26rpt_256', + 'spnasnet_100', ] decoder = ops.image_decode() diff --git a/test_torchscript.py b/test_torchscript.py index 2461a4f..b29d288 100644 --- a/test_torchscript.py +++ b/test_torchscript.py @@ -7,74 +7,74 @@ f.write('model_name,run_op,save_torchscript,check_result\n') # models = TimmImage.supported_model_names()[:1] models = [ - # 'vgg11', + 'vgg11', 'resnet18', - # 'resnetv2_50', - # 'seresnet33ts', - # 'skresnet18', - # 'resnext26ts', - # 'seresnext26d_32x4d', - # 'skresnext50_32x4d', - # 'convit_base', - # 'inception_v4', - # 'efficientnet_b0', + 'resnetv2_50', + 'seresnet33ts', + 'skresnet18', + 'resnext26ts', + 'seresnext26d_32x4d', + 'skresnext50_32x4d', + 'convit_base', + 'inception_v4', + 'efficientnet_b0', 'tf_efficientnet_b0', - # 'swin_base_patch4_window7_224', - # 'vit_base_patch8_224', - # 'beit_base_patch16_224', - # 'convnext_base', - # 'crossvit_9_240', - # 'convmixer_768_32', - # 'coat_lite_mini', - # 'inception_v3', - # 'cait_m36_384', - # 'cspdarknet53', - # 'deit_base_distilled_patch16_224', - # 'densenet121', - # 'dla34', - # 'dm_nfnet_f0', - # 'nf_regnet_b1', - # 'nf_resnet50', - # 'dpn68', - # 'ese_vovnet19b_dw', - # 'fbnetc_100', - # 'fbnetv3_b', - # 'halonet26t', - # 'eca_halonext26ts', - # 'sehalonet33ts', - # 'hardcorenas_a', - # 'hrnet_w18', - # 'jx_nest_base', - # 'lcnet_050', - # 'levit_128', - # 'mixer_b16_224', - # 'mixnet_s', - # 'mnasnet_100', - # 'mobilenetv2_050', - # 'mobilenetv3_large_100', - # 'nasnetalarge', - # 'pit_b_224', - # 'pnasnet5large', - # 'regnetx_002', - # 'repvgg_a2', - # 'res2net50_14w_8s', - # 'res2next50', - # 'resmlp_12_224', - # 'resnest14d', - # 'rexnet_100', - # 'selecsls42b', - # 'semnasnet_075', - # 'tinynet_a', - # 'tnt_s_patch16_224', - # 'tresnet_l', - # 'twins_pcpvt_base', - # 'visformer_small', - # 'xception', - # 'xcit_large_24_p8_224', - # 'ghostnet_100', - # 'gmlp_s16_224', - # 'lambda_resnet26rpt_256', - # 'spnasnet_100', + 'swin_base_patch4_window7_224', + 'vit_base_patch8_224', + 'beit_base_patch16_224', + 'convnext_base', + 'crossvit_9_240', + 'convmixer_768_32', + 'coat_lite_mini', + 'inception_v3', + 'cait_m36_384', + 'cspdarknet53', + 'deit_base_distilled_patch16_224', + 'densenet121', + 'dla34', + 'dm_nfnet_f0', + 'nf_regnet_b1', + 'nf_resnet50', + 'dpn68', + 'ese_vovnet19b_dw', + 'fbnetc_100', + 'fbnetv3_b', + 'halonet26t', + 'eca_halonext26ts', + 'sehalonet33ts', + 'hardcorenas_a', + 'hrnet_w18', + 'jx_nest_base', + 'lcnet_050', + 'levit_128', + 'mixer_b16_224', + 'mixnet_s', + 'mnasnet_100', + 'mobilenetv2_050', + 'mobilenetv3_large_100', + 'nasnetalarge', + 'pit_b_224', + 'pnasnet5large', + 'regnetx_002', + 'repvgg_a2', + 'res2net50_14w_8s', + 'res2next50', + 'resmlp_12_224', + 'resnest14d', + 'rexnet_100', + 'selecsls42b', + 'semnasnet_075', + 'tinynet_a', + 'tnt_s_patch16_224', + 'tresnet_l', + 'twins_pcpvt_base', + 'visformer_small', + 'xception', + 'xcit_large_24_p8_224', + 'ghostnet_100', + 'gmlp_s16_224', + 'lambda_resnet26rpt_256', + 'spnasnet_100', ] decoder = ops.image_decode()