-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: the input array must have size 3 along channel_axis
, got (923, 600)
#154
Comments
I've got my environment setup using I'm using ElasticSearch version 7.16 and using the elasticsearch 8.0.0 Python library. I'm simply trying to get the image indexed to return as a result when searching and similar images, but the images returned are not close to similar or exactly matching at all. |
FYI, if there is someone out there who would be interested in helping me with this I'd be more then willing to tip them or some other sort of payment. |
I changed the elasticsearch version to 7.0.0 and reindexed all the images after I got the scikit-image version to 0.17.2 and it is now working! 🎆 |
Interestingly enough this seems to be the same issue logged in this issue #64. I'm unable to determine if it was actually resolved or not though. |
It seems now that the issue is the score that is being associated with the results. Not sure how to resolve this one yet. |
I do not fully understand the vector / word storage in elasticsearch yet, but I'm starting to think that the logic behind this entire project is flawed unless the score is not accurately being calculated for some reason on my end of things. |
I've implemented a dense_vector field on the elasticsearch index at this point and have changed the query for searching to
Unfortunately this is still not returning an accurate result for the example provided above. |
At this point I'm unable to figure this out. Ultimately the issue boils down to the fact that the score that is being generated is inaccurate when compared to the distance and the results are being ordered by the distance after the query has run. At this point I think the only option is to literally pull all 500,000 results that will ultimately be in the database as the elasticsearch word query seems inaccurate and I'm unable to get the dense vector object to work. |
@selected-pixel-jameson I got the same error while performing search on image-search, elasticsearch as a database running on docker |
by changing first argument as "path" from "transformed_img" while make_record function in line "273" solves the issue from this --> l = self.search_single_record(transformed_record, pre_filter=pre_filter) as you can see in make_record function - first argument is expected to be "path" |
But it still not able to perform search on different orientation of image. What are your views on this? |
@A7-4real I'll have to investigate your solution further. Would require me to revert some changes I've made. Did you ever get the orientation piece working? That part is something I really need to get working. However, I would point out that the issue I'm having is not something you are going to see with a small dataset. I ended up reworking the search_single_record function to this.
I've been getting pretty accurate results for one of the purposes I need this for, but when the images are off or skewed or distorted it doesn't work very well. |
When performing a search on the database I'm getting this error.
I'm running Python 3.8 and had to update the packages to get them to compile. I had to use 3.8 because I'm running on a Macbook Pro M1 and anything lower will not compile. When I use this version of python I have to install the latest version of scikit-image or it won't compile when trying to install the package via pip.
These are the package versions that I have
elasticsearch==8.0.0
scikit-image==0.19.2
six==1.15.0
flask==2.0.3
In order to fix this issue I had to change the following lines of code.
When I search for the exact image that is in the path it does not return accurate results.
Any guidance would be greatly appreciated! Thank you.
The text was updated successfully, but these errors were encountered: