You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no official method for converting EasyOCR models to ONNX, so a custom approach was required.
6
+
The converted recognition models retain the same inputs and outputs as the original versions, while the detection models were slightly adjusted to better fit our use case.
7
+
<br>
8
+
9
+
10
+
## Setup Instructions
11
+
12
+
Follow these steps to set up a virtual environment and install the required dependencies.
13
+
14
+
### 1. Create a virtual environment
15
+
16
+
```bash
17
+
python -m venv .venv
18
+
```
19
+
20
+
---
21
+
22
+
### 2. Activate the virtual environment
23
+
24
+
***Linux / macOS:**
25
+
26
+
```bash
27
+
source .venv/bin/activate
28
+
```
29
+
30
+
***Windows:**
31
+
32
+
```bash
33
+
.venv\Scripts\activate
34
+
```
35
+
36
+
---
37
+
38
+
### 3. Install dependencies
39
+
40
+
Install all required packages using the `requirements.txt` file:
41
+
42
+
```bash
43
+
pip install -r requirements.txt
44
+
```
45
+
46
+
---
47
+
48
+
### 4. Run the script
49
+
50
+
```bash
51
+
python easyOcr_to_onnx_export.py <model_dir>
52
+
```
53
+
54
+
Replace `<model_dir>` with the path to your EasyOCR model directory.
Copy file name to clipboardExpand all lines: pdfocr-onnx-abstract/src/main/java/com/itextpdf/pdfocr/onnx/detection/OnnxDetectionPredictorProperties.java
+18-18Lines changed: 18 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -426,19 +426,19 @@ public static OnnxDetectionPredictorProperties linkNet(String modelPath,
426
426
* This method can be used to load the following PaddleOCR models:
0 commit comments