Computer Vision tasks differ by spatial precision and object count. Image classification assigns one label to the whole image, while localization adds a single bounding box `(x, y, w, h)`. Object detection predicts class labels and boxes for multiple items, scored using Intersection over Union (`IoU = Overlap / Union`). Instance segmentation outputs exact pixel-level masks that distinguish overlapping objects of the same class, unlike semantic segmentation.
- 1. Single-Object Tasks: Classification vs Localization
- 2. Multi-Object Detection & Bounding Box IoU
- 3. Semantic vs Instance Segmentation Masks
- 4. Bounding Box IoU & Classification Threshold Check
- 5. Comparison of Core Computer Vision Tasks (CBSE 417 / 843)
- 6. Common Mistakes & Top Scorer Tips
- 7. Interactive Concept Check Quiz
- 8. Frequently Asked Questions
1. Single-Object Tasks: Classification vs Localization
In the CBSE Class 10 AI (Code 417) Part B Computer Vision unit (part of the 40-mark subject-specific theory paper), students first distinguish between whole-image tagging and spatial locating. Image classification inspects every pixel as a unified grid and outputs a single category probability, such as predicting 'Cat' for a pet photograph. It answers what is in the picture without stating where the subject sits. Classification with localization solves that gap when exactly one primary subject appears. Alongside the class label, the model regresses four bounding box coordinates—typically top-left `(x, y)` plus width `w` and height `h`, or center `(cx, cy, w, h)`. This dual output pairs a softmax classification head with a regression head trained using Mean Squared Error or smooth L1 loss. Because localization assumes one dominant target, it fails when two dogs and a ball share the same traffic or backyard frame.
- Classification outputs one class probability vector per image with zero coordinate values.
- Localization outputs one class label plus four continuous bounding-box numbers (x, y, w, h).
- CBSE Part B exam tip: state both 'what' and 'where' when defining localization.
2. Multi-Object Detection & Bounding Box IoU
Real-world vision systems such as autonomous braking, attendance cameras, and retail shelf scanners rarely view a single isolated item. Object detection extends localization to an arbitrary number of visible objects across different classes in one pass. Two-stage detectors like Faster R-CNN propose candidate regions before classifying them, whereas single-stage detectors such as YOLO and SSD predict class scores and bounding offsets directly across grid cells. To evaluate whether a predicted box matches a ground-truth annotation in Class 12 AI (Code 843) practicals, engineers calculate Intersection over Union. You divide the overlapping rectangle area by the combined union area of both boxes. When multiple overlapping predictions target one car, Non-Maximum Suppression retains the highest-confidence box and discards duplicates whose IoU exceeds a threshold like 0.5, keeping detections crisp and uncluttered.
- IoU = Area(Pred ∩ GT) / Area(Pred ∪ GT), ranging from 0.0 (no overlap) to 1.0 (exact match).
- Non-Maximum Suppression (NMS) removes duplicate boxes around the same object.
- YOLO trades tiny accuracy margins for real-time frame rates on edge hardware.
3. Semantic vs Instance Segmentation Masks
Bounding boxes always remain axis-aligned rectangles, so tilted pedestrians, curved fruit, or surgical tools include background pixels inside the box. Segmentation solves this by classifying every individual pixel instead of drawing coarse rectangles. In semantic segmentation, every pixel receives a category ID—all cars in a street scene share the same 'car' mask color, merging two parked sedans into one blob. Instance segmentation combines object detection with pixel-level masking, as seen in Mask R-CNN. It separates 'Car 1' from 'Car 2' with distinct instance masks even when one vehicle partially occludes another. For medical cell counting, robotics grasping, and lane-aware self-driving stacks covered in Code 417 applications, instance segmentation delivers exact boundaries, pixel counts, and object-by-object tracking without merging touching neighbors.
- Semantic segmentation labels every pixel by class; identical objects merge together.
- Instance segmentation assigns both a class label and a unique instance ID per pixel.
- Mask R-CNN adds a binary mask branch alongside box regression and classification.
4. Bounding Box IoU & Classification Threshold Check
def compute_iou(box_a, box_b):
# Boxes in (x1, y1, x2, y2) format
ix1 = max(box_a[0], box_b[0])
iy1 = max(box_a[1], box_b[1])
ix2 = min(box_a[2], box_b[2])
iy2 = min(box_a[3], box_b[3])
inter_w = max(0, ix2 - ix1)
inter_h = max(0, iy2 - iy1)
inter_area = inter_w * inter_h
area_a = (box_a[2] - box_a[0]) * (box_a[3] - box_a[1])
area_b = (box_b[2] - box_b[0]) * (box_b[3] - box_b[1])
union_area = area_a + area_b - inter_area
return inter_area / union_area if union_area > 0 else 0.0
ground_truth = (10, 10, 50, 50)
predictions = [
("Box_High", (15, 15, 55, 55)),
("Box_Low", (40, 40, 80, 80)),
]
for name, pred in predictions:
iou = compute_iou(ground_truth, pred)
status = "TP (Match)" if iou >= 0.5 else "FP (Poor Overlap)"
print(f"{name}: IoU={iou:.4f} -> {status}")
Verified Console / Dry-Run Output:
Box_High: IoU=0.6203 -> TP (Match)
Box_Low: IoU=0.0323 -> FP (Poor Overlap)
5. Comparison of Core Computer Vision Tasks (CBSE 417 / 843)
| CV Task | Object Count | Output Format | Evaluation / Real-World Use |
|---|---|---|---|
| Image Classification | Single dominant | 1 class label + probability | Accuracy; medical X-ray screening |
| Classification + Localization | Single object | 1 class label + (x, y, w, h) box | IoU; single-product barcode framing |
| Object Detection | Multiple objects | N labels + N bounding boxes | mAP & IoU; traffic pedestrian alerts |
| Instance Segmentation | Multiple objects | N labels + pixel-wise masks | Mask IoU; robotic arm picking & cell count |
Master CBSE AI Computer Vision in Live 1:1 & 1:4 Micro-Pods
Practice Part B board numericals, IoU calculations, and 50-mark practical coding with 4Achievers Junior mentors for Grades 3-12.
6. Common Mistakes & Top Scorer Tips
- Avoid Mistake: Confusing semantic segmentation with instance segmentation when two identical objects touch in one image.
- Avoid Mistake: Forgetting to subtract the intersection area from the sum of both box areas when computing IoU union.
- Avoid Mistake: Assuming image classification can return coordinates without adding a regression branch.
- Examiner / Mentor Tip: In CBSE 417 Part B 2-mark questions, always contrast single-object localization against multi-object detection using a clear example.
- Examiner / Mentor Tip: Show the IoU formula step-by-step (Intersection, Box A + Box B - Intersection, Ratio) to secure full marks in numericals.
- Examiner / Mentor Tip: Mention Mask R-CNN for instance segmentation and YOLO for real-time detection in practical viva discussions.
7. Interactive Concept Check Quiz
Question: A street camera needs to count every individual car and trace its exact pixel outline without merging two parked cars next to each other. Which Computer Vision task should be used?
8. Frequently Asked Questions
How is classification with localization different from object detection?
What happens if an IoU threshold is raised from 0.5 to 0.75?
Does semantic segmentation separate overlapping apples in a basket?
Explore Related Lessons & Free Interactive Tools
- All 60 Guides in CBSE AI (417 & 843) Guide Hub
- Why Corners Are Better Image Features Than Flat Patches & Edges
- Convolution Operation, Kernels, Stride & Padding Explained
- CNN Architecture: Convolution, ReLU, Pooling & Fully Connected Layers
- Interactive Tool: CBSE AI 417 Confusion Matrix & F1 Score Calculator
- Interactive Tool: CBSE Class 10 Best-of-5 Marks Replacement Calculator
