How csyanbin/scot works
Main Components
• Datasets
– All image datasets live under Datasets_SCOT (PF-PASCAL, PF-WILLOW, SPair, TSS)
• Data Module
– data/ (dataset definitions, download scripts, flow utilities)
– dataset.py, download.py, flow.py, pfpascal.py, pfwillow.py, spair.py, tss_dataset.py
• Model Module
– model/ (feature extractor, geometry routines, OT solver wrappers)
– resnet.py (backbone), geometry.py, rhm_map.py, scot_CAM.py, evaluation.py, util.py
• Orchestration Scripts
– evaluate_map_CAM.py, evaluate_map_TSS_CAM.py
– beamsearch.py, cmd.txt (example CLI commands)
• External Libraries
– PyTorch, torchvision, scikit-image, pandas, requests, gluoncv-torch
Relationships & Data Flow
• Users invoke a script (evaluate_map_*.py or beamsearch.py) via the CLI.
• Script calls Data Module → loads image pairs from Datasets_SCOT.
• Loaded data is fed into Model Module:
– Backbone extracts hyperpixel features (ResNet or FCN).
– SCOT solver (OTGeo) and geometry routines compute correspondences.
– evaluation.py computes PCK metrics.
• Results (metrics, transformed maps) are output to console/files.
Architectural Patterns
• Modular ML Pipeline: clear separation between data I/O, feature extraction, solver, evaluation.
• Pluggable Backbones & Solvers: models use a common interface (backbone + OT layers).