12.19 azcv thumbnail

Thumbnails require more than simply generating a small square section from an image. Ideally it is in some way representative of the image. The thumbnail command will choose a “good” region of the image to display as a thumbnail.

$ ml thumbnail azcv img.jpg
img-thumbnail.jpg

Here we demonstrate one specific capability of Azure Computer Vision cognitive service, generating thumbnails from photos, as exposed through the MLHub package azcv.

Generating a thumbnail from a photo may sound like a pretty simple task. However, what should go into the thumbnail to give the most informative indication of the content of the full photo. This is the task addressed by the thumbnail service as part of the computer vision cognitive service.

As a command line tool an input image file is supplied and a thumbnail image file is created with the same name but with -thumbnail appended to the file name and saved locally.

$ ml thumbnail azcv https://images.pexels.com/photos/338515/pexels-photo-338515.jpeg
pexels-photo-338515-thumbnail.jpeg

$ ml thumbnail azcv http://cdn1.thr.com/sites/default/files/2013/11/marina_bay_sands_singapore_a_l.jpg
marina_bay_sands_singapore_a_l-thumbnail.jpg

$ ml thumbnail azcv https://access.togaware.com/landmark01.jpg
landmark02-thumbnail.jpg

$ ml thumbnail azcv https://www.wayoutback.com.au/assets/Uploads/Uluru.jpg
Uluru-thumbnail.jpg

Notice how the whole of Uluru is included in the thumbnail. This illustrates how the model can identify the best thumbnail tuned to the main object of the photo.



Your donation will support ongoing availability 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-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0