How naivehobo/invoicenet works
Main Components
a) User Interface Layer:
• GUI Module (invoicenet/gui/)
• Two main interfaces: Trainer GUI and Extractor GUI
• Custom widgets for user interaction
b) Core Processing Layer:
• ACP (Attend, Copy, Parse) Module (invoicenet/acp/)
• Parsing Module (invoicenet/parsing/)
• Common Utilities (invoicenet/common/)
c) Data Layer:
• Model Storage (models/ directory)
• Training Data Interface
• Prediction Data Interface
Component Relationships
[User Interface Layer]
• ↕
[Core Processing Layer]
• ↕
[Data Layer]
Specific Elements
a) Input Processing:
• PDF/JPG/PNG document input
• OCR Engine integration
• Data preparation pipeline
b) Training Flow:
• Data preparation component
• Model training pipeline
• Model storage system
c) Extraction Flow:
• Document input handling
• Field extraction process
• Results output system
Key Architectural Patterns to Highlight
• Modular architecture with clear separation of concerns
• Pipeline pattern for data processing
• MVC pattern in the GUI implementation
Detailed Component Breakdown
GUI Layer:
[Trainer GUI] ←→ [Extractor GUI]
• ↓ ↓
[Custom Widgets] [Viewer]
• ↓ ↓
[Help System] [Field Extraction]
Core Processing:
[ACP Module]
• ↓
[Parser Module] → [Amount Parser]
• → [Date Parser]
• ↓
[Common Utilities]
Data Flow:
[Input Documents] → [Data Preparation] → [Training Pipeline]
• → [Prediction Pipeline]
Technical Stack Elements
• TensorFlow framework
• CUDA/cuDNN integration
• External dependencies (Tesseract, ImageMagick, Ghostscript)