How napatjia/document-segmentation works
This is a Streamlit multi-document scanner: users upload images, the app detects document regions, rectifies and enhances each page, then combines the results into a downloadable PDF. The workflow and image-processing stages are all implemented in one source file; the YOLO model is a separate repository artifact. The README is empty, so capabilities and relationships shown here are limited to the sampled application source.
Main entry points: streamlit_app.py Document detection · modelv2.pt YOLO model
Components 10
User interaction
- Image upload
streamlit_app.py - Preview control
streamlit_app.py
Image processing
- Document detection
streamlit_app.py - YOLO model
modelv2.pt - Region extraction
streamlit_app.py - Page rectification
streamlit_app.py - Image enhancement
streamlit_app.py
Document output
- PDF assembly
streamlit_app.py - PDF download
streamlit_app.py
Other components
- User
Connections 11
- User → Image upload: uploads images
streamlit_app.py - User → Preview control: sets preview
streamlit_app.py - Image upload → Document detection: submits images
streamlit_app.py - Document detection → YOLO model: loads model
streamlit_app.py - Document detection → Region extraction: returns masks
streamlit_app.py - Region extraction → Page rectification: supplies contours
streamlit_app.py - Page rectification → Image enhancement: supplies page
streamlit_app.py - Image enhancement → Preview control: renders pages
streamlit_app.py - Image enhancement → PDF assembly: supplies pages
streamlit_app.py - PDF assembly → PDF download: provides PDF
streamlit_app.py - PDF download → User: offers download
streamlit_app.py