(This page has no text content)
(This page has no text content)
Microsoft Azure AI: A Beginner’s Guide Explore Azure Applied AI Services, Azure Cognitive Services and Azure Machine Learning with Practical Illustrations Rekha Kodali Sankara Narayanan Govindarajulu Mohammed Athaulla www.bpbonline.com
FIRST EDITION 2022 Copyright © BPB Publications, India ISBN: 978-93-55510-518 All Rights Reserved. No part of this publication may be reproduced, distributed or transmitted in any form or by any means or stored in a database or retrieval system, without the prior written permission of the publisher with the exception to the program listings which may be entered, stored and executed in a computer system, but they can not be reproduced by the means of publication, photocopy, recording, or by any electronic and mechanical means. LIMITS OF LIABILITY AND DISCLAIMER OF WARRANTY The information contained in this book is true to correct and the best of author’s and publisher’s knowledge. The author has made every effort to ensure the accuracy of these publications, but publisher cannot be held responsible for any loss or damage arising from any information in this book. All trademarks referred to in the book are acknowledged as properties of their respective owners but BPB Publications cannot guarantee the accuracy of this information. www.bpbonline.com
Foreword As Senior Vice President – Everything on Azure Solutions at Avanade Inc, I see Artificial Intelligence (AI) as the core pillar for Digital Transformation across all verticals and customer segments. The concept of AI has fascinated a lot of free thinkers and frightened others. A few refer to AI as a great leap towards building future businesses, while some bashes the idea based on fears that might lead to human extinction. While AI technologies are still far from creating a self-aware and self- evolving AI that might take over the earth, for a fact - AI already has a big impact on almost every facet of our lives. AI has given businesses across industries a chance to leverage it to build future products, services, optimize operations, and drive invaluable insights for improving Customer experience and Employee experience. Each year, new developments are being made with artificial intelligence and automation that businesses can use in various innovative ways. But guess what, the availability of AI Skilled Professionals is one biggest blocker in the accelerated adoption of AI. What like about this book is that it provides practical guidelines for different personas right from CTO level to AI Architect or AI Consultant or a beginner AI Developer. This book makes it easy to learn Microsoft Azure AI concepts, common use cases, covers the basics and advanced concepts of Azure AI. The book is well structured and covers a vast number of Azure AI and PaaS capabilities. The best way to learn new technology is to try your hands on developing simple apps and writing the code. This book helps with addressing that aspect with well-explained working code samples. I enjoyed the chapter covering the basics of the Azure AI platform, and concepts of the Azure AI ecosystem and services. This is a must-read book if you want to learn about Azure Cognitive Services, Azure Computer Vision, Azure Applied AI Services, and Azure Machine Learning with practical examples to build intelligent applications in the domain of Image
Processing, Object Detection, Text Recognition, OCR, Spatial Analysis and Face Recognition. Do not forget to test your knowledge against well-crafted Multiple-Choice questions at the end of each chapter. Nice to reinforce the learning objective. Book also provides technical content and insights Azure Applied AI Services like Azure Form Recognizer, Azure Metrics Advisor, Azure Cognitive Search, Azure Immersive Reader, Azure Video Analyzer for Media, and Azure Bot Service. Books do a great job in developing a good understanding of BoT development options, BOT Framework, how to leverage Bot Framework Emulator, NLP capabilities to enhance conversational interfaces. From me bonus, part of the book is the concluding chapter, which covers concepts about infusing ML in Custom Applications using ML.NET. Perhaps the most remarkable thing about this book is that it provides an AI practitioner perspective and structured approach to learning Azure AI. By the end of this book, I am sure, you would have immersed yourself with practical experience of working with Azure AI, Azure ML services, and APIs and tools available in the Azure AI Platform. Wishing the authors all the very best for this new endeavor. Gaurav Aggarwal
Dedicated to My Parents Dr. Vaikunta Rao & Ramamani —Rekha
About the Authors Rekha Kodali is a Principal Director in Accenture. With more than 23 years of experience in Microsoft Technologies, her focus areas include Azure, Enterprise Architecture, Microservices, Solution Architecture, Presales and Innovation. She has been instrumental in creating differentiated solutions and service offerings. Her certifications include TOGAF, IASA certified Foundation Architect and Azure Solutions Architect Expert and several other MS certifications. She has published multiple research papers. She is the author of a book: Developing Cloud Native Applications In Azure Using .Net Core: A Practitioner's Guide to Design, Develop and Deploy Apps Paperback – 1. LinkedIn Profile: https://www.linkedin.com/in/rekha-kodali-3561201b/ Sankara Narayanan Govindarajulu is a Solution Architect at Microsoft, helping with partners and customers on their digital transformation journey. Throughout his career of 23 years, Sankara has put his profound experience along with his passion in compelling ways to help customers in strategic decision making, project execution, architecture and design, and development of enterprise solutions covering various aspects such as availability, performance, security, business continuity, cloud migration and transformation across platforms and technologies. Sankara is TOGAF certified, and has certifications in Azure Migration, Architecture, Development and Security. He has published a book, a few journals and presented in internal technical conferences on multiple occasions. His LinkedIn Profile: https://www.linkedin.com/in/sankara-narayanan- g/ Mohammed Athaulla is a Lead developer at Wipro Technologies with more than 10 years of experience in Microsoft technologies. He has hands- on experience in development and customization of software applications using various technologies such as Azure, ASP.net core MVC, Web API,
Angular, JavaScript, SQL Server etc. He led the development of a large AI based solution. His LinkedIn Profile is https://www.linkedin.com/in/athaulla/
About the Reviewer Suryanarayana Murty Eranki has 24 years of practice leadership in architecting & delivering cloud solutions, with significant experience in IT software. He is an accomplished and technically sophisticated leader with proven success in architecting and implementing large, complex, and business critical technology projects across the project life cycle. As a Cloud solutioning expert, helping enterprises adopt public cloud platforms such as Microsoft Azure, Amazon Web Services and Google. He has worked with companies like Wipro, Tech Mahindra, Cognizant, Genpact and currently he is leading a Cloud consulting boutique, Apware - Hyderabad as an Executive Director to deliver Microsoft Azure and AI/ML focussed solutions to their customers. LinkedIn Profile: https://www.linkedin.com/in/eranki/
Acknowledgements Rekha Kodali: I would like to thank and acknowledge the guidance, inspiration and support provided by my mentors Venkata Guru Prasad Kandarpi and Hari Kishan Burle. I would like to thank my kids (Sireesh and Tarun), my brothers and Sarath, my husband for their support. Sankara Narayanan Govindarajulu: Thankful to family, friends, colleagues and reviewers whose support and inspiration made this possible Mohammed Athaulla: I am extremely grateful to my parents, wife, and son (Zayan). It would not have been possible without their support.
Preface The recent years have proved that AI is quickly becoming the “new normal” at organizations of all sizes. Organizations across industries are revamping their strategies and investments for future with AI becoming one of the top priorities. The objective of this book is to provide practical guidelines that might help you if you are in a role of a CTO/ Architect / Designer / Consultant / Developer or even a Beginner in their AI journey. We believe this book will make it easy to learn Azure AI concepts and covers the basics and also some advanced concepts of Azure AI. The book is divided into 8 chapters. Software professionals interested in Azure AI development would benefit from this book. Chapter 1 gives a basic introduction to the services/components provided by Azure to build AI based applications, Azure Cognitive Services, and Azure Computer Vision. After reading this chapter, the reader will be able to understand Azure AI Platform, the core concepts of Azure Cognitive Services and various services available within Azure Computer Vision. Chapter 2 introduces Azure Vision APIs for developing custom applications which can be used for processing images, recognizing faces and detecting objects. After reading this chapter, the reader will have the skills that make it possible to effectively build applications by leveraging Image Analytics, Content Moderation, Object Detection, Face Recognition, and Custom Vision Services. Chapter 3 introduces Handwriting Recognition, Optical Character Recognition, Face API, and Spatial Analysis. After reading this chapter, the reader will have the skills that make it possible to effectively build applications by leveraging Handwriting Recognition, Optical Character Recognition, Face API and Spatial Analysis. Chapter 4 explores how to leverage Decision, Language, Speech, and Web Search in the applications. After reading this chapter, the reader will understand how to effectively build applications leveraging each of the APIs.
Chapter 5 makes the reader understand Azure Applied AI Services. We will delve a little deep into Azure Form Recognizer, Azure Metrics Advisor, Azure Cognitive Search, Azure Immersive Reader, and Azure Video Analyzer for Media. By the end of this chapter, the reader will understand how to effectively leverage these services. Chapter 6 takes the reader through the Microsoft Bot Landscape including the Bot Framework, the Bot Framework Composer after a brief introduction of Bots and how they have evolved over the years. We will look at what the different options have to offer Bot Framework has to offer, the best practices and scenarios, a simple example using the Bot Framework with using QnA and include NLP (LUIS) capabilities as well and also understand how to develop/debug Bots locally with the Bot Emulator, Bot Composer and its features and a quick example. Chapter 7 introduces ML.NET. The reader will learn how to leverage ML.NET which is a cross-platform, open source machine learning framework. After reading this chapter the reader will understand how a ML model can be developed and then exposed as an API or a web service. The reader will also understand how it can be invoked from .NET code. Chapter 8 introduces Azure Machine Learning Studio. The reader will learn to create models, score models and run experiments and also learn about Accord Framework. The reader will get a view on ML Ops and a brief overview of migration from classic ML Studio Azure Designer.
Code Bundle and Coloured Images Please follow the link to download the Code Bundle and the Coloured Images of the book: https://rebrand.ly/137e75 The code bundle for the book is also hosted on GitHub at https://github.com/bpbpublications/Microsoft-Azure-AI-A-Beginner-s- Guide. In case there's an update to the code, it will be updated on the existing GitHub repository. We have code bundles from our rich catalogue of books and videos available at https://github.com/bpbpublications. Check them out! Errata We take immense pride in our work at BPB Publications and follow best practices to ensure the accuracy of our content to provide with an indulging reading experience to our subscribers. Our readers are our mirrors, and we use their inputs to reflect and improve upon human errors, if any, that may have occurred during the publishing processes involved. To let us maintain the quality and help us reach out to any readers who might be having difficulties due to any unforeseen errors, please write to us at : errata@bpbonline.com Your support, suggestions and feedbacks are highly appreciated by the BPB Publications’ Family. Did you know that BPB offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.bpbonline.com and as a print book
customer, you are entitled to a discount on the eBook copy. Get in touch with us at: business@bpbonline.com for more details. At www.bpbonline.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on BPB books and eBooks.
Piracy If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at business@bpbonline.com with a link to the material. If you are interested in becoming an author If there is a topic that you have expertise in, and you are interested in either writing or contributing to a book, please visit www.bpbonline.com. We have worked with thousands of developers and tech professionals, just like you, to help them share their insights with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea. Reviews Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions. We at BPB can understand what you think about our products, and our authors can see your feedback on their book. Thank you! For more information about BPB, please visit www.bpbonline.com.
Table of Contents 1. Azure AI Platform and Services Structure Objective Azure AI platform Azure Applied AI Services AI Services Trained Services (Prebuilt) Conversational AI Custom services Azure Cognitive Services Azure Vision Service Accessing the APIs Use cases Setting up Developer Tools Conclusion Multiple choice questions Answerss 2. Azure Computer Vision - Image Analysis, Processing, Object Detection Structure Objective Image processing Image analytics - Azure Computer Vision API Image Analytics -Lab Image Classification using Azure Custom Vision Service Azure Custom Vision Service-Image Classification Lab Object detection using Azure Custom Vision Service Conclusion Multiple choice questions Answers
3. Computer Vision - Optical Character Recognition, Face API, and Spatial Analysis Structure Objective Handwritten / Printed text recognition Handwriting recognition lab Face recognition Computer Vision - Face API - In Detail Computer Vision - Face API Lab Spatial Analysis Sample use cases Conclusion Multiple choice questions Questions Answers 4. Azure Cognitive Services Structure Objective Decision service Content Moderator-Use case Content Moderator-Detailed APIs Personalizer Language Service Azure Logic Apps and Functions Lab - Create Logic App using OCR and Text Analytics and Azure Functions Speech Bing Web Search Lab Azure Cognitive Services containers Conclusion Multiple Choice Questions Questions Answers 5. Azure Applied AI Services
Structure Objective Overview of Azure Applied AI Services Azure Metrics Advisor Azure Immersive Reader Azure Video Analyzer for Media Azure Form Recognizer Azure Cognitive Search Lab: Creating a Azure Cognitive Search Service Conclusion Multiple choice questions Answers 6. Bots - A Brief Introduction Structure Objective How Machines Learn – A Brief Introduction Introducing Bots The Bot Ecosystem The Bot Framework The Bot Framework Composer Cognitive Intelligence QnA Maker LUIS - Language Understanding Intelligent Service Azure Cognitive Services for Language Search Storage Information sources Build Bots using the Bot Framework Lifecycle Reference Architecture The Bot Framework Emulator Building a Basic Bot Creating a QnA KB Using the Emulator Adding LUIS to the sample Adding a LUIS Model
Adding a second QnA KB Creating a dispatch model using the Bot Framework Orchestrator Updating the BasicBot source code to include dispatch support Build and Test it using Emulator Adding the Oliver Garden FAQ as an exercise Enhancing it further Building the Bot Framework Composer Enterprise Scenarios A Customer scenario Typical use cases Conclusion Thought Experiment 7. Infusing ML in Custom Applications Using ML.NET Structure Objective Introducing ML.NET Algorithms supported by ML.NET Choosing the right algorithm Trainers Creating a ML.NET Model Samples Lab 1 - Creating Samples using ML.NET - Sentiment Analysis Lab 2 - Creating samples using ML.NET - Fare prediction Lab 3 - Creating samples using ML.NET - Issue classification ML.NET Model Builder Lab 4 - Creating sample using ML.NET Model Builder for sentiment analysis Conclusion Multiple choice questions Answers 8. Using Azure ML Studio Structure Objective Azure Machine Learning Studio
Loading comments...
Reply to Comment
Edit Comment