zouyu
2025-09-26 3fbbfcc8f509c352c58dc8a126220b49b72ed5a0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
 
    <groupId>com.xindao.ocr</groupId>
    <artifactId>ocr-tool</artifactId>
    <version>1.0-SNAPSHOT</version>
 
    <properties>
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
 
        <springboot.version>2.6.13</springboot.version>
        <djl.version>0.32.0</djl.version>
        <spring-boot.version>2.6.13</spring-boot.version>
        <easyexcel.version>3.3.4</easyexcel.version>
 
        <smartjavaai.version>1.0.24</smartjavaai.version>
 
        <javacv.version>1.5.10</javacv.version>
 
        <javacv.platform.macosx-arm64>macosx-arm64</javacv.platform.macosx-arm64>
        <javacv.platform.linux-x86_64>linux-x86_64</javacv.platform.linux-x86_64>
        <javacv.platform.linux-arm64>linux-arm64</javacv.platform.linux-arm64>
        <javacv.platform.windows-x86_64>windows-x86_64</javacv.platform.windows-x86_64>
 
        <djl.platform.windows-x86_64>win-x86_64</djl.platform.windows-x86_64>
        <djl.platform.linux-x86_64>linux-x86_64</djl.platform.linux-x86_64>
        <djl.platform.linux-aarch64>linux-aarch64</djl.platform.linux-aarch64>
        <djl.platform.osx-aarch64>osx-aarch64</djl.platform.osx-aarch64>
    </properties>
 
    <url>https://github.com/geekwenjie/SmartJavaAI</url>
    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://opensource.org/licenses/MIT</url>
        </license>
    </licenses>
 
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>${springboot.version}</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>easyexcel</artifactId>
            <version>${easyexcel.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-io</groupId>
                    <artifactId>commons-io</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>7.4.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>1.9.4</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.9</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.4</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.30</version>
        </dependency>
        <dependency>
            <groupId>commons-cli</groupId>
            <artifactId>commons-cli</artifactId>
            <version>1.9.0</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.17.0</version>
        </dependency>
        <!-- Apache Commons Pool2 -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-pool2</artifactId>
            <version>2.12.0</version>
        </dependency>
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-system</artifactId>
            <version>5.8.16</version>
        </dependency>
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-setting</artifactId>
            <version>5.8.16</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.83</version>
        </dependency>
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>pdfbox</artifactId>
            <version>2.0.28</version>
        </dependency>
 
 
 
        <!--OCR相关依赖-->
        <dependency>
            <groupId>cn.smartjavaai</groupId>
            <artifactId>common</artifactId>
            <version>${smartjavaai.version}</version>
        </dependency>
        <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <version>1.6.1</version>
        </dependency>
        <dependency>
            <groupId>ai.djl</groupId>
            <artifactId>api</artifactId>
            <version>${djl.version}</version>
        </dependency>
        <dependency>
            <groupId>ai.djl</groupId>
            <artifactId>model-zoo</artifactId>
            <version>${djl.version}</version>
        </dependency>
        <dependency>
            <groupId>ai.djl.huggingface</groupId>
            <artifactId>tokenizers</artifactId>
            <version>${djl.version}</version>
        </dependency>
        <!-- MXNet -->
        <dependency>
            <groupId>ai.djl.mxnet</groupId>
            <artifactId>mxnet-model-zoo</artifactId>
            <version>${djl.version}</version>
        </dependency>
        <!-- Pytorch -->
        <dependency>
            <groupId>ai.djl.pytorch</groupId>
            <artifactId>pytorch-model-zoo</artifactId>
            <version>${djl.version}</version>
        </dependency>
        <!-- TensorFlow -->
        <dependency>
            <groupId>ai.djl.tensorflow</groupId>
            <artifactId>tensorflow-model-zoo</artifactId>
            <version>${djl.version}</version>
        </dependency>
        <dependency>
            <groupId>ai.djl.pytorch</groupId>
            <artifactId>pytorch-engine</artifactId>
            <version>${djl.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>ai.djl.tensorflow</groupId>
            <artifactId>tensorflow-engine</artifactId>
            <version>${djl.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>ai.djl.mxnet</groupId>
            <artifactId>mxnet-engine</artifactId>
            <version>${djl.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>ai.djl.onnxruntime</groupId>
            <artifactId>onnxruntime-engine</artifactId>
            <version>${djl.version}</version>
        </dependency>
        <dependency>
            <groupId>ai.djl.opencv</groupId>
            <artifactId>opencv</artifactId>
            <version>${djl.version}</version>
        </dependency>
        <dependency>
            <groupId>gov.nist.math</groupId>
            <artifactId>jama</artifactId>
            <version>1.0.3</version>
        </dependency>
        <dependency>
            <groupId>org.bytedeco</groupId>
            <artifactId>javacv</artifactId>
            <version>1.5.10</version>
        </dependency>
        <dependency>
            <groupId>ai.djl.pytorch</groupId>
            <artifactId>pytorch-jni</artifactId>
            <version>2.5.1-0.32.0</version>
            <scope>runtime</scope>
        </dependency>
        <!-- windows平台 (保留对应平台的配置,可以减小包大小)-->
        <dependency>
            <groupId>org.bytedeco</groupId>
            <artifactId>javacpp</artifactId>
            <version>${javacv.version}</version>
            <classifier>${javacv.platform.windows-x86_64}</classifier>
        </dependency>
 
        <dependency>
            <groupId>org.bytedeco</groupId>
            <artifactId>openblas</artifactId>
            <version>0.3.26-1.5.10</version>
            <classifier>${javacv.platform.windows-x86_64}</classifier>
        </dependency>
 
        <dependency>
            <groupId>org.bytedeco</groupId>
            <artifactId>opencv</artifactId>
            <version>4.9.0-1.5.10</version>
            <classifier>${javacv.platform.windows-x86_64}</classifier>
        </dependency>
 
        <dependency>
            <groupId>ai.djl.pytorch</groupId>
            <artifactId>pytorch-native-cpu</artifactId>
            <classifier>${djl.platform.windows-x86_64}</classifier>
            <version>2.5.1</version>
            <scope>runtime</scope>
        </dependency>
 
 
 
        <!-- linux x86 平台 (保留对应平台的配置,可以减小包大小)-->
        <!--        <dependency>-->
        <!--            <groupId>org.bytedeco</groupId>-->
        <!--            <artifactId>javacpp</artifactId>-->
        <!--            <version>${javacv.version}</version>-->
        <!--            <classifier>${javacv.platform.linux-x86_64}</classifier>-->
        <!--        </dependency>-->
        <!--        <dependency>-->
        <!--            <groupId>org.bytedeco</groupId>-->
        <!--            <artifactId>ffmpeg</artifactId>-->
        <!--            <version>6.1.1-1.5.10</version>-->
        <!--            <classifier>${javacv.platform.linux-x86_64}</classifier>-->
        <!--        </dependency>-->
 
        <!--        <dependency>-->
        <!--            <groupId>org.bytedeco</groupId>-->
        <!--            <artifactId>openblas</artifactId>-->
        <!--            <version>0.3.26-1.5.10</version>-->
        <!--            <classifier>${javacv.platform.linux-x86_64}</classifier>-->
        <!--        </dependency>-->
 
        <!--        <dependency>-->
        <!--            <groupId>org.bytedeco</groupId>-->
        <!--            <artifactId>opencv</artifactId>-->
        <!--            <version>4.9.0-1.5.10</version>-->
        <!--            <classifier>${javacv.platform.linux-x86_64}</classifier>-->
        <!--        </dependency>-->
 
        <!--        <dependency>-->
        <!--            <groupId>ai.djl.pytorch</groupId>-->
        <!--            <artifactId>pytorch-native-cpu</artifactId>-->
        <!--            <classifier>${djl.platform.linux-x86_64}</classifier>-->
        <!--            <version>2.5.1</version>-->
        <!--            <scope>runtime</scope>-->
        <!--        </dependency>-->
        <!--        <dependency>-->
        <!--            <groupId>ai.djl.pytorch</groupId>-->
        <!--            <artifactId>pytorch-native-cpu-precxx11</artifactId>-->
        <!--            <classifier>${djl.platform.linux-x86_64}</classifier>-->
        <!--            <version>2.5.1</version>-->
        <!--            <scope>runtime</scope>-->
        <!--        </dependency>-->
 
 
        <!-- macOS M系列 平台  (保留对应平台的配置,可以减小包大小)-->
        <!--        <dependency>-->
        <!--            <groupId>org.bytedeco</groupId>-->
        <!--            <artifactId>javacpp</artifactId>-->
        <!--            <version>${javacv.version}</version>-->
        <!--            <classifier>${javacv.platform.macosx-arm64}</classifier>-->
        <!--        </dependency>-->
        <!--        <dependency>-->
        <!--            <groupId>org.bytedeco</groupId>-->
        <!--            <artifactId>ffmpeg</artifactId>-->
        <!--            <version>6.1.1-1.5.10</version>-->
        <!--            <classifier>${javacv.platform.macosx-arm64}</classifier>-->
        <!--        </dependency>-->
 
        <!--        <dependency>-->
        <!--            <groupId>org.bytedeco</groupId>-->
        <!--            <artifactId>openblas</artifactId>-->
        <!--            <version>0.3.26-1.5.10</version>-->
        <!--            <classifier>${javacv.platform.macosx-arm64}</classifier>-->
        <!--        </dependency>-->
 
        <!--        <dependency>-->
        <!--            <groupId>org.bytedeco</groupId>-->
        <!--            <artifactId>opencv</artifactId>-->
        <!--            <version>4.9.0-1.5.10</version>-->
        <!--            <classifier>${javacv.platform.macosx-arm64}</classifier>-->
        <!--        </dependency>-->
 
        <!--        <dependency>-->
        <!--            <groupId>ai.djl.pytorch</groupId>-->
        <!--            <artifactId>pytorch-native-cpu</artifactId>-->
        <!--            <classifier>${djl.platform.osx-aarch64}</classifier>-->
        <!--            <version>2.5.1</version>-->
        <!--            <scope>runtime</scope>-->
        <!--        </dependency>-->
 
 
        <!-- linux aarch64 平台 (保留对应平台的配置,可以减小包大小)-->
        <!--        <dependency>-->
        <!--            <groupId>org.bytedeco</groupId>-->
        <!--            <artifactId>javacpp</artifactId>-->
        <!--            <version>${javacv.version}</version>-->
        <!--            <classifier>${javacv.platform.linux-arm64}</classifier>-->
        <!--        </dependency>-->
 
        <!--        <dependency>-->
        <!--            <groupId>org.bytedeco</groupId>-->
        <!--            <artifactId>ffmpeg</artifactId>-->
        <!--            <version>6.1.1-1.5.10</version>-->
        <!--            <classifier>${javacv.platform.linux-arm64}</classifier>-->
        <!--        </dependency>-->
 
        <!--        <dependency>-->
        <!--            <groupId>org.bytedeco</groupId>-->
        <!--            <artifactId>openblas</artifactId>-->
        <!--            <version>0.3.26-1.5.10</version>-->
        <!--            <classifier>${javacv.platform.linux-arm64}</classifier>-->
        <!--        </dependency>-->
 
        <!--        <dependency>-->
        <!--            <groupId>org.bytedeco</groupId>-->
        <!--            <artifactId>opencv</artifactId>-->
        <!--            <version>4.9.0-1.5.10</version>-->
        <!--            <classifier>${javacv.platform.linux-arm64}</classifier>-->
        <!--        </dependency>-->
    </dependencies>
 
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>logback-spring.xml</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <includes>
                    <include>PP_OCRv5/**</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>${spring-boot.version}</version>
                <configuration>
                    <mainClass>com.xindao.ocr.OcrToolApplication</mainClass>
                </configuration>
                <executions>
                    <execution>
                        <id>repackage</id>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
 
 
    <!-- 必须添加:SCM信息 -->
    <scm>
        <connection>scm:git:git://github.com/geekwenjie/SmartJavaAI.git</connection>
        <developerConnection>scm:git:ssh://github.com/geekwenjie/SmartJavaAI.git</developerConnection>
        <url>http://github.com/geekwenjie/SmartJavaAI/tree/master</url>
    </scm>
 
    <developers>
        <developer>
            <name>dengwenjie</name>
            <email>775747758@qq.com</email>
            <roles>
                <role>Project Manager</role>
                <role>Architect</role>
            </roles>
        </developer>
    </developers>
 
</project>