question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use KNN with Apache Solr?

See original GitHub issue

Previously, we were using this system when we were recogniting multiple faces for per person. But now, we have switched the database system following the #238 (BTW, Thanks @khaledabbad for recommended us to use Apache Solr) issue and the results and speeds are amazing!

Now, the system works flawlessly for single-trained face if this structure is being used:

     Structure:
        <train_dir>/
        β”œβ”€β”€ <person1>/
        β”‚   β”œβ”€β”€ <single>.jpeg
        β”œβ”€β”€ <person2>/
        β”‚   β”œβ”€β”€ <single>.jpeg
        β”œβ”€β”€ <person3>/
        β”‚   β”œβ”€β”€ <single>.jpeg
        └── ...

If we have datas like this structure:

     Structure:
        <train_dir>/
        β”œβ”€β”€ <person1>/
        β”‚   β”œβ”€β”€ <somename1>.jpeg
        β”‚   β”œβ”€β”€ <somename2>.jpeg
        β”‚   β”œβ”€β”€ ...
        β”œβ”€β”€ <person2>/
        β”‚   β”œβ”€β”€ <somename1>.jpeg
        β”‚   └── <somename2>.jpeg
        └── ...

… the system does not learn a single person with more than one face. Because we have not implemented KNN algorithm yet.

The question is: How can we use the KNN algorithm with this structure (using with 128-column database design) ?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
anigogocommented, Jun 7, 2019

@Dentrax can you share the source code if possible

Thanks

0reactions
PonraJS-21commented, Dec 11, 2020

Previously, we were using this system when we were recogniting multiple faces for per person. But now, we have switched the database system following the #238 (BTW, Thanks @khaledabbad for recommended us to use Apache Solr) issue and the results and speeds are amazing!

Now, the system works flawlessly for single-trained face if this structure is being used:

     Structure:
        <train_dir>/
        β”œβ”€β”€ <person1>/
        β”‚   β”œβ”€β”€ <single>.jpeg
        β”œβ”€β”€ <person2>/
        β”‚   β”œβ”€β”€ <single>.jpeg
        β”œβ”€β”€ <person3>/
        β”‚   β”œβ”€β”€ <single>.jpeg
        └── ...

If we have datas like this structure:

     Structure:
        <train_dir>/
        β”œβ”€β”€ <person1>/
        β”‚   β”œβ”€β”€ <somename1>.jpeg
        β”‚   β”œβ”€β”€ <somename2>.jpeg
        β”‚   β”œβ”€β”€ ...
        β”œβ”€β”€ <person2>/
        β”‚   β”œβ”€β”€ <somename1>.jpeg
        β”‚   └── <somename2>.jpeg
        └── ...

… the system does not learn a single person with more than one face. Because we have not implemented KNN algorithm yet.

The question is: How can we use the KNN algorithm with this structure (using with 128-column database design) ?

Could you please tell me what field type you used in Apache solr?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Machine Learning | Apache Solr Reference Guide 7.7
The knn function searches the rows of a matrix for the k-nearest neighbors of a search vector. The knn function returns a matrix...
Read more >
Apache Solr Neural Search Knn benchmark - Sease
In this blog post, we are going to measure KNN Search performance in Apache Solr from different points of view.
Read more >
Classifying Content with Apache SOLR - Zaizi
Once the document is received by the custom Apache Solr update request processor, it will be classified by Lucene classifier using either NaiveΒ ......
Read more >
Neural Search Comes to Apache Solr: Approximate Nearest ...
This talk explores the first Apache Solr official contribution about this topic, ... and how Approximate K-Nearest Neighbor (KNN) vector search works.
Read more >
k-nearest neighbor (kNN) search | Elasticsearch Guide [master]
To run a kNN search, you must be able to convert your data into meaningful vector values. You create these vectors outside of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found