-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrain_clean.sh
More file actions
executable file
·50 lines (44 loc) · 1.37 KB
/
train_clean.sh
File metadata and controls
executable file
·50 lines (44 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
# Training script optimized for ~40% mIoU on Cityscapes
# Based on successful configuration with DeepLabV3 ResNet50 + COCO pretrained weights
# Activate conda environment
source ~/miniconda3/bin/activate ai
# Train with clean configuration (no class weights, no weighted sampler)
python train.py \
--architecture deeplabv3 \
--image-size 256 512 \
--batch-size 2 \
--grad-accum-steps 2 \
--learning-rate 1e-4 \
--weight-decay 1e-4 \
--num-epochs 60 \
--scheduler cosine \
--min-lr 1e-6 \
--no-class-weights \
--no-weighted-sampler \
--load-checkpoint checkpoints/best_model.pth
# Key differences from previous approach:
# 1. DeepLabV3 (not V3+) with ResNet50 + COCO pretrained weights
# 2. Cityscapes-native resolution (256×512)
# 3. No class weights or weighted sampler
# 4. CosineAnnealingLR instead of Poly
# 5. Batch size 2 with grad_accum=2 (effective batch 4)
# 6. 60 epochs for full convergence
# Expected mIoU progression:
# - 10 epochs: ~30%
# - 30 epochs: ~36%
# - 60 epochs: 38-41%
# For Colab T4 GPU (higher batch size, CUDA device):
python train.py \
--architecture deeplabv3 \
--image-size 256 512 \
--batch-size 8 \
--learning-rate 1e-4 \
--weight-decay 1e-4 \
--num-epochs 60 \
--scheduler cosine \
--min-lr 1e-6 \
--no-class-weights \
--no-weighted-sampler \
--device cuda \
--load-checkpoint checkpoints/best_model.pth