GithubHelp home page GithubHelp logo

what-dog's Introduction

what-dog Build Status

Get the breed of a dog from an image using Microsoft's what-dog.

{
  "isDog": true,
  "breed": "Norfolk Terrier",
  "about": "Spirited, small but sturdy, feisty yet sweet personality"
}

Install

$ npm install --save what-dog

Usage

const whatDog = require('what-dog');

whatDot('http://imgur.com/B7a15F5.jpg');
    .then(doggyData => {
        console.log(doggyData);
    })

//=> {
       isDog: true,
       breed: 'Norfolk Terrier',
       about: 'Spirited, small but sturdy, feisty yet sweet personality'
     }

API

whatDot(imageUrl)

imageUrl

Type: string

Url to the image. Must be on a public server that Microsoft's servers can download to determine the caption.

Returns a promise for the doggy data.

doggy data

{
  isDog: true,
  breed: 'Norfolk Terrier',
  about: 'Spirited, small but sturdy, feisty yet sweet personality'
}

Notes

  • Requires Node 4 or newer.
  • Powered by What-Dog, a free service provided by Microsoft.
  • If you like this, you can read more at https://www.microsoft.com/cognitive-services.
  • This node module was not created by Microsoft.
  • I would consider this module "for testing only" - I do not recommend using in a production system.
  • Microsoft: I made this because I am a fan of the technology. If there are any problems, or you want to use this package name, I'm happy to discuss.

License

MIT © Dylan Greene

what-dog's People

Contributors

dylang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

what-dog's Issues

Feature: add ability to send local files

How did you figure out how to post to their API?
I don't see any docs on this sort of thing anywhere, i.e. the domain or the query params.

    return got.post('https://www.what-dog.net/Home/Analyze', {
        query: {
            isTest: 'False',
            version: '001',
            faceUrl: imageUrl,
            faceName: imageUrl
        }

I want to be able to send pictures from my local drive.

-

Completely ignore this. I am using your library (thank you very much for providing it) and accidentally opened an issue against your repo instead of mine...

Fix docs typo

Just noticed a small typo in the code example:

whatDot('http://imgur.com/B7a15F5.jpg');
    .then(doggyData => {
        console.log(doggyData);
    })

should be

whatDog('http://imgur.com/B7a15F5.jpg')
    .then(doggyData => {
        console.log(doggyData);
    })

Also saw another whatDot and doggy data instead of whatDog and doggyData in the API section.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.