towhee-io/towhee

[Documentation]: How to get embeddings with CVNet

Jia-py opened this issue · 1 comments

Is there an existing issue for this?

  • I have searched the existing issues

What kind of documentation would you like added or changed?

The documentation on the website seems out of date. Some APIs are different now.

I find it challenging to generate embeddings with newly added models (e.g., CVNet).

Why is this needed?

No response

Anything else?

No response

All supported models are there: https://huggingface.co/timm

from towhee import pipe, ops, DataCollection

p = (
    pipe.input('path')
    .map('path', 'img', ops.image_decode.cv2())
    .map('img', 'vec', ops.image_embedding.timm(model_name={model_name}))
    .output('img', 'vec')
)