How sadeghi-sara/zipvan works
ZipVAN trains handwritten line recognizers with CTC and consistency regularization, then initializes paragraph recognition from a trained line model. Its user-facing workflow also formats IAM data and evaluates predictions. The graph includes the shared dataset, model, and training infrastructure plus optimizer and preset configuration. Source evidence is partial: unsampled implementation details are omitted, while documented workflow links use the README.
Main entry points: main_pg_va.py Paragraph run and evaluation · main_line_ctc.py Line run and evaluation · generic_dataset_manager.py Dataset manager · trainer_line_ctc.py Line CTC trainer
Components 18
Data preparation
- IAM formatter
Datasets/format_datasets.py
Line recognition
- Line run and evaluation
OCR/line_OCR/ctc/main_line_ctc.py - Line CTC models
OCR/line_OCR/ctc/models_line_ctc.py - Line CTC trainer
OCR/line_OCR/ctc/trainer_line_ctc.py
Paragraph recognition
- Paragraph run and evaluation
OCR/document_OCR/v_attention/main_pg_va.py - Vertical attention model
OCR/document_OCR/v_attention/models_pg_va.py - Paragraph trainer
OCR/document_OCR/v_attention/trainer_pg_va.py
Shared training core
- Dataset manager
basic/generic_dataset_manager.py - Image transforms
basic/transforms.py - Training manager
basic/generic_training_manager.py - Encoder building blocks
basic/models.py - Training presets
basic/presets.py - ScaledAdam and Eden
basic/scaled_optimizer.py - Scaling layers
basic/scaling.py - Training logger
basic/train_logger.py - OCR metrics
basic/utils.py
Other components
- Researcher
- IAM dataset
Connections 24
- Researcher → IAM formatter: formats data
README.md - IAM dataset → IAM formatter: provides source
README.md - IAM formatter → Dataset manager: writes formatted data
README.md - Researcher → Line run and evaluation: starts line run
README.md - Line run and evaluation → Line CTC trainer: creates trainer
OCR/line_OCR/ctc/main_line_ctc.py - Line run and evaluation → Line CTC models: configures model
OCR/line_OCR/ctc/main_line_ctc.py - Line run and evaluation → Dataset manager: configures datasets
OCR/line_OCR/ctc/main_line_ctc.py - Line run and evaluation → Training presets: selects preset
OCR/line_OCR/ctc/main_line_ctc.py - Line CTC trainer → Training manager: inherits training
OCR/line_OCR/ctc/trainer_line_ctc.py - Line CTC trainer → Line CTC models: runs encoder and decoder
OCR/line_OCR/ctc/trainer_line_ctc.py - Line CTC trainer → OCR metrics: uses OCR metrics
OCR/line_OCR/ctc/trainer_line_ctc.py - Researcher → Paragraph run and evaluation: starts paragraph run
README.md - Paragraph run and evaluation → Paragraph trainer: creates trainer
OCR/document_OCR/v_attention/main_pg_va.py - Paragraph run and evaluation → Vertical attention model: configures model
OCR/document_OCR/v_attention/main_pg_va.py - Paragraph run and evaluation → Dataset manager: configures datasets
OCR/document_OCR/v_attention/main_pg_va.py - Paragraph run and evaluation → Training presets: selects preset
OCR/document_OCR/v_attention/main_pg_va.py - Paragraph run and evaluation → Line run and evaluation: loads line checkpoint
README.md - Paragraph trainer → Training manager: inherits training
OCR/document_OCR/v_attention/trainer_pg_va.py - Paragraph trainer → Vertical attention model: runs attention decoder
OCR/document_OCR/v_attention/trainer_pg_va.py - Dataset manager → Image transforms: uses transforms
basic/generic_dataset_manager.py - Training manager → Dataset manager: uses datasets
basic/generic_training_manager.py - Training manager → Training logger: logs training
basic/generic_training_manager.py - Training presets → ScaledAdam and Eden: configures optimizer
basic/presets.py - Encoder building blocks → Scaling layers: uses scaling
basic/models.py