Cannot use operator towhee/to_faiss while using towhee 0.9.0 :-( #2509
-
I am trying to use Faiss to build an index on the Embedding of images: import towhee
img_vectors = (
towhee.read_csv('info.csv')
.image_decode['file_name', 'img']()
.image_text_embedding.clip['img', 'vec'](model_name='clip_vit_base_patch32', modality='image')
.tensor_normalize['vec','vec']() # normalize vector
.select['file_name', 'vec']()
)
img_vectors.to_faiss['file_name', 'vec'](findex='./index.bin') but an error occured:
My environements look like this:
Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@Chiiizzzy Please take a look |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
to_faiss
is not an operator, it's a mixin. Could you please try to runfrom towhee.functional.mixins.faiss import FaissMixin
and post the result here. I tried to reproduce your issue, but it seems things work smoothly in my new conda env.