docs: Add OCR requirements section to README and improve error handling
Added to README.md: - New 'OCR Requirements (Optional)' section after Installation - Instructions for installing EasyOCR (recommended), Tesseract, or PaddleOCR - Note that Game Reader works without OCR, just shows 'not available' Improved Game Reader Test plugin: - Better error message when Tesseract binary is not installed - Provides download link and installation steps in error message - Updated Calibration tab to check if Tesseract binary is available - Shows recommendation to use EasyOCR in backend status This helps users understand why they get 'tesseract is not installed' errors and how to fix them.
This commit is contained in:
parent
a80a9ccd06
commit
d7b7b491b5
27
README.md
27
README.md
|
|
@ -70,6 +70,33 @@ python -m core.main
|
|||
|
||||
---
|
||||
|
||||
## 📷 OCR Requirements (Optional)
|
||||
|
||||
For **Game Reader** and **Skill Scanner** plugins that use OCR (text recognition), you need to install one of these OCR engines:
|
||||
|
||||
### Option 1: EasyOCR (Recommended - Auto-installs)
|
||||
```bash
|
||||
pip install easyocr
|
||||
```
|
||||
EasyOCR downloads models automatically on first use. No additional setup needed.
|
||||
|
||||
### Option 2: Tesseract (Alternative)
|
||||
1. Download Tesseract installer: https://github.com/UB-Mannheim/tesseract/wiki
|
||||
2. Install to `C:\Program Files\Tesseract-OCR\`
|
||||
3. Add to PATH or install Python wrapper:
|
||||
```bash
|
||||
pip install pytesseract
|
||||
```
|
||||
|
||||
### Option 3: PaddleOCR (Advanced)
|
||||
```bash
|
||||
pip install paddleocr
|
||||
```
|
||||
|
||||
> ℹ️ **Note:** If no OCR engine is installed, the Game Reader plugin will show "OCR not available" but the rest of EU-Utility will work fine.
|
||||
|
||||
---
|
||||
|
||||
## 🏁 Quick Start
|
||||
|
||||
### First Launch
|
||||
|
|
|
|||
|
|
@ -606,6 +606,16 @@ class GameReaderTestPlugin(BasePlugin):
|
|||
backend_used = "tesseract"
|
||||
except Exception as e:
|
||||
if backend == 'tesseract':
|
||||
error_msg = str(e)
|
||||
if "tesseract is not installed" in error_msg.lower() or "not in your path" in error_msg.lower():
|
||||
raise Exception(
|
||||
"Tesseract is not installed.\n\n"
|
||||
"To use Tesseract OCR:\n"
|
||||
"1. Download from: https://github.com/UB-Mannheim/tesseract/wiki\n"
|
||||
"2. Install to C:\\Program Files\\Tesseract-OCR\\\n"
|
||||
"3. Add to PATH or restart EU-Utility\n\n"
|
||||
"Alternatively, use EasyOCR (auto-installs): pip install easyocr"
|
||||
)
|
||||
raise e
|
||||
|
||||
processing_time = time.time() - start_time
|
||||
|
|
@ -782,21 +792,26 @@ class GameReaderTestPlugin(BasePlugin):
|
|||
|
||||
try:
|
||||
import easyocr
|
||||
statuses.append("✅ EasyOCR - Available")
|
||||
statuses.append("✅ EasyOCR - Available (recommended)")
|
||||
except ImportError:
|
||||
statuses.append("❌ EasyOCR - Not installed (pip install easyocr)")
|
||||
statuses.append("❌ EasyOCR - Not installed\n Install: pip install easyocr")
|
||||
|
||||
try:
|
||||
import pytesseract
|
||||
# Also check if tesseract binary is available
|
||||
try:
|
||||
pytesseract.get_tesseract_version()
|
||||
statuses.append("✅ Tesseract - Available")
|
||||
except Exception:
|
||||
statuses.append("⚠️ Tesseract - Python wrapper installed but tesseract binary not found\n Install binary from: https://github.com/UB-Mannheim/tesseract/wiki")
|
||||
except ImportError:
|
||||
statuses.append("❌ Tesseract - Not installed (pip install pytesseract)")
|
||||
statuses.append("❌ Tesseract - Not installed\n Install: pip install pytesseract\n Then install binary from: https://github.com/UB-Mannheim/tesseract/wiki")
|
||||
|
||||
try:
|
||||
from paddleocr import PaddleOCR
|
||||
statuses.append("✅ PaddleOCR - Available")
|
||||
except ImportError:
|
||||
statuses.append("❌ PaddleOCR - Not installed (pip install paddleocr)")
|
||||
statuses.append("❌ PaddleOCR - Not installed\n Install: pip install paddleocr")
|
||||
|
||||
try:
|
||||
from PIL import ImageGrab
|
||||
|
|
@ -804,6 +819,8 @@ class GameReaderTestPlugin(BasePlugin):
|
|||
except ImportError:
|
||||
statuses.append("❌ Screen Capture - PIL not available")
|
||||
|
||||
statuses.append("\n💡 Recommendation: Use EasyOCR - it auto-installs required models")
|
||||
|
||||
self.backend_status.setPlainText('\n'.join(statuses))
|
||||
|
||||
def shutdown(self):
|
||||
|
|
|
|||
Loading…
Reference in New Issue