Skip to content

Nielsvanschaijk/NNCV_final

Repository files navigation

README

1 Overview

This assignment demonstrates two segmentation approaches described in the accompanying paper:

  1. Triple-scale model training – three networks (Big, Medium, Small) trained jointly.
  2. Multi-Head model – a single backbone with three parallel heads (Big, Medium, Small).

Everything you need to reproduce the experiments is already in the repository; just make sure the Cityscapes dataset is in the expected folders.


2 Repository layout

Path Purpose
final_assignment/train.py Launches triple-scale training.
final_assignment/models/ Pre-defined model architectures: big.pth, medium.pth, small.pth.
final_assignment/Multiheadmodel/ Code for the Multi-Head model.
final_assignment/data/cityscapes/gtFine/ Cityscapes ground-truth masks (download separately).
final_assignment/data/cityscapes/leftImg8bit/ Cityscapes RGB images (download separately).
dice_loss.py Shared Dice-loss implementation used by all models.

3 Running the experiments

3.1 Triple-scale training

python final_assignment/train.py

### 3.2 Multi-Head model

python final_assignment/Multiheadmodel/train_multihead.py
Builds one backbone and attaches the three heads (also loaded from models/).

## 4 Prerequisites
Cityscapes dataset – place it exactly like this:

final_assignment/data/cityscapes/
  ├── gtFine/
  └── leftImg8bit/
Python ≥3.8 with torch, torchvision, numpy, tqdm, etc.

## 5 Notes
Modify dice_loss.py to experiment with other loss functions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors