Disk Sanitization Assistant is a desktop application designed to streamline the laptop disk sanitization workflow. It monitors sticker photos of laptop units, automatically extracts the Serial Number (S/N) and Device ID (ID No.) using RapidOCR (ONNX Runtime), and creates the required destination folder structure USB:\<SN>(<ID>)\Picture\ on targeted USB drives.
- ⚡ High-Speed ONNX OCR Engine: Utilizes RapidOCR for fast, accurate text recognition without external C++ or Heavy AI framework dependencies.
- 💾 Smart USB Drive Detection & Manual Override: Automatically detects connected USB Flash Drives and External HDDs, with a live header dropdown selector for manual drive selection when multiple USB devices are connected.
- 🖼️ Interactive Preview & High-Res Zoom: Displays an enlarged preview dialog (
860x540) with full-screen zoom capabilities (F11/ Double-click) for HD image verification. - 🧹 Real-Time Input Sanitization: Automatically strips illegal OS path characters (
\ / : * ? " < > |) from S/N and ID inputs in real time to prevent folder creation errors. - 🔒 File Lock Race Condition Recovery: Implements retry loops for image files saved directly from external apps (e.g. LINE PC), featuring a copy-fallback mechanism.
- 🛡️ Disk Free Space Safety Check: Verifies available disk space on the target USB drive before initiating folder creation to avoid disk-full errors.
- 📊 CSV Audit Logging: Automatically logs daily operational history into CSV audit files located in
Logs/. - 🖥️ Large Display Mode (F11): High-contrast, large-font fullscreen view for technicians to inspect S/N and ID from a distance.
graph TD
A["Insert USB Drive"] --> B["Drop sticker image into Sticker/ folder"]
B --> C["RapidOCR extracts S/N and Device ID"]
C --> D["Preview Dialog opens for verification"]
D -->|Click Confirm| E["Create folder USB:\SN(ID)\Picture\"]
E --> F["Move image to Sticker/Processed/"]
D -->|Click Skip| G["Move image to Sticker/Failed/"]
No Python installation required. Download the pre-built standalone package:
- Download
FolderCreator.zipfrom GitHub Releases v1.0.1. - Extract
FolderCreator.zip. - Launch
FolderCreator.exeto start the application.
| Key | Action |
|---|---|
| F11 | Toggle Large Display Mode |
| ESC | Close Zoom Dialog / Exit Large Display Mode |
- Windows 10 / 11
- Python 3.10+
# Clone repository
git clone https://github.com/Ratthabhumi/Sticker_OCR.git
cd Sticker_OCR
# Setup virtual environment
python -m venv .venv
.\.venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run application
python main.py.\build.batSticker_OCR/
├── main.py # Main Application Entry Point
├── build.bat # Automated PyInstaller & PyArmor Build Script
├── config.json # Application Configuration
├── requirements.txt # Dependencies
├── app/
│ ├── config.py # Configuration Manager
│ ├── constants.py # App Constants & UI Colors
│ ├── models/ # Data Models (Job, OCRResult, FolderResult)
│ ├── services/ # Core Services (OCR Engine, USB Monitor, File Watcher, Validator)
│ ├── viewmodels/ # MVVM ViewModel State & Logic
│ └── views/ # UI Components (Main Window, Dashboard, History, Settings, Zoom Dialog)
├── Sticker/ # Input Directory for Images
│ ├── Processed/ # Processed Images
│ └── Failed/ # Failed / Skipped Images
└── Logs/ # Daily Audit Logs
Distributed under the MIT License. See LICENSE for more information.