How mvidem-gallery/solarfilaments works
This repository is a MAGFiLO solar-filament segmentation pipeline. Its main workflow retrieves and parses annotated H-alpha images, trains a grayscale DeepLabV3 model on augmented crops, validates on full images with overlapping sliding-window inference, and saves the best model and history. Test images can then be segmented into PNG masks, converted into instance-level COCO RLE submission rows, or overlaid for visual review; training history can also be plotted. The graph follows documented capabilities, but omits unverified internal wiring where source excerpts are incomplete.
Main entry points: main.py CLI workflow · train.py Training and validation · sliding_window.py Sliding-window inference · dataset.py Image datasets
Components 22
Orchestration and data
- CLI workflow
src/main.py - Paths and settings
src/config.py - Seed and file utilities
src/utils.py - Dataset retrieval
src/dataset.py - COCO annotations
src/dataset.py - Image datasets
src/dataset.py
Training and inference
- Image transforms
src/augmentations.py - DeepLabV3 model
src/train.py - Training and validation
src/train.py - Sliding-window inference
src/sliding_window.py - Model weights
Evaluation outputs
- Training history
- Mask prediction
src/train.py - Predicted PNG masks
- Submission encoding
src/create_submission.py - RLE submission CSV
- Mask overlays
src/visualize.py - Visualization images
- History plotting
src/plot_history.py - Metric curves
Other components
- Operator
- Kaggle dataset
Connections 33
- Operator → CLI workflow: selects mode
- CLI workflow → Paths and settings: reads settings
- CLI workflow → Seed and file utilities: seeds run
- CLI workflow → Dataset retrieval: requests download
- Dataset retrieval → Kaggle dataset: downloads archive
- CLI workflow → COCO annotations: loads COCO
- CLI workflow → Image datasets: builds datasets
- Image datasets → COCO annotations: reads labels
- CLI workflow → Image transforms: selects transforms
- CLI workflow → DeepLabV3 model: loads model
- CLI workflow → Training and validation: starts training
- Training and validation → Image datasets: consumes batches
- Training and validation → DeepLabV3 model: optimizes model
- Training and validation → Sliding-window inference: validates with
- Training and validation → Model weights: saves best weights
- Training and validation → Training history: writes metrics
- CLI workflow → Mask prediction: runs prediction
- CLI workflow → Model weights: loads weights
- Mask prediction → Image datasets: reads test images
- Mask prediction → Sliding-window inference: requests tiled inference
- Sliding-window inference → DeepLabV3 model: runs tiles
- Mask prediction → Predicted PNG masks: writes masks
- CLI workflow → Submission encoding: builds submission
- Submission encoding → Image datasets: reads test images
- Submission encoding → Sliding-window inference: requests tiled inference
- Sliding-window inference → DeepLabV3 model: runs tiles
- Submission encoding → RLE submission CSV: writes RLE rows
- CLI workflow → Mask overlays: requests overlays
- Mask overlays → Predicted PNG masks: reads masks
- Mask overlays → Visualization images: writes overlays
- CLI workflow → History plotting: requests plot
- History plotting → Training history: reads metrics
- History plotting → Metric curves: writes plot