Skip to course content
Free computer vision course

Computer Vision and Multimodal AI

Module 02 Activity

Scenario

The images have to become arrays a model can consume, and every step of that discards something.

What you build

A loading pipeline that detects format from bytes, rejects with reasons, and matches the compression and resolution of production images.

Steps

  1. Detect format from the file header rather than the extension. Find or construct one mismatched file and confirm it is handled.
  2. Measure what your target resize destroys: take your smallest feature and report its size in pixels before and after.
  3. Convert a sample to HSV and grayscale. Say which space suits your task and why.
  4. Save one image at three JPEG qualities and measure the pixel error. Compare against the quality production images arrive at.
  5. Write a loader that returns a reason for every rejection, and count rejections by kind over the whole folder.
  6. Report the rejection rate per source.

Evidence to hand in

Review checklist