Convolutional Neural Networks (CNNs)
Convolutional Neural Networks (CNNs) convert raw pixels into progressively richer visual features. Think of a CNN as a system that scans an image for local patterns (edges, textures, colors) and combines those patterns into higher-level concepts (shapes, object parts) that are useful for tasks like classification, detection, and segmentation. How training works (high level)- Collect labeled images (e.g., apples, oranges, bananas).
- Learn convolutional filters that detect informative local patterns.
- Stack layers so deeper layers build on earlier features.
- Use classification (dense) layers to map extracted features to class scores.


Model output scores indicate how strongly a model favors each class but are not guaranteed to be perfectly calibrated probabilities. Treat these scores as informative signals and apply calibration or uncertainty measures when required by your application.
- Photo organization and image search
- Object detection and instance segmentation
- Facial recognition and biometric analysis
Vision Transformers (ViT)
Vision Transformers adapt transformer architectures from NLP to images by converting image patches into a sequence of token-like embeddings. Each patch becomes an embedding vector, and the transformer then models relationships among those patches using self-attention. Why patching works- Splitting an image into fixed-size patches turns spatial data into a sequence.
- Each patch becomes a visual token, analogous to a word embedding in language models.
- Transformers process the sequence and learn global relationships between patches.


- ViT variants are excellent for tasks needing global reasoning, such as document layout analysis or complex scene understanding.
- Vision embeddings integrate well with text embeddings in multimodal systems (image + text), enabling tasks like image captioning and visual question answering.
Multimodal models combine visual and textual embeddings to answer questions about images or generate captions. For example, an assistant might analyze a photo of your fridge and respond: “You have spinach and tomatoes,” by aligning visual features with your language query.
- Azure AI Vision: image analysis, OCR, and structured extraction — https://learn.microsoft.com/azure/ai-services/vision/
- Azure OpenAI: multimodal models that accept images and return text responses — https://learn.microsoft.com/azure/ai-services/openai/
Diffusion Models (Generative Models)
Diffusion models are generative models trained to reverse a noise-adding process. During training, images are progressively corrupted by noise; the model learns to predict and remove that noise. During generation, the model starts from random noise and iteratively denoises it into a final image, often guided by a text prompt. High-level generation pipeline- Start from random noise.
- Apply a sequence of learned denoising steps.
- Optionally use prompts (text or image guidance) to steer denoising.
- After many iterations, output the synthesized image (or video).


- Diffusion models excel at generating high-fidelity images and supporting flexible guidance (text prompts, image-conditioned generation).
- Generation is iterative and computationally heavier than single-shot methods, but it often produces superior detail and diversity.
Quick Comparison
Final takeaway
CNNs, Vision Transformers, and Diffusion Models form a complementary toolkit for modern computer vision:- Use CNNs for efficient hierarchical feature extraction and classical vision tasks.
- Use ViT when global relationships and multimodal fusion matter.
- Use Diffusion Models for high-quality, prompt-driven image generation.
Links and References
- Azure AI Vision — https://learn.microsoft.com/azure/ai-services/vision/
- Azure OpenAI Service — https://learn.microsoft.com/azure/ai-services/openai/
- For deeper reading on transformers in vision: “An Image is Worth 16x16 Words” (Dosovitskiy et al.)