How lzlsxs/hypersc works
This repository implements exemplar-free lifelong hyperspectral-image classification: a configured run prepares spectral-spatial patches, learns classes in successive tasks, and evaluates accumulated class predictions. The main orchestration and dataset path are visible in the sampled source; the README identifies model inversion and spectral consistency as core capabilities, while the partial learner excerpt shows stored feature statistics. Training details and some subsystem wiring are omitted from the excerpts, so the graph does not infer their internal call sequence.
Main entry points: hyperinversion.py Hyper-inversion learner · trainer.py Task orchestration · inc_net.py Incremental network · main.py CLI entry
Components 17
Run and Data
- Dataset configs
configs - CLI entry
main.py - Task orchestration
trainer.py - Task data manager
utils/data_manager.py - HSI preprocessing
utils/preprocess.py
Incremental Learning
- Model factory
utils/factory.py - Hyper-inversion learner
models/hyperinversion.py - Learner lifecycle
models/base.py - Spectral statistics
models/hyperinversion.py
Model Architecture
- Incremental network
utils/inc_net.py - LSGA backbone
convs/lsga.py - HSI ResNet
convs/resnet_hsi.py - Incremental heads
convs/linears.py
Evaluation
- Accuracy metrics
utils/toolkit.py - Task predictions
Other components
- Experiment runner
- HSI dataset files
Connections 20
- Experiment runner → CLI entry: starts run
- Experiment runner → Dataset configs: selects dataset
- Dataset configs → CLI entry: configures
- CLI entry → Task orchestration: calls train
- Task orchestration → Task data manager: builds tasks
- Task data manager → HSI preprocessing: prepares samples
- HSI preprocessing → HSI dataset files: reads dataset
- Task orchestration → Model factory: requests model
- Model factory → Hyper-inversion learner: creates learner
- Task orchestration → Hyper-inversion learner: runs task lifecycle
- Hyper-inversion learner → Task data manager: requests task sets
- Hyper-inversion learner → Learner lifecycle: inherits lifecycle
- Hyper-inversion learner → Incremental network: uses classifier
- Hyper-inversion learner → Spectral statistics: stores statistics
- Incremental network → LSGA backbone: selects backbone
- Incremental network → HSI ResNet: selects backbone
- Incremental network → Incremental heads: uses heads
- Hyper-inversion learner → Accuracy metrics: evaluates scores
- Hyper-inversion learner → Task predictions: produces predictions
- Accuracy metrics → Task predictions: scores predictions