Microsoft - AI-102 Study Guide

    4: Implement computer vision solutions

    This chapter builds production computer vision workloads on Microsoft Foundry, walking through Azure Vision in Foundry Tools for image analysis, OCR, and handwriting recognition, Custom Vision for trained classification and detection models, and Azure AI Video Indexer plus Vision Spatial Analysis for video understanding. The focus is on feature selection, request shaping, response parsing, custom model training and publishing, and the decision criteria that map a business problem to the right vision service.

    Learning Objectives

    By the end of this chapter, you will be able to:

    • Select visual features to meet image processing requirements, including training a custom image model for image classification and object detection
    • Detect objects in images, generate image tags, and evaluate custom vision model metrics
    • Include image analysis features in an image processing request and publish a custom vision model
    • Interpret image processing responses and consume a custom vision model from client code
    • Extract text from images using Azure Vision in Foundry Tools and build a custom vision model code first
    • Convert handwritten text using Azure Vision in Foundry Tools and extract insights from videos and live streams with Azure AI Video Indexer
    • Choose between image classification and object detection models, and detect presence and movement of people in video with Vision Spatial Analysis
    • Label images for supervised training, including bounding box annotation, multilabel tagging, and class balance discipline

    Executive Summary

    • Image Analysis 4.0 exposes a single REST surface with a features query parameter selecting which visual features run. Picking the correct subset keeps latency low, bills minimal, and responses small.
    • Custom Vision handles domain-specific recognition that the prebuilt Image Analysis features cannot solve. It splits into image classification (whole-image label) and object detection (label plus bounding box) projects, each with its own metrics and labeling effort.
    • The prediction lifecycle for custom vision is project, tags, images, train, iteration, publish, predict. The training resource handles training; a separate prediction resource handles inference, and a published iteration is the contract between them.
    • Video understanding splits into VOD insights from Azure AI Video Indexer, near real time event detection in Vision Spatial Analysis, and frame-by-frame analysis when neither product fits.

    Assumptions

    • The reader operates an Azure subscription with a Microsoft Foundry account of kind AIServices and at least one Foundry project, as established in Chapter 1.
    • Standard endpoint pattern is https://<resource>.cognitiveservices.azure.com/ for Azure AI services accounts; Custom Vision uses its own pair of <project>.cognitiveservices.azure.com endpoints for training and prediction.
    • Code samples use Python with the azure-ai-vision-imageanalysis, azure-cognitiveservices-vision-customvision, and azure-ai-vision-face packages and the DefaultAzureCredential flow from azure-identity.
    • Image Analysis features described correspond to the 4.0 GA API with the api-version=2024-02-01 contract; legacy Computer Vision 3.x is identified explicitly when mentioned.
    • Custom Vision and Image Analysis 4.0 are positioned as separate products: Custom Vision is a portal-and-API product hosted at customvision.ai; Image Analysis 4.0 is the prebuilt Florence-based vision API under Azure Vision in Foundry Tools.

    Sections in this chapter

    1. Free
    2. Free with account
    3. Free with account
    4. Free with account
    5. Free with account
    6. Free with account
    7. Free with account
    8. Free with account
    9. Free with account