Study guide
3.3 Azure AI Custom Vision
Azure AI Engineer Associate AI-102
Track your progress as you read
Finished sections get a check mark.
1 Introduction
About the Azure AI Engineer Associate (AI-102) Exam Study Strategies and Exam Tips for the AI-102
2 Domain 1: Plan and Manage an Azure AI Solution (20-25%)
1.1 Azure AI Services Overview and Selection 1.2 Resource Provisioning and Configuration 1.3 Security and Access Management 1.4 Responsible AI Principles and Implementation 1.5 Azure AI Solution Architecture Patterns
3 Content Safety and Moderation (within Plan and Manage, Domain 1)
2.1 Azure AI Content Safety Overview 2.2 Prompt Shields and Adversarial Attack Detection 2.3 Text and Image Moderation Implementation 2.4 Content Filtering in Azure OpenAI Service
4 Domain 4: Implement Computer Vision Solutions (10-15%)
3.1 Azure AI Vision — Image Analysis 4.0 3.2 Azure AI Face Service 3.3 Azure AI Custom Vision 3.4 Optical Character Recognition (OCR) 3.5 Video Analysis and the Retired Spatial Analysis
5 Domain 5: Implement Natural Language Processing Solutions (15-20%)
4.1 Azure AI Language — Text Analytics Features 4.2 Conversational Language Understanding (CLU) 4.3 Custom Text Classification and Custom NER 4.4 Azure AI Speech Services 4.5 Azure AI Translator Service 4.6 Question Answering and Conversational AI
6 Domain 6: Implement Knowledge Mining and Information Extraction Solutions (15-20%)
5.1 Azure AI Search — Fundamentals and Architecture 5.2 AI Enrichment with Skillsets 5.3 Azure AI Document Intelligence
7 Domain 2: Implement Generative AI Solutions (15-20%)
6.1 Azure OpenAI Service — Models and Deployment 6.2 Chat Completions API and Prompt Engineering 6.3 Embeddings and Vector Search for RAG 6.4 Fine-Tuning and Model Customization 6.5 Image Generation (gpt-image; DALL-E 3 Retired) 6.6 RAG After On Your Data, and AI Agents
8 Domain 3: Implement an Agentic Solution (5-10%)
3.1 Agentic Solutions: Foundry Agent Service and the Microsoft Agent Framework
9 Exam Review: Cross-Domain Topics and Advanced Practice
7.1 Service Comparison and Selection Guide 7.2 SDK and REST API Patterns 7.3 Responsible AI Across All Domains 7.4 End-to-End Solution Architectures 7.5 Exam Day Quick Reference
3.3 Azure AI Custom Vision
Key Takeaways Explain This Topic AI
Custom Vision trains image classification (multiclass or multilabel) and object detection models from your own labeled images with minimal data.
Custom Vision uses two separate resources and keys: a Training resource and a Prediction resource; predictions go through the published iteration on the Prediction resource.
Domain-specific bases (General, Food, Landmarks, Retail) and their compact variants set the starting accuracy and whether the model can be exported.
Only compact-domain models export to TensorFlow, CoreML, ONNX, ONNX Float16, or Docker (Linux/Windows/ARM) for edge and offline use.
Minimum is 5 images per tag (15+ recommended) up to 6 MB per image; object detection needs at least 15 boxes per tag and benefits from varied angles and lighting.
Last updated: June 2026
Quick Answer: Custom Vision trains image classification and object detection models on your own data. Pick a domain (use a compact domain when you need edge/offline export), train with as few as 5 images per tag, evaluate with precision/recall/mAP, publish an iteration , then call the Prediction resource. Training and prediction use separate resources and keys.
Two Resources, Two Keys
This split trips up many candidates. Custom Vision uses a Training resource (upload images, tag, train, evaluate, publish) and a Prediction resource (serve published iterations). The publish_iteration call needs the prediction resource's Azure ID, and inference uses the prediction key and endpoint — never the training key.
Classification vs. Object Detection
- Image Classification Object Detection
- Task Label the whole image Locate + label objects
- Output Tag(s) + probability Bounding box + tag + probability
- Labeling Tag the image Draw boxes
- Min data 5 images/tag ~15 boxes/tag
Classification types: Multiclass assigns exactly one tag per image (cat or dog — mutually exclusive). Multilabel allows several tags at once (outdoor and sunny and beach).
Project Setup and Training from azure.cognitiveservices.vision.customvision.training import CustomVisionTrainingClient
from msrest.authentication import ApiKeyCredentials
- trainer = CustomVisionTrainingClient(training_endpoint,
- ApiKeyCredentials(in_headers={"Training-key": training_key}))
- project = trainer.create_project("Quality Inspection",
- domain_id=general_domain_id, classification_type="Multiclass")
- good = trainer.create_tag(project.id, "Good")
- bad = trainer.create_tag(project.id, "Defective")
with open("good1.jpg", "rb") as f:
trainer.create_images_from_data(project.id, f.read(), tag_ids=[good.id])
iteration = trainer.train_project(project.id) # quick training
Quick training finishes in minutes and is fine for prototyping; Advanced training lets you set a budget in hours and usually yields higher accuracy on hard datasets — choose it when a question stresses maximum accuracy and tolerates longer training.
Evaluating an Iteration
Custom Vision reports metrics at the probability threshold you set in the portal. Raising the threshold typically increases precision but lowers recall.
- Metric Question it answers Target
- Precision Of items predicted as a class, how many were correct? > 90%
- Recall Of true items of a class, how many were found? > 90%
- AP Area under the precision/recall curve, per tag > 80%
- mAP Mean AP across all tags (detection quality) > 80%
Low precision with high recall means many false positives — raise the threshold or add negative examples. Low recall means misses — add more, more varied training images.
Publish and Predict trainer.publish_iteration(project.id, iteration.id, "v1", prediction_resource_id)
- from azure.cognitiveservices.vision.customvision.prediction import CustomVisionPredictionClient
- predictor = CustomVisionPredictionClient(prediction_endpoint,
- ApiKeyCredentials(in_headers={"Prediction-key": prediction_key}))
with open("test.jpg", "rb") as f:
r = predictor.classify_image(project.id, "v1", f.read())
for p in r.predictions:
print(p.tag_name, f"{p.probability:.2%}")
You must publish an iteration and reference it by its published name; an unpublished iteration cannot be called for prediction.
Domains and Edge Export
- Domain Best for
- General / General (compact) Broad, mixed images
- Food Dishes, menus
- Landmarks Natural + built landmarks
- Retail Products on shelves
Only compact domains export. Standard domains are cloud-only but more accurate.
- Export format Target
- TensorFlow / TF Lite Android, Linux, IoT
- CoreML iOS, macOS
- ONNX (incl. Float16) Windows, ONNX runtimes
- Docker (Linux/Windows/ARM) Containers, Azure IoT Edge
Vision AI DevKit Edge camera hardware export = trainer.export_iteration(project.id, iteration.id, platform="ONNX")
- # download from export.download_uri
- Training Data Best Practices
- Practice Recommendation
- Min images per tag 5 (absolute), 15+ recommended
- Object detection At least 15 tagged boxes per object
- Balance Similar counts across tags
- Variety Different angles, lighting, backgrounds
- Negatives Add a "none/negative" set to cut false positives
- Image size >= 256x256 px, <= 6 MB each
- Worked Example
A factory tablet must flag defective parts offline on the line. Create a Multiclass project on General (compact) , train Good vs. Defective with 15+ images each, confirm precision and recall above 90% at the chosen threshold, publish, then export to ONNX (or a Docker container for IoT Edge) so inference runs on-device with no cloud round trip.
Iterations, Retraining, and Quotas
Each time you click train, Custom Vision creates a new iteration — a versioned snapshot of the model. You can keep several iterations and compare their precision/recall before publishing one, and you can roll back by republishing an older iteration under the same name. Projects have limits worth remembering: a classification project supports many tags but the free (F0) tier caps total training images and project count, while the standard (S0) tier raises those ceilings. When a project hits its iteration limit, you must delete an old iteration before training again — a scenario the exam phrases as "training fails after many experiments."
Smart Labeler and Active Learning
After you publish a model and it starts predicting on real images, the Custom Vision portal stores those prediction images. Active learning surfaces images the model was unsure about so you can correct their tags and feed them back into training, steadily improving accuracy on real-world data. The Smart Labeler can pre-tag new uploads using the current model so a human only verifies rather than labels from scratch. Both features matter for the exam's "how do you improve a deployed model over time?" questions — the answer is to incorporate prediction images via active learning and retrain, not to start a brand-new project.
On the Exam: "Edge" or "offline" => compact domain + export. Confusing the training key with the prediction key, or calling an unpublished iteration, are the two most common failure scenarios. Improving a live model => active learning on stored prediction images , then retrain a new iteration.