YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Thyroid VFM Lab Starter
Starter repository for the AI lab project described in AI LAB PROJECT SYNOPSIS_aatman.pdf.
The project is organized around two tracks from the synopsis:
- Detection: thyroid nodule localization from ultrasound frames with YOLO.
- Classification: benign vs malignant nodule diagnosis with a vision transformer adapted through LoRA.
It also includes a distillation path so a heavier teacher model can supervise a lighter student model for deployment.
What is included
- A project scaffold for Python 3.10+.
- YAML-based experiment configs.
- VOC parsing utilities for TN5000-style annotations.
- A detection data exporter for YOLO training.
- Baseline entry points for classification, detection, and distillation.
Suggested repository layout
data/
raw/
JPEGImages/
Annotations/
ImageSets/
Main/
configs/
scripts/
src/
outputs/
Quick start
python -m venv .venv
.venv\Scripts\activate
pip install -e .
python scripts/train_classification.py --config configs/classification_vit_lora.yaml
python scripts/train_detection.py --config configs/detection_yolov8.yaml
python scripts/train_distillation.py --config configs/distillation_mobilenet.yaml
Dataset assumptions
- Official TN5000-style images live under
data/raw/JPEGImages. - Official VOC XML annotations live under
data/raw/Annotations. - Official split files live under
data/raw/ImageSets/Mainastrain.txt,val.txt, andtest.txt. - Each split file contains one image stem or relative image path per line.
- The loader also accepts simplified aliases such as
images,annotations, andsplits. - For classification, the current baseline uses the first annotated object as the image label.
- TN5000 labels may appear as
0and1in XML; the loader normalizes them tobenignandmalignant.
If TN5000 is packaged differently on your machine, update the config paths before training.
Model notes
- The classification baseline uses a Hugging Face ViT checkpoint with LoRA adapters on attention projections.
- The detection baseline converts VOC annotations to YOLO format before training.
- The distillation baseline expects a fine-tuned teacher checkpoint and trains a timm student model with hard-label and KL distillation loss.
Next steps
- Place TN5000 in
data/raw. - Verify actual class names in the XML annotations.
- Decide whether the lab should prioritize detection or classification for the first reportable result.
- Add experiment tracking and calibration/OOD evaluation once the first baseline is running.
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support