How yongchoooon/stellar works
STELLAR edits scene text for low-resource languages: users prepare source/target text-image data, train glyph and style encoders, train a diffusion generator, then run configured inference and evaluate image quality, style preservation, and recognition accuracy. The repository also includes synthetic-data generation and a substantial Diffusers runtime. Connections for the STELLAR stages follow README descriptions; sampled source references establish only the additional implementation links shown. Unsampled application internals are represented by their exact directories.
Main entry points: CtrlBase.py Diffusion training · pipeline_stable_diffusion_inpaint.py Diffusion pipelines · pipeline_flax_utils.py Flax pipeline · gen.py Synthetic text generator
Components 25
Data preparation
- Synthetic text generator
datagen/Synthtext/gen.py - Stage 1 data
datagen/datagen.py - STIPLAR data
Encoder pretraining
- Glyph encoder
preglyph/modules.py - Style encoder
prestyle/model.py
Diffusion generation
- Diffusion training
src/trainer/CtrlBase.py - Text dataset
src/dataset/textdata.py - Text encoder
src/module/textencoder/modules.py
Inference and evaluation
- Inference config
inference_by_config.py - Text editor
src/stellar/stellar.py - Editing application
src/stellar/stellar_app.py - Image/style evaluation
evaluation/evaluation.py - OCR evaluation
evaluation/evaluation_ocr.py - Arabic OCR evaluation
evaluation/evaluation_ocr_ar.py
Diffusion runtime
- Diffusion pipelines
diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py - Pipeline loading
diffusers/pipeline_utils.py - Flax pipeline
diffusers/pipeline_flax_utils.py - Denoising models
diffusers/models/unet_2d_condition.py - Flax model
diffusers/models/unet_2d_condition_flax.py - Schedulers
diffusers/schedulers/scheduling_pndm.py - Flax schedulers
diffusers/schedulers/scheduling_pndm_flax.py - Model configuration
diffusers/configuration_utils.py - Hub utilities
diffusers/hub_utils.py - Safety checker
diffusers/pipelines/stable_diffusion/safety_checker.py
Other components
- Researcher
Connections 26
- Researcher → Synthetic text generator: generates data
README.md - Synthetic text generator → Stage 1 data: produces
README.md - Researcher → STIPLAR data: obtains dataset
README.md - Researcher → Glyph encoder: pretrains
README.md - Researcher → Style encoder: pretrains
README.md - Researcher → Diffusion training: trains stages
README.md - Stage 1 data → Diffusion training: feeds stage one
README.md - STIPLAR data → Diffusion training: feeds stage two
README.md - Glyph encoder → Diffusion training: provides pretrained weights
README.md - Style encoder → Diffusion training: provides pretrained weights
README.md - Researcher → Inference config: runs configured
README.md - Inference config → Text editor: dispatches
inference_by_config.py - Inference config → Editing application: dispatches
inference_by_config.py - Researcher → Image/style evaluation: evaluates results
README.md - Researcher → OCR evaluation: measures recognition
README.md - Researcher → Arabic OCR evaluation: measures Arabic recognition
README.md - Synthetic text generator → Stage 1 data: renders masks and text
datagen/Synthtext/gen.py - Diffusion pipelines → Pipeline loading: inherits loading
diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py - Diffusion pipelines → Denoising models: uses denoiser
diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py - Diffusion pipelines → Schedulers: steps scheduler
diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py - Diffusion pipelines → Safety checker: checks output
diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py - Pipeline loading → Model configuration: loads configuration
diffusers/pipeline_utils.py - Pipeline loading → Hub utilities: downloads weights
diffusers/pipeline_utils.py - Flax pipeline → Model configuration: uses configuration
diffusers/pipeline_flax_utils.py - Flax pipeline → Flax schedulers: loads scheduler
diffusers/pipeline_flax_utils.py - Flax pipeline → Flax model: loads model