HW 3 - CNNs

All information regarding the third homework assignment can be found here: UROB HW3 – Fruit Image Analysis Repository


🍎 Overview

This homework focuses on training a Convolutional Neural Network (CNN) to:

  • 🏷️ Classify images of fruits into 30 categories
  • 🎨 Segment fruits using pixel-level masks
  • 🔍 Learn meaningful image embeddings

The goal is to design, train, and evaluate a model capable of performing all three tasks efficiently.

✅ Tasks

  • Implement your CNN model in `model.py` as class `MyModel`
  • The `forward()` method must return:
    1. Class logits `[batch_size, 30]`
    2. Segmentation mask `[batch_size, 1, 64, 64]`
    3. Image embeddings `[batch_size, embedding_dim]`
  • Implement `get_embedding()` returning embeddings only
  • Complete the training loop in `train.py`
  • Tune hyperparameters in `confs/config.yml`

📊 Evaluation

Basic Evaluation (10 points)

Task Metric Threshold Points
———————————–
🍊 Classification Accuracy 80% → 1 pt 85% → 2 pts
🎨 Segmentation Mean IoU 75% → 1 pt 80% → 2 pts 85% → 3 pts
📈 Embeddings (ROC) AUC 0.80 → 1 pt 0.85 → 2 pts
🎯 Embeddings (TPR) TPR @ 5% FPR 0.75 → 1 pt 0.80 → 2 pts 0.85 → 3 pts

Tournament Evaluation (up to +5 bonus points) Models are ranked by performance across all tasks. Lower total rank = better score. Ties are broken by earlier submission.

* 🥇 1st place → +5 pts * 🥈 2nd → +4 pts * 🥉 3rd → +3 pts * 🏅 Top 10 → +2 pts * 🎖️ Top 20 → +1 pt

Maximum total = 15 points


📦 Submission

Submit a ZIP file containing:

  • `model.py` – your model
  • `train.py` – your training script
  • `weights.pth` – trained model weights

🚫 Important Policies

Pretrained Models Policy ❌ No pretrained models or transfer learning allowed. ✅ Train from scratch using only the provided dataset.

Plagiarism Policy ✅ You may discuss ideas with classmates. ❌ Direct code copying = 0 points.


Good luck! 🍀 For questions, contact: hlavsja3@fel.cvut.cz

courses/b3b33urob/tutorials/hw3.txt · Last modified: 2025/10/28 14:27 by hlavsja3