8 Azure Computer Vision
20200806 The MLHub package azcv utilises the Azure Computer Vision cloud API to access closed source pre-built models for computer vision tasks. The package provides a demonstration, a graphical user interface, and command line tools that utilise the pre-built models.
Individual command line tools are packaged for common computer vision tasks including image analysis to extract descriptions of the images, word recognition from images, landmark identification, thumbnail generation, and more. The command line tools can be used within command pipelines for tasks including the tagging of personal photos folder, analysis of images from a cameras monitoring a bird feeder, reading street signs to support a driver, and reading handwritten texts.
A free Azure subscription allowing up to 5,000 transactions per month with a maximum of 20 per minute (last checked at Azure Pricing 20210316) is available from https://azure.microsoft.com/free/. After subscribing visit https://portal.azure.com and Create a resource under AI and Machine Learning called Cognitive Services. Once created you can access the web API subscription key and endpoint from the portal. These will be prompted for when running a command, and then saved to file to reduce the need for repeated authentication requests.
Most of the commands provided by the package take an image as a parameter which may be a URL or a path to a local file. For brevity through this chapter the URLs we use are short URLs generated through bitly.
To install, configure, and demonstrate the package:
ml install azcv ml configure azcv ml readme azcv ml commands azcv ml demo azcv ml gui azcv
In addition to the demo and gui commands the package supports many computer vision operations including adult, brands, category, celebrities, color, describe, faces, landmarks, objects, ocr, tags, thumbnail, and type.
The source code for this MLHub package is available from github: https://github.com/gjwgit/azcv.
Azure-based models, unlike the MLHub models in general, use closed source services which have no guarantee of ongoing availability and do not come with the freedom to modify and share. This cloud based service also sends your image files to Azure for analysis.
Your donation will support ongoing development and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 1995-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0.