Catternaut
Leverage the full power of Google's Cloud Vision resources to answer the age-old question:
Is this a cat, or not?
Prep
Instructions subject to change, especially that bit about credentials
npm install catternaut
- Add
GOOGLE_APPLICATION_CREDENTIALS
andGCLOUD_PROJECT
to your environmental variables- Get them after registering with Google through this page.
Usage
; ;// => true ;// => false
supports the following image file types: JPEG, PNG8, PNG24, GIF, Animated GIF (first frame only), BMP, WEBP, RAW, ICO src
What is this wizardry?
Google offers a computer vision service in the cloud. Uploading an image to that service will return a JSON object of labels for items in the photo, in addition to the model's confidence rating for each label. This NPM module utilizes this service to determine if there is a cat in an uploaded image, or not.
Based heavily on work done by @AbhiGulati — ty, d00d