How bennjordan/plateshapez works
PlateShapez is a research dataset generator for adversarial license-plate overlays on vehicle images. In the main workflow, a user invokes the CLI, configuration is merged from defaults, a file, and CLI overrides, and the generator loads background/overlay images, composites them, applies configured perturbations, then writes images and optional JSON metadata. The Python API can invoke the generator directly. The README also documents listing perturbations, configuration inspection, and an interactive demo. The graph covers documented perturbation types; source excerpts do not show every CLI command implementation or the demo script internals.
Main entry points: pipeline.py Dataset generator · base.py Perturbation registry · __main__.py CLI commands · noise.py Noise perturbation
Components 14
User entry points
- CLI commands
src/plateshapez/__main__.py - Workflow demo
examples/demo_full_workflow.py
Dataset generation
- Config merging
src/plateshapez/config.py - Dataset generator
src/plateshapez/pipeline.py
Perturbation system
- Perturbation registry
src/plateshapez/perturbations/base.py - Noise perturbation
src/plateshapez/perturbations/noise.py - Shape perturbation
src/plateshapez/perturbations/shapes.py - Texture perturbation
src/plateshapez/perturbations/texture.py - Warp perturbation
src/plateshapez/perturbations/warp.py
Input and output
- Image discovery
src/plateshapez/utils/io.py - Image preparation
src/plateshapez/utils/overlay.py - Generated images
src/plateshapez/utils/io.py - Metadata labels
src/plateshapez/utils/io.py
Other components
- Research user
Connections 14
- Research user → CLI commands: runs commands
README.md - CLI commands → Config merging: loads config
src/plateshapez/__main__.py - CLI commands → Dataset generator: starts generation
src/plateshapez/__main__.py - Research user → Dataset generator: uses Python API
README.md - CLI commands → Workflow demo: runs demo
src/plateshapez/__main__.py - Dataset generator → Image discovery: discovers files
src/plateshapez/pipeline.py - Dataset generator → Image preparation: prepares images
src/plateshapez/pipeline.py - Dataset generator → Perturbation registry: dispatches perturbations
src/plateshapez/pipeline.py - Noise perturbation → Perturbation registry: registers
src/plateshapez/perturbations/noise.py - Shape perturbation → Perturbation registry: registers
src/plateshapez/perturbations/shapes.py - Texture perturbation → Perturbation registry: registers
src/plateshapez/perturbations/texture.py - Warp perturbation → Perturbation registry: registers
src/plateshapez/perturbations/warp.py - Dataset generator → Generated images: saves images
src/plateshapez/pipeline.py - Dataset generator → Metadata labels: saves metadata
src/plateshapez/pipeline.py