Comments (11)
You can update the mapping independent of elastiknn, using the regular REST API.
For example:
- Create an index using the elastiknn client. This will have a mapping that contains an
elastiknn_vector
field. - Use the PUT Mapping API to add another field.
You don't have to use the client at all for index creation. It's just a convenience. You can create the index using the REST API and then also use the REST API to PUT a mapping that contains an elastiknn_vector
field.
from elastiknn.
You can update the mapping independent of elastiknn, using the regular REST API.
For example:
- Create an index using the elastiknn client. This will have a mapping that contains an
elastiknn_vector
field.- Use the PUT Mapping API to add another field.
You don't have to use the client at all for index creation. It's just a convenience. You can create the index using the REST API and then also use the REST API to PUT a mapping that contains an
elastiknn_vector
field.
I use the L2 function to search for images.Where are the scores of the two most similar pictures?Through the data I looked up, I observed many different pictures with very similar scores
from elastiknn.
You can update the mapping independent of elastiknn, using the regular REST API.
For example:
- Create an index using the elastiknn client. This will have a mapping that contains an
elastiknn_vector
field.- Use the PUT Mapping API to add another field.
You don't have to use the client at all for index creation. It's just a convenience. You can create the index using the REST API and then also use the REST API to PUT a mapping that contains an
elastiknn_vector
field.
How do you convert an image to the original image pixel?What python library are you using?, I used the feature vector to achieve the similar effect between the pictures, the effect is not ideal
from elastiknn.
You can update the mapping independent of elastiknn, using the regular REST API.
For example:
- Create an index using the elastiknn client. This will have a mapping that contains an
elastiknn_vector
field.- Use the PUT Mapping API to add another field.
You don't have to use the client at all for index creation. It's just a convenience. You can create the index using the REST API and then also use the REST API to PUT a mapping that contains an
elastiknn_vector
field.I use the L2 function to search for images.Where are the scores of the two most similar pictures?Through the data I looked up, I observed many different pictures with very similar scores
There's no method to find the two most similar images directly in the plugin. You can loop over all of the documents in your index, compute the nearest neighbors for each one, and keep track of the max score.
from elastiknn.
You can update the mapping independent of elastiknn, using the regular REST API.
For example:
- Create an index using the elastiknn client. This will have a mapping that contains an
elastiknn_vector
field.- Use the PUT Mapping API to add another field.
You don't have to use the client at all for index creation. It's just a convenience. You can create the index using the REST API and then also use the REST API to PUT a mapping that contains an
elastiknn_vector
field.How do you convert an image to the original image pixel?What python library are you using?, I used the feature vector to achieve the similar effect between the pictures, the effect is not ideal
I think you are asking how to store the original image and the feature vector? If that's the case, I would recommend two options:
- Store the images in another storage system, like S3 or some directory on your computer. Then store a reference to the original image in the document. For example, have a field called
image_name
that contains"my-image-123.jpg"
. - Store the original image in elasticsearch as a base64-encoded string.
Generally option 1 is better than option 2 because option 2 uses much more space in elasticsearch.
from elastiknn.
You can update the mapping independent of elastiknn, using the regular REST API.
For example:
- Create an index using the elastiknn client. This will have a mapping that contains an
elastiknn_vector
field.- Use the PUT Mapping API to add another field.
You don't have to use the client at all for index creation. It's just a convenience. You can create the index using the REST API and then also use the REST API to PUT a mapping that contains an
elastiknn_vector
field.How do you convert an image to the original image pixel?What python library are you using?, I used the feature vector to achieve the similar effect between the pictures, the effect is not ideal
I think you are asking how to store the original image and the feature vector? If that's the case, I would recommend two options:
- Store the images in another storage system, like S3 or some directory on your computer. Then store a reference to the original image in the document. For example, have a field called
image_name
that contains"my-image-123.jpg"
.- Store the original image in elasticsearch as a base64-encoded string.
Generally option 1 is better than option 2 because option 2 uses much more space in elasticsearch.
Have you adopted elasticsearch to achieve similar figure search for project reference?
from elastiknn.
Have you adopted elasticsearch to achieve similar figure search for project reference?
I used option 1 to implement this example: http://demo.elastiknn.klibisz.com/dataset/cifar-l2
This is the code used to generate the documents which include the base64-encoded images: https://github.com/alexklibisz/elastiknn/blob/master/examples/demo/indexer/index.py#L72-L84
This is the code which indexes the documents: https://github.com/alexklibisz/elastiknn/blob/master/examples/demo/indexer/index.py#L118-L125
from elastiknn.
Have you adopted elasticsearch to achieve similar figure search for project reference?
I used option 1 to implement this example: http://demo.elastiknn.klibisz.com/dataset/cifar-l2
This is the code used to generate the documents which include the base64-encoded images: https://github.com/alexklibisz/elastiknn/blob/master/examples/demo/indexer/index.py#L72-L84
This is the code which indexes the documents: https://github.com/alexklibisz/elastiknn/blob/master/examples/demo/indexer/index.py#L118-L125
I'm not very good at generating base64 encoded images using what you said, and I can't index documents.I installed the dependent libraries first and then ran the index.py file
from elastiknn.
from elastiknn.
I see. I can try to make a simple image search tutorial in a jupyter notebook. I think it will be a common usecase. But right now I'm on vacation so that would be next week at the earliest.
…
On Wed, May 27, 2020, 01:33 zhenzi @.***> wrote: Have you adopted elasticsearch to achieve similar figure search for project reference? I used option 1 to implement this example: http://demo.elastiknn.klibisz.com/dataset/cifar-l2 This is the code used to generate the documents which include the base64-encoded images: https://github.com/alexklibisz/elastiknn/blob/master/examples/demo/indexer/index.py#L72-L84 This is the code which indexes the documents: https://github.com/alexklibisz/elastiknn/blob/master/examples/demo/indexer/index.py#L118-L125 I'm not very good at generating base64 encoded images using what you said, and I can't index documents.I installed the dependent libraries first and then ran the index.py file — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#70 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5E27H4TLXH27NGSHD4ATDRTS645ANCNFSM4NIHLFTQ .
Ok, so I just want to know that the image is similar and the eyes look a little bit similar.But the images I searched for using the elastiknn plugin didn't look the same
from elastiknn.
@yu258 I made an issue for adding an image search example in Python: #71
I'm going to close this issue. Feel free to comment/re-open if you need.
from elastiknn.
Related Issues (20)
- Cross-build for Elasticsearch 7.x and 8.x HOT 11
- Stop publishing Scala and Java libraries
- Migrate to Scala 3
- JAVA api
- RecallSuite tests are extremely slow in Github Actions HOT 2
- Adding elastiknn as an extension in the Elastic cloud fails with releases 8.4.2.1 and 8.4.3.0 HOT 4
- Migrate documentation site to github pages HOT 1
- Integrate with Coveralls for test coverage
- Try PyLucene for ann-benchmarks implementation
- Upgrade ann-benchmarks to 8.6.2 (or latest)
- Try Vectors from Project Panama for vector similarity computations HOT 1
- Plugin [.installing-18148280304972249747] is missing a descriptor properties file HOT 1
- Run benchmarks in Github Actions on a standalone EC2 instance HOT 1
- Try vectors from Project Panama for LSH operations HOT 3
- can't create a mapping HOT 1
- Try quick select algorithm for KthGreatest implementation HOT 4
- Try resampling vectors to speed up L2LshModel
- Try getting rid of HashAndFreq to minimize allocations HOT 1
- Try re-using threadlocal arrays in ArrayHitCounter HOT 2
- Try caching the query vector's FloatVector segments when computing distance HOT 2
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 elastiknn.