Comments (2)
Hey,
So this project is based on Facebook's faiss.
I would advice you to have a look at their getting started guide. That should help you understand how to build the index
file.
The ids_vectors.p
is one implementation, you don't actually need it. What you need is your own config file. Two examples can be found in faiss_web_service_config.
The reason behind the ids_vectors.p
is that faiss
currently only has query by vector. If you wish to query by id, you need a way to convert an id to a vector. I used a simple dictionary that I pickled, but feel free to use any storage solution like a file (csv
, json
, ...), or even a database (sqlite
, mysql
, ...).
Based on your project's description, you need a way to convert your images to vectors. You are going to have to do that on your own as it really depends what you want to extract from your image. Once that is done, you should have an array of ids and vectors. That should be used to create your faiss
index, and populate your storage solution.
If your index is periodically updated, you should look at faiss_index_urllib. GET_FAISS_RESOURCES
should be set to download the newest index, GET_FAISS_ID_TO_VECTOR
should be changed based on the storage solution you have picked, and lastly, UPDATE_FAISS_AFTER_SECONDS
should be set to your refresh period.
I hope that answered all your questions. If you have more, don't hesitate to ask.
from faiss-web-service.
tks!
from faiss-web-service.
Related Issues (15)
- manifest for docker.io/plippe/faiss-web-service:latest not found HOT 3
- Error response from daemon: oci runtime error: container_linux.go:247 HOT 1
- curl: (56) Recv failure: Connection reset by peer HOT 2
- Look into ErlPort to avoid Flask issues
- Add MIT licence
- image feature is 2-Dimensional, what is ids for one picture ? HOT 2
- requirements.txt did not write faiss
- Unable to upgrade faiss HOT 10
- Is there any image build in python3? HOT 2
- when run index script,i got the RuntimeError that 'nx >= k' failed HOT 3
- reverse image search engine HOT 3
- uwsgi workers not being called HOT 1
- Shrink docker image HOT 1
- Bring up to date HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faiss-web-service.