cedws / finch Goto Github PK
View Code? Open in Web Editor NEWA proof-of-concept for enhancing and organising an image collection using Google's Vision API
License: GNU General Public License v3.0
A proof-of-concept for enhancing and organising an image collection using Google's Vision API
License: GNU General Public License v3.0
Resolved in 515dae9.
The Vision API has a request body limit of 10MB, which is easily reached when encoding high quality images to Base64.
It's possible to pass a Google Cloud Storage URI to the Vision API. If the images being processed are pushed to Cloud Storage, the process will be faster overall, because all web detection queries can be bundled into one request. It will also allow images of up to 20MB to be processed.
I would like Finch to provision a Cloud Storage container on-the-fly, upload the images to be processed, run the Vision API query, and then deallocate the container to avoid incurring unnecessary costs.
Yandex's reverse image search seems to be superior to Google's in every way. Google has also shown little interest in fixing the API quirks that I reported. I haven't been able to find an API for Yandex but perhaps there's another way (preferably without HTML scraping).
The Vision API limits the JSON request to 10MB, not the Base64 encoded image. This will cause issues in edge cases.
ImageMagick's ping
command allows the resolution of an image to be determined without fully downloading it. This could help speed things up and save bandwidth.
The output of the Marr wavelet implementation is different to pHash's.
After running Finch on a couple of thousand images, I noticed that some sites have expiry dates on the URLs given by the Vision API, and will serve dummy/error images whilst still returning 200 OK.
The only way I can think of fixing this is to introduce a perceptual hash algorithm to check that the fetched image is correct.
The gRPC offers increased performance, and no 10MB request body limit like the REST API has. This also means we can avoid provisioning a storage Bucket for the sake of circumventing these limits.
The glob
function is also returning directories. Finch attempts to upload directories as a regular file and results in a panic.
The parallel implementation is fairly inefficient. The goal is to open as many API requests as possible at once as each response can take several seconds. However, this is bottlenecked by the upload speed anyway. A better way to do this would be to asynchronously make API requests.
Sometimes the first images are higher resolution, but don't have the same aspect ratio as the target image. Images should be scored based on the perceptual hash similarity and aspect ratio similarity.
I seem to remember fixing this, but I guess it got lost along the way somewhere.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.