Skip to content

Latest commit

 

History

History
97 lines (70 loc) · 3.49 KB

README.md

File metadata and controls

97 lines (70 loc) · 3.49 KB

CaDPR

Defect diagnosis, degradation prediction, and maintenance prioritization for metro-track imagery

English · 中文

CaDPR workflow

Overview

CaDPR connects image diagnosis with downstream degradation prediction and maintenance ranking. The public implementation works with precomputed visual features and includes runnable synthetic examples, model definitions, training and analysis tools, and two task-head checkpoints.

The workflow has three parts:

  1. Defect diagnosis (T1) classifies ten track-defect categories and supplies the corrugation gate and a fixed 9D context vector.
  2. Degradation prediction (T2) combines DINOv2, ConvNeXt and SigLIP features with context to predict pad extrusion and clip degradation.
  3. Maintenance prioritization (T3) combines predicted probability, predictive variability and attributable-fraction (AF) branch weights to produce a ranked inspection queue.

CaDPR model architecture

Quick start

Python 3.10 or 3.11 is recommended.

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

On Windows, activate the environment with .venv\Scripts\activate.

Run inference with the bundled checkpoint:

python scripts/run_demo.py

Run the complete synthetic T1→T2→T3 example:

python scripts/run_pipeline.py

Repository layout

Repository layout

Directory Purpose
models/ T1 classifier, T2 task heads and checkpoint loader
cadpr/ Shared schemas, split logic and metric utilities
configs/ Configuration reference for model dimensions and experiment defaults
train/ T1 and T2 training implementation
analysis/ Calibration, uncertainty aggregation, T3 ranking and deployment analysis
scripts/ User-facing training, testing and demo commands
test/ Unit, protocol and end-to-end tests
demo_data/ Fully synthetic inputs for examples and tests
data_analysis/ Directional defect-transition analysis and aggregate tables
weights/ Synthetic and representative task-head checkpoints
assets/diagrams/ Editable Draw.io sources and bilingual SVG exports

Each top-level directory has a short English README.md and Chinese README_CN.md.

Common commands

# Smoke training
python scripts/train.py --task t1 --epochs 4
python scripts/train.py --task t2 --model all3_cadpr --epochs 1

# Task-level evaluation
python scripts/test.py --task t2 --model all3_cadpr
python scripts/test.py --task t3 --model all3_cadpr

# Regression tests
python -B test/run_tests.py

For repeated experiments from a compatible feature cache, use scripts/train_final.py. Use --help on any command to inspect its inputs and options.

Included examples

  • demo_data/ contains synthetic feature arrays and temporal pairs with the same interfaces used by the code.
  • weights/cadpr_synthetic_demo.pt supports the public demo.
  • weights/cadpr_demo_seed42_fold0.pt is a representative trained T2 task head.
  • data_analysis/ contains the directional transition tables and the script used to generate them.

License

Released under the MIT License.