28mm / Fovea

unified cli for various saas image classification apis.
MIT License
40 stars 5 forks source link

--max-labels <int> #15

Closed 28mm closed 7 years ago

28mm commented 7 years ago

--confidence <float> provides a means of limiting output by relevance. --max-labels <int> would provide a means of getting a larger set of less relevant labels. While may be useful in very busy scenes, but also as a way of probing the catalog of concepts each service is able to classify.

28mm commented 7 years ago

Initial--max-labels <int> implementation. For most services, it limits the number of results printed in tabular output mode. Google accepts a max_results parameter, so in its case, the value of max_labels is passed along as max_results

[user@host]$ for p in google microsoft amazon clarifai imagga watson ; do
> echo -ne "${p}:\t "
> fovea http://farm1.static.flickr.com/16/91828928_1f43e02555.jpg --provider $p --max-labels 1
> done
google:  0.9364656  musical instrument
microsoft:   0.9704356789588928 music
amazon:  0.9169940948486328 Lute
clarifai:    0.99747455 wood
imagga:  1.0    guitar
watson:  0.993  dulcimer (musical instrument)
28mm commented 7 years ago

Existing solution satisfactory.