|
@ -15,7 +15,7 @@ who maintains SOTA deep-learning models and tools in computer vision. |
|
|
|
|
|
|
|
|
## Code Example |
|
|
## 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. |
|
|
and use the pre-trained ResNet50 model ('resnet50') to generate an image embedding. |
|
|
|
|
|
|
|
|
*Write the pipeline in simplified style:* |
|
|
*Write the pipeline in simplified style:* |
|
@ -23,7 +23,7 @@ and use the pre-trained ResNet50 model ('resnet50') to generate an image embeddi |
|
|
```python |
|
|
```python |
|
|
import towhee |
|
|
import towhee |
|
|
|
|
|
|
|
|
towhee.glob('./towhee.jpg') \ |
|
|
|
|
|
|
|
|
towhee.glob('./towhee.jpeg') \ |
|
|
.image_decode() \ |
|
|
.image_decode() \ |
|
|
.image_embedding.timm(model_name='resnet50') \ |
|
|
.image_embedding.timm(model_name='resnet50') \ |
|
|
.show() |
|
|
.show() |
|
@ -35,7 +35,7 @@ towhee.glob('./towhee.jpg') \ |
|
|
```python |
|
|
```python |
|
|
import towhee |
|
|
import towhee |
|
|
|
|
|
|
|
|
towhee.glob['path']('./towhee.jpg') \ |
|
|
|
|
|
|
|
|
towhee.glob['path']('./towhee.jpeg') \ |
|
|
.image_decode['path', 'img']() \ |
|
|
.image_decode['path', 'img']() \ |
|
|
.image_embedding.timm['img', 'vec'](model_name='resnet50') \ |
|
|
.image_embedding.timm['img', 'vec'](model_name='resnet50') \ |
|
|
.select['img', 'vec']() \ |
|
|
.select['img', 'vec']() \ |
|
|