feat: train fixed-size classifiers and export class probabilities

This commit is contained in:
Shaun Zhou
2026-10-14 17:08:14 +08:00
parent 63bab36147
commit f9a4032783
11 changed files with 478 additions and 208 deletions
@@ -0,0 +1,8 @@
_base_: film_tiles128_resnet18.yaml
work_dir: runs/classify_tiles128_mobilenet_v3_small
model:
backbone:
arch: mobilenet_v3_small
train:
swanlab:
tags: [classify, mobilenet_v3_small, tiles128]
@@ -0,0 +1,20 @@
# Train on human YOLO labels, preserving the existing fixed-tile train/val split.
_base_: film.yaml
work_dir: runs/classify_tiles128_resnet18
data:
root: data/film_yolo_128
format: yolo_tiles
yaml: data/film_yolo_128/data.yaml
image_size: [128, 128]
classes: [black, blackdot, grease, mosquito, normal, obstacle, ripple, uneven, wrinkle]
train_transforms:
- {name: RandomHorizontalFlip, p: 0.5}
- {name: RandomVerticalFlip, p: 0.5}
- {name: ToTensor}
val_transforms:
- {name: ToTensor}
train:
# Strong inverse-frequency weights plus uniform smoothing bias scores toward rare classes.
label_smoothing: 0.0
swanlab:
tags: [classify, resnet18, tiles128]