How grokcv/drpca-net works
DRPCA-Net is a research implementation for infrared small-target detection. Its main workflow prepares labeled images for training, optimizes the DRPCA-Net model, runs inference with a dataset-specific checkpoint, then evaluates saved predictions with segmentation, detection, and ROC metrics. The README also documents four supported datasets and result exports. Training and evaluation wiring is grounded in the shown excerpts and SOURCE INDEX; some README-described capabilities have no sampled implementation details, so their internal links are omitted.
Main entry points: train.py Training loop · cal_from_mask.py Mask evaluation · inference.py Inference runner · DRPCANet.py Decomposition stages
Components 20
Data preparation
- Dataset loaders
utils/data.py
Detection model
- DRPCANet
models/DRPCANet.py - Decomposition stages
models/DRPCANet.py - Dynamic sparse module
models/DRPCANet.py - Parameter generator
models/DRPCANet.py - Residual merge group
models/DRPCANet.py
Training
- Training loop
train.py - Training losses
utils/loss.py - Learning-rate scheduler
utils/lr_scheduler.py - Training logger
utils/logger.py
Inference and evaluation
- Inference runner
inference.py - Mask evaluation
cal_from_mask.py - TP/FP/FN metrics
utils/evaluation/TPFNFP.py - Pd/Fa metrics
utils/evaluation/pd_fa.py - ROC metrics
utils/evaluation/roc_cruve.py
Other components
- Researcher
- Labeled datasets
- Model checkpoints
- Prediction files
- Evaluation results
Connections 23
- Researcher → Training loop: configures training
README.md - Researcher → Inference runner: starts inference
README.md - Researcher → Mask evaluation: runs evaluation
README.md - Labeled datasets → Dataset loaders: provides images
README.md - Dataset loaders → Training loop: supplies batches
train.py - Training loop → DRPCANet: trains model
train.py - Training loop → Training losses: computes loss
train.py - Training loop → Learning-rate scheduler: updates learning rate
train.py - Training loop → Training logger: logs progress
train.py - Training loop → TP/FP/FN metrics: updates metrics
train.py - Training loop → Model checkpoints: saves weights
train.py - DRPCANet → Decomposition stages: runs stages
models/DRPCANet.py - Decomposition stages → Dynamic sparse module: updates sparse target
models/DRPCANet.py - Dynamic sparse module → Parameter generator: generates parameters
models/DRPCANet.py - Decomposition stages → Residual merge group: merges components
models/DRPCANet.py - Inference runner → Model checkpoints: loads weights
inference.py - Inference runner → DRPCANet: runs prediction
inference.py - Inference runner → Prediction files: writes files
inference.py - Prediction files → Mask evaluation: provides predictions
cal_from_mask.py - Mask evaluation → TP/FP/FN metrics: computes overlap scores
cal_from_mask.py - Mask evaluation → Pd/Fa metrics: computes Pd and Fa
cal_from_mask.py - Mask evaluation → ROC metrics: computes ROC
cal_from_mask.py - Mask evaluation → Evaluation results: writes reports
cal_from_mask.py