Images come in many sizes and text in several languages. What preprocessing makes them usable together in one model?
- Exam domain
- Experimentation25% of the exam
- Difficulty
- Medium
- In this mock
- 13 questions on this domainPractise this domain
Why the exam asks this
Experimentation (25% of the exam)
Objective in the exam guide: Manage and preprocess data from various sources.
Data management is half of real multimodal work.
Why C is the answer
Resize and normalize images, and tokenize text with one tokenizer
Models need consistent inputs: fixed-size, normalized images and text tokenized with the tokenizer the text encoder expects.
Remember: Preprocess each modality to what its encoder expects.
How it works
Managing data from several sources means matching each modality to its encoder's expected format.
In detail
- Consistent shapes and scales.
- Match the encoder's preprocessing.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Convert images to text descriptions by handWrong
Manual description does not scale.
B. Drop all non-English captions without checking how many there are or what they containWrongMost tempting
Dropping data can bias the model.
Why it tempts: Dropping data is quick but can introduce bias.
C. Resize and normalize images, and tokenize text with one tokenizerRight
Preprocess each modality to what its encoder expects.
D. Leave everything raw; the model will copeWrong
Raw mixed inputs break batching and training.
Use case
An illustrative scenario, not a real incident.
Illustrative: all images become 224 by 224 and normalized; captions go through the encoder's tokenizer.
See it in different ways
mindmap
root(("Multimodal fusion"))
n1["Early fusion"]
n2["Join raw or low-level features"]
n3["One model sees everything"]
n4["Late fusion"]
n5["Separate models per modality"]
n6["Combine predictions"]
n7["Shared embedding"]
n8["Encoders map to one space"]
n9["CLIP-style contrastive training"]How to read this chart
- The centre is "Multimodal fusion".
- "Early fusion" covers "Join raw or low-level features", "One model sees everything".
- "Late fusion" covers "Separate models per modality", "Combine predictions".
- "Shared embedding" covers "Encoders map to one space", "CLIP-style contrastive training".
flowchart LR S0["Images resize, normalize"] --> S1["Text clean, tokenize"] --> S2["Pair and batch"] --> S3["Store with IDs"]
How to read this chart
- Read it in order: Images resize, normalize, then Text clean, tokenize, then Pair and batch, then Store with IDs.
Related questions
Learn more
- Our lesson: Experiments, data quality and analysis
- Practise Experimentation questions in the mock exam
- Source: PyTorch documentation
- Source: NumPy documentation
- Cross-validation (scikit-learn)
- Metrics and scoring (scikit-learn)
- Common pitfalls and recommended practices (scikit-learn)
- Grad-CAM: Visual Explanations from Deep Networks (arXiv)
- Matplotlib documentation