Compare commits
1098 Commits
release-2.
...
release-3.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad4e28c776 | ||
|
|
2cce44dbd2 | ||
|
|
a992b249b3 | ||
|
|
57b1148e66 | ||
|
|
07b7a4d2f2 | ||
|
|
43c21ec69e | ||
|
|
e81b45f41a | ||
|
|
b5e1b81ea5 | ||
|
|
fb2049f2de | ||
|
|
397902e253 | ||
|
|
744e418225 | ||
|
|
e5936d9566 | ||
|
|
d8ec431c34 | ||
|
|
42c78c0700 | ||
|
|
eac9f2f894 | ||
|
|
5593088ff7 | ||
|
|
208b2c7c0c | ||
|
|
a82ec6deac | ||
|
|
18d26061be | ||
|
|
2ccbf89a1a | ||
|
|
c2136a10e3 | ||
|
|
bbe419444a | ||
|
|
7ff22ec6a7 | ||
|
|
708ff455d4 | ||
|
|
08582e6ac5 | ||
|
|
a7e43b22bd | ||
|
|
d1369ea953 | ||
|
|
1d76575eff | ||
|
|
ee5fc21738 | ||
|
|
07c5ecd355 | ||
|
|
032be3a4b3 | ||
|
|
7d7e8d8c90 | ||
|
|
dfcd9e1b3d | ||
|
|
6166491831 | ||
|
|
6cdd35c27a | ||
|
|
ad555cd968 | ||
|
|
e0e9f02888 | ||
|
|
bd46b0889f | ||
|
|
b6834bdb0c | ||
|
|
1de4a48129 | ||
|
|
05648a7d40 | ||
|
|
ed530b6857 | ||
|
|
ad4bde7df8 | ||
|
|
12aebcfe17 | ||
|
|
fde1bf5c24 | ||
|
|
fffccefec7 | ||
|
|
0e1ea31d39 | ||
|
|
ce00207993 | ||
|
|
cd674238bb | ||
|
|
3ca042daa7 | ||
|
|
31e309ff53 | ||
|
|
a37a6b617a | ||
|
|
3dc3e06324 | ||
|
|
61248e2ec9 | ||
|
|
181277fed6 | ||
|
|
d2d1a35b32 | ||
|
|
c717a1c83a | ||
|
|
d4f1710e42 | ||
|
|
185ab841ae | ||
|
|
834dd496a3 | ||
|
|
f71d5c1d84 | ||
|
|
b064ebdf69 | ||
|
|
b786ba3f76 | ||
|
|
87960671f8 | ||
|
|
fe257fe6a3 | ||
|
|
053ae8eb24 | ||
|
|
40a52da3cf | ||
|
|
3f0d3dc985 | ||
|
|
ad35c69a18 | ||
|
|
8d50bd9b63 | ||
|
|
cf65bb55fb | ||
|
|
6c52a44143 | ||
|
|
c57e36ac54 | ||
|
|
efeb832272 | ||
|
|
934fbd03ec | ||
|
|
cf8964c873 | ||
|
|
160438be5a | ||
|
|
0eff2b0d70 | ||
|
|
8861657d18 | ||
|
|
ed16d84b86 | ||
|
|
0cff3438f6 | ||
|
|
39f7311f5f | ||
|
|
ed3731ba96 | ||
|
|
635775c810 | ||
|
|
af191d6add | ||
|
|
5b640d6580 | ||
|
|
b49b0ce3b8 | ||
|
|
4aada116e8 | ||
|
|
6ced3dd6f1 | ||
|
|
9b68645352 | ||
|
|
4aab895c8a | ||
|
|
45677d2a52 | ||
|
|
7dbfb81b08 | ||
|
|
4beb2ad207 | ||
|
|
d3e79967df | ||
|
|
3c6bab713c | ||
|
|
c30d88f618 | ||
|
|
9c6dfd64ab | ||
|
|
e4995cfd84 | ||
|
|
42c278a79f | ||
|
|
21aa9f7b7c | ||
|
|
baf7442a81 | ||
|
|
6eb91d3632 | ||
|
|
cbbabcb347 | ||
|
|
daf970af0e | ||
|
|
7423c135d1 | ||
|
|
01d8e18a13 | ||
|
|
fb7246540c | ||
|
|
7a365d92c9 | ||
|
|
7160195787 | ||
|
|
e07820a12c | ||
|
|
7685afc4de | ||
|
|
4d57a0fe58 | ||
|
|
db2f76d556 | ||
|
|
6562d440db | ||
|
|
28eeebb95d | ||
|
|
09fc22fcc2 | ||
|
|
01ab656487 | ||
|
|
7409e645f3 | ||
|
|
09cd7b16cf | ||
|
|
8851223abb | ||
|
|
fecd55fd29 | ||
|
|
805479cfa1 | ||
|
|
9a4b226795 | ||
|
|
c4efdc53be | ||
|
|
690cd163fa | ||
|
|
61ecf1bc1b | ||
|
|
882a0ee72f | ||
|
|
ff1c669d1e | ||
|
|
18d93c5cd3 | ||
|
|
07701638ed | ||
|
|
fa3bc49f3a | ||
|
|
dc20d89173 | ||
|
|
4cd501ccc7 | ||
|
|
69f4f83b34 | ||
|
|
ec0b871dfc | ||
|
|
63d82aaee9 | ||
|
|
bd27358ba4 | ||
|
|
9c917c33e1 | ||
|
|
1d96a77a19 | ||
|
|
d268ca70f8 | ||
|
|
974687291b | ||
|
|
bff143797f | ||
|
|
bcfd040e42 | ||
|
|
4eefb489ef | ||
|
|
c7c44cbf4b | ||
|
|
363439349e | ||
|
|
cc3d02dea5 | ||
|
|
855d6bd964 | ||
|
|
56f5cce2ef | ||
|
|
bc2ed54e47 | ||
|
|
668a1d36fb | ||
|
|
cf949021a9 | ||
|
|
8056340cd7 | ||
|
|
4eaafd1748 | ||
|
|
04901893e9 | ||
|
|
00d5c4b0b1 | ||
|
|
4f4d02aa2c | ||
|
|
780c69a9a8 | ||
|
|
4f6b2cdab5 | ||
|
|
26da5f25c4 | ||
|
|
6567108647 | ||
|
|
723b5a0248 | ||
|
|
1616043e24 | ||
|
|
c1c38c8318 | ||
|
|
94c33d4e03 | ||
|
|
a4986460f2 | ||
|
|
37e53f8b70 | ||
|
|
78481ec0e5 | ||
|
|
f6941a235d | ||
|
|
00b9def90c | ||
|
|
385f879cca | ||
|
|
1e0e297d34 | ||
|
|
8d2cbfbc67 | ||
|
|
a7df7ba267 | ||
|
|
99c0fbb537 | ||
|
|
693ac8d6aa | ||
|
|
45c7b4b5b5 | ||
|
|
620e5ca1cd | ||
|
|
695cee451d | ||
|
|
5651cf8d07 | ||
|
|
7534070411 | ||
|
|
1c47bfeaaa | ||
|
|
fe468a6310 | ||
|
|
6fca1a4597 | ||
|
|
c0279fdd4d | ||
|
|
fc6d47b678 | ||
|
|
86f455176d | ||
|
|
c0e3d6fe7f | ||
|
|
65fb7495fd | ||
|
|
323e0092e0 | ||
|
|
bc5ea094be | ||
|
|
d16a70f9e4 | ||
|
|
7a0579e7d2 | ||
|
|
5b04c2f6b8 | ||
|
|
a0260e12ab | ||
|
|
a08c433c87 | ||
|
|
4adee72f5a | ||
|
|
424d8e47fc | ||
|
|
b7bcbed0a9 | ||
|
|
56f68d3ac6 | ||
|
|
4bcb1347fd | ||
|
|
b8f0e28b33 | ||
|
|
b0b6cf0b2c | ||
|
|
8fa1f6fc43 | ||
|
|
1e40af9b3c | ||
|
|
55307e17e1 | ||
|
|
b77d3a92ff | ||
|
|
ce2d66127b | ||
|
|
ec5eb85074 | ||
|
|
a45827030d | ||
|
|
2fb590dcab | ||
|
|
e3d4df3946 | ||
|
|
6b10d1c844 | ||
|
|
386cc2fc14 | ||
|
|
1d00928216 | ||
|
|
40719fb376 | ||
|
|
15572a20dd | ||
|
|
077b3101b3 | ||
|
|
131a57eb95 | ||
|
|
e3557eff43 | ||
|
|
6444fb1031 | ||
|
|
bbd52c4e69 | ||
|
|
f9aa6be42d | ||
|
|
9ece7104f3 | ||
|
|
22707b6544 | ||
|
|
1474a1c8bc | ||
|
|
1ab41b8e62 | ||
|
|
9f7b4005a2 | ||
|
|
147a1c7aef | ||
|
|
e91212fe04 | ||
|
|
ba77bbceb3 | ||
|
|
1864c54c8c | ||
|
|
6a8d27246b | ||
|
|
4bcf377669 | ||
|
|
d2fd2af9fd | ||
|
|
a215f2ee69 | ||
|
|
031f6ec3bf | ||
|
|
0fa13c87e8 | ||
|
|
89683d024e | ||
|
|
20527e3fa4 | ||
|
|
446a965d16 | ||
|
|
45a9da0d85 | ||
|
|
e10a87277a | ||
|
|
b64a41ff97 | ||
|
|
afd892fd8c | ||
|
|
c698f1e92f | ||
|
|
9300aef884 | ||
|
|
f18d6ac7f9 | ||
|
|
594fcaaf0f | ||
|
|
6f493fbb9a | ||
|
|
4537e09991 | ||
|
|
2ad134c8aa | ||
|
|
a3b9ab01ce | ||
|
|
86116144e3 | ||
|
|
efbb8384e1 | ||
|
|
5d56c93559 | ||
|
|
92570f1896 | ||
|
|
ff9d8b23be | ||
|
|
61557b00a7 | ||
|
|
3a678548d9 | ||
|
|
39464aaa6a | ||
|
|
0c66f933ac | ||
|
|
8e0cf05222 | ||
|
|
a7634b9fcd | ||
|
|
eeab175f5c | ||
|
|
d5fed5ec0e | ||
|
|
c19c9e53ff | ||
|
|
15a1c373aa | ||
|
|
9ec96f17f2 | ||
|
|
2e64d632db | ||
|
|
db26572058 | ||
|
|
a12610fb3e | ||
|
|
97f257a8ab | ||
|
|
53aad4c900 | ||
|
|
345c46a457 | ||
|
|
c2fa06f606 | ||
|
|
e460f33c95 | ||
|
|
e9091876b6 | ||
|
|
c68dc3682a | ||
|
|
40796b9a7e | ||
|
|
31122e655b | ||
|
|
3eef5157f8 | ||
|
|
5cc95f3760 | ||
|
|
e31c0ec34d | ||
|
|
3e51cb4e81 | ||
|
|
bc63b17ae4 | ||
|
|
7f986fc1e3 | ||
|
|
5fb8d50b70 | ||
|
|
3ce9500894 | ||
|
|
142dc30a03 | ||
|
|
5e3db4a472 | ||
|
|
90b77a2809 | ||
|
|
948161c527 | ||
|
|
5397c74a34 | ||
|
|
97450688d6 | ||
|
|
6e7c6b082d | ||
|
|
6f281be4ff | ||
|
|
880cdd02b2 | ||
|
|
73b31d1118 | ||
|
|
74ec4894e0 | ||
|
|
c1022fc3e2 | ||
|
|
6270b05d3a | ||
|
|
bbd214dbc3 | ||
|
|
5fa66202a7 | ||
|
|
4dc45f6621 | ||
|
|
65b3204d5a | ||
|
|
636bd89b38 | ||
|
|
586a4fb06b | ||
|
|
951ebd8c04 | ||
|
|
8fe856f969 | ||
|
|
30758634e3 | ||
|
|
aa960b105a | ||
|
|
ac2099a332 | ||
|
|
eba787c22b | ||
|
|
0a288743ba | ||
|
|
538280f589 | ||
|
|
0af0080c85 | ||
|
|
25058ea982 | ||
|
|
41f0e3e26d | ||
|
|
0624f7eb5b | ||
|
|
4fef9e863c | ||
|
|
97d1a9b1ed | ||
|
|
d17a5ff7f2 | ||
|
|
7448029a9d | ||
|
|
47c207a906 | ||
|
|
a91c35137a | ||
|
|
c2c998ae11 | ||
|
|
b2aa762b7f | ||
|
|
60ba38e7b9 | ||
|
|
3fff71b76a | ||
|
|
fe87f871ef | ||
|
|
28433751fe | ||
|
|
aabed4edc6 | ||
|
|
6d86ce8fcb | ||
|
|
a066861c4c | ||
|
|
2037a59e3e | ||
|
|
e92dfe5c6b | ||
|
|
d02e5b7be4 | ||
|
|
3e5fa8770f | ||
|
|
0d6211aa52 | ||
|
|
eb31d307ae | ||
|
|
6d2fe791a5 | ||
|
|
b9d2b3de09 | ||
|
|
56fca04b22 | ||
|
|
92af1c405d | ||
|
|
bdbee2b3ba | ||
|
|
8d14f64369 | ||
|
|
dc572f4c30 | ||
|
|
e47dfd9b55 | ||
|
|
b6f792ec2c | ||
|
|
c77edb27bc | ||
|
|
df66af3f97 | ||
|
|
7f1639a29c | ||
|
|
e5c4881a50 | ||
|
|
4b88f2a25e | ||
|
|
2697647837 | ||
|
|
c8c86184cd | ||
|
|
68ba0a124d | ||
|
|
fbea43f0e0 | ||
|
|
9ac7d8cbf7 | ||
|
|
dc42d7d654 | ||
|
|
6aae690998 | ||
|
|
9393a62d94 | ||
|
|
25e48960c7 | ||
|
|
52874072e4 | ||
|
|
00b77122df | ||
|
|
6fc0596ce9 | ||
|
|
32c08d1418 | ||
|
|
e20523018a | ||
|
|
c05e77fcdd | ||
|
|
54c930cb24 | ||
|
|
72f26156f0 | ||
|
|
2fed8f4f8f | ||
|
|
c2b3a3a5b2 | ||
|
|
1c57a7bd9b | ||
|
|
e2282af933 | ||
|
|
5d7a4b8854 | ||
|
|
263eb3ff4c | ||
|
|
fb2d6ade0b | ||
|
|
ee45dd6555 | ||
|
|
29751a415f | ||
|
|
3743463438 | ||
|
|
29c6cd8afc | ||
|
|
6725648080 | ||
|
|
c732563b6b | ||
|
|
660de69b00 | ||
|
|
076611bdf1 | ||
|
|
26b3f774e0 | ||
|
|
d832388cff | ||
|
|
d05577666d | ||
|
|
cde5d02ffc | ||
|
|
cb0f3bc7a8 | ||
|
|
d21cbb3ef6 | ||
|
|
d17d69e479 | ||
|
|
cab3fad4d5 | ||
|
|
26bc197599 | ||
|
|
3e6aa26c5a | ||
|
|
2e0b836539 | ||
|
|
ff97c2bf00 | ||
|
|
ce620fedc9 | ||
|
|
8c1aed8627 | ||
|
|
bc18bc0665 | ||
|
|
1803384479 | ||
|
|
583855be67 | ||
|
|
b2e4c047ad | ||
|
|
efb0421fe8 | ||
|
|
777307bad9 | ||
|
|
5ee10f0306 | ||
|
|
c23c26b422 | ||
|
|
8611da6a4b | ||
|
|
775aafb033 | ||
|
|
75e018573d | ||
|
|
1269707b95 | ||
|
|
dd2929b7e8 | ||
|
|
04aceee288 | ||
|
|
fb046d3a5a | ||
|
|
1912adae65 | ||
|
|
d39c4b5d64 | ||
|
|
d4622caf1a | ||
|
|
5f7214bf2f | ||
|
|
294105c1b0 | ||
|
|
e8548eddde | ||
|
|
5bdf4ce86a | ||
|
|
b9465238f5 | ||
|
|
ffecb89e33 | ||
|
|
6a75b39940 | ||
|
|
78e83d00a7 | ||
|
|
7bcd3afb86 | ||
|
|
517257e058 | ||
|
|
313ec8afa0 | ||
|
|
ee4065ffd5 | ||
|
|
940289d083 | ||
|
|
21c9267a93 | ||
|
|
10d996d14e | ||
|
|
1d697c20bf | ||
|
|
333f6d3a32 | ||
|
|
7620bd4ccc | ||
|
|
5026faa458 | ||
|
|
8381e61f0c | ||
|
|
a8c4b6c2fe | ||
|
|
a0b0eb704c | ||
|
|
1ed570a205 | ||
|
|
21ebf6bdb1 | ||
|
|
11513dd44c | ||
|
|
5706011633 | ||
|
|
df07baea6c | ||
|
|
c73c1d3847 | ||
|
|
32592cd27f | ||
|
|
9137f84591 | ||
|
|
56c3bb3570 | ||
|
|
23e3a73f33 | ||
|
|
e7c67a95b6 | ||
|
|
ea6bb2ede9 | ||
|
|
c6543b4aeb | ||
|
|
5116192d32 | ||
|
|
810717b42a | ||
|
|
7554127ff7 | ||
|
|
201ba86072 | ||
|
|
d629ede38a | ||
|
|
11252a5636 | ||
|
|
db40932e6d | ||
|
|
03698c656e | ||
|
|
48ded6b06c | ||
|
|
4e66217909 | ||
|
|
bdec40487e | ||
|
|
ec9b05003d | ||
|
|
6501ad878d | ||
|
|
6c8fa9776f | ||
|
|
1d93aa8ab9 | ||
|
|
9aba297545 | ||
|
|
dec84a9b5a | ||
|
|
cbe39f4a5a | ||
|
|
e042384953 | ||
|
|
a644a8a074 | ||
|
|
c10f248721 | ||
|
|
30c5d10e05 | ||
|
|
4c3be9273c | ||
|
|
1833163b97 | ||
|
|
eb55029adf | ||
|
|
2eef53a9f0 | ||
|
|
9e6e2bde85 | ||
|
|
c73e93bec0 | ||
|
|
07db6839b8 | ||
|
|
17394682e2 | ||
|
|
97bd2a2b94 | ||
|
|
ad175df3d2 | ||
|
|
0cbe965d97 | ||
|
|
74f6d4d0e7 | ||
|
|
648fb1f7cf | ||
|
|
b6fc07cf9e | ||
|
|
57be6926a9 | ||
|
|
7abcfa39a0 | ||
|
|
6f76664141 | ||
|
|
1dfbea157a | ||
|
|
96840733c4 | ||
|
|
45f8ad1d5c | ||
|
|
b69191ba2b | ||
|
|
0028514ced | ||
|
|
8d8daf6851 | ||
|
|
815280dd23 | ||
|
|
7b52f92aea | ||
|
|
33543b76c9 | ||
|
|
ea5f8e98dd | ||
|
|
8996e06448 | ||
|
|
23bc263b85 | ||
|
|
53fb1cd055 | ||
|
|
f0ce905c7d | ||
|
|
df33d483de | ||
|
|
f44fb174ea | ||
|
|
70b1e73606 | ||
|
|
11fb0a0199 | ||
|
|
66f8f0e93a | ||
|
|
942c1693c7 | ||
|
|
7387797b17 | ||
|
|
bfb304ef1f | ||
|
|
17e6016b58 | ||
|
|
ba06cd14ef | ||
|
|
0209ada8d0 | ||
|
|
e2140222bc | ||
|
|
d679d99192 | ||
|
|
4bfcc0b808 | ||
|
|
ead29489ff | ||
|
|
c01e35b4c6 | ||
|
|
a89249069c | ||
|
|
2fc395bcff | ||
|
|
0ca244ad62 | ||
|
|
8a3eb268a9 | ||
|
|
8acc7dd326 | ||
|
|
1cde3fe5ad | ||
|
|
0a4c87fc22 | ||
|
|
12d803079f | ||
|
|
8c4b3ef3a2 | ||
|
|
ed6894c178 | ||
|
|
e0b91a4c92 | ||
|
|
4195a8b6b9 | ||
|
|
f4b821e509 | ||
|
|
c794089abf | ||
|
|
1fd10b9452 | ||
|
|
93ec8fc09c | ||
|
|
1df17918c6 | ||
|
|
fd03f1cfef | ||
|
|
9d708c5b51 | ||
|
|
146f655c5f | ||
|
|
05b6ed3d8d | ||
|
|
466b85ba3f | ||
|
|
6f9ef69b34 | ||
|
|
55f6731aa6 | ||
|
|
edf422b4f7 | ||
|
|
22c7a84c19 | ||
|
|
b02f60d772 | ||
|
|
f9f00cd2ee | ||
|
|
f7fc7bd928 | ||
|
|
037e5f2460 | ||
|
|
7750d864ed | ||
|
|
997aab7c55 | ||
|
|
190b4ea472 | ||
|
|
0dd4c4c4e4 | ||
|
|
e54e0c3001 | ||
|
|
b1aefabbea | ||
|
|
fcaa34f466 | ||
|
|
0032421167 | ||
|
|
efc428115c | ||
|
|
661aebdb2b | ||
|
|
3c4334a37f | ||
|
|
5f751d44fb | ||
|
|
7496def7a5 | ||
|
|
deba6a991f | ||
|
|
9a355fca02 | ||
|
|
bf61e022d8 | ||
|
|
984b303dfa | ||
|
|
b2c126ef8a | ||
|
|
136cc2fc3b | ||
|
|
f4eb59c954 | ||
|
|
726e0de6fe | ||
|
|
edd1656851 | ||
|
|
7f6f7d9d97 | ||
|
|
5f516ea7dc | ||
|
|
eeea4f38e3 | ||
|
|
88822c7918 | ||
|
|
0e4c9aee00 | ||
|
|
76f7f778cd | ||
|
|
41d5b4843a | ||
|
|
7b02d8fbf6 | ||
|
|
6d7d1c3b0c | ||
|
|
e2a06bbb0a | ||
|
|
6cecafd99d | ||
|
|
a58cb06a6d | ||
|
|
361f949d4a | ||
|
|
914770d651 | ||
|
|
447ffcd32f | ||
|
|
135eaf0c4f | ||
|
|
408d94ed58 | ||
|
|
f111a97d5d | ||
|
|
e48e1619f9 | ||
|
|
13fef5319c | ||
|
|
e5ee3136d4 | ||
|
|
a9d6e709a4 | ||
|
|
416181700e | ||
|
|
1e4a763f7b | ||
|
|
09926d8a57 | ||
|
|
54e28075c2 | ||
|
|
1fa4e06974 | ||
|
|
c163d0d7bd | ||
|
|
91f82a4436 | ||
|
|
eabdef1824 | ||
|
|
82ba2c7fac | ||
|
|
b5ba2ba4c9 | ||
|
|
9efaf9197f | ||
|
|
996be34534 | ||
|
|
37a43e3318 | ||
|
|
68f64aeef1 | ||
|
|
b2f0bf5c10 | ||
|
|
edb5f8d26b | ||
|
|
637227fafd | ||
|
|
4dc2452063 | ||
|
|
c9eb7d4ca0 | ||
|
|
c72d7de61f | ||
|
|
04fdc91dc9 | ||
|
|
ab8472e6a5 | ||
|
|
9f5417e223 | ||
|
|
15cf985b73 | ||
|
|
5c7f872488 | ||
|
|
990b7a4c78 | ||
|
|
6fca3d3df1 | ||
|
|
1ab0c0f68c | ||
|
|
a3d2d9a64d | ||
|
|
265e8b9e20 | ||
|
|
77700dd8b7 | ||
|
|
fec1f18487 | ||
|
|
a55d494b44 | ||
|
|
25df92c628 | ||
|
|
39f8ee2d53 | ||
|
|
d570887c76 | ||
|
|
eed479eb56 | ||
|
|
4ccb5e04dd | ||
|
|
6096359daf | ||
|
|
107e177223 | ||
|
|
deac3ef3b5 | ||
|
|
05070f2a66 | ||
|
|
da0cdfb717 | ||
|
|
58a1bb781a | ||
|
|
5f86767fae | ||
|
|
6d8106685e | ||
|
|
8aae656686 | ||
|
|
a2a25200bc | ||
|
|
63e45db40e | ||
|
|
7faf655828 | ||
|
|
94957c8d78 | ||
|
|
c54cac969c | ||
|
|
88e4d61b36 | ||
|
|
b7ef8f7e05 | ||
|
|
aff05c7247 | ||
|
|
f4e4050b46 | ||
|
|
5465f97a93 | ||
|
|
c80330c3f0 | ||
|
|
967426f10c | ||
|
|
b5d5ff641c | ||
|
|
f7aa9e11fd | ||
|
|
b0afa92879 | ||
|
|
7810f5ef83 | ||
|
|
8d1866ab9f | ||
|
|
6fc343b14e | ||
|
|
4205f25d2c | ||
|
|
41913d3555 | ||
|
|
17ee562c2e | ||
|
|
a4b07a0d1f | ||
|
|
6abec34cf5 | ||
|
|
fb94e7ff94 | ||
|
|
ff2d81ad5f | ||
|
|
bc37883097 | ||
|
|
f79e7a7fe3 | ||
|
|
4e29979d89 | ||
|
|
569baff305 | ||
|
|
09920c6391 | ||
|
|
abcd27ad88 | ||
|
|
fd08a26843 | ||
|
|
f5b35aae49 | ||
|
|
0775814ac5 | ||
|
|
f8f51bad1b | ||
|
|
cf489fefd0 | ||
|
|
db666bfdcf | ||
|
|
4a86044b30 | ||
|
|
9fc13e3d88 | ||
|
|
23c292409f | ||
|
|
b3775b4a3d | ||
|
|
cf0ff63359 | ||
|
|
285190b9ce | ||
|
|
dfa02df68f | ||
|
|
37714b2842 | ||
|
|
6229dcf4b2 | ||
|
|
9f27f77713 | ||
|
|
0393f8b642 | ||
|
|
6c473caa5f | ||
|
|
e36ef652ee | ||
|
|
5ab9cf8f2b | ||
|
|
0bf3ed7970 | ||
|
|
4f69e75ffc | ||
|
|
fe70c21dfa | ||
|
|
dd43f25214 | ||
|
|
0e1e27a7a8 | ||
|
|
bcb30fe79c | ||
|
|
f7c8ab2121 | ||
|
|
cce0c96265 | ||
|
|
9380ec0f27 | ||
|
|
0c8de2e626 | ||
|
|
9baa830d2f | ||
|
|
90efe06a0f | ||
|
|
7c4ff05591 | ||
|
|
4cb4f40f17 | ||
|
|
ab2c67d477 | ||
|
|
e8531cec03 | ||
|
|
3108c265f5 | ||
|
|
40a0f44690 | ||
|
|
fad6449d34 | ||
|
|
cbcff5b584 | ||
|
|
ee5b4d258e | ||
|
|
61e56eadd5 | ||
|
|
449c942727 | ||
|
|
323a2a592f | ||
|
|
640d92d464 | ||
|
|
b8fa84eaf8 | ||
|
|
23014f2954 | ||
|
|
c7a6dd96a6 | ||
|
|
098ac5d43f | ||
|
|
0e7b4801ed | ||
|
|
865ca20262 | ||
|
|
b7b970ff2a | ||
|
|
50f776ad81 | ||
|
|
d800df6ae5 | ||
|
|
94dcf754b3 | ||
|
|
77c18e958f | ||
|
|
16997bea1b | ||
|
|
1a15dcee32 | ||
|
|
f78b25e3de | ||
|
|
24c973d99e | ||
|
|
4e5f03bba1 | ||
|
|
dfd99baccd | ||
|
|
c291cc1a59 | ||
|
|
6f20fefadf | ||
|
|
700321b23d | ||
|
|
0ba3992173 | ||
|
|
096717e4d0 | ||
|
|
ab365420b9 | ||
|
|
27e1fd63e7 | ||
|
|
4d47634913 | ||
|
|
7e33501cd0 | ||
|
|
a6f4eb3727 | ||
|
|
0d2bebd8b1 | ||
|
|
b7a209a4a7 | ||
|
|
08c9fadbcb | ||
|
|
424c37984b | ||
|
|
35d5ba8b8f | ||
|
|
b4f725258d | ||
|
|
4a081c3214 | ||
|
|
0e2e12ca84 | ||
|
|
48ed75d935 | ||
|
|
34c46cb83d | ||
|
|
16f167b351 | ||
|
|
91df5c8bb7 | ||
|
|
86b1fca74c | ||
|
|
444fd6f027 | ||
|
|
9aa46e9c6c | ||
|
|
7beee5be62 | ||
|
|
64586d03ea | ||
|
|
5a551fec89 | ||
|
|
bc02653d63 | ||
|
|
9c1c9d0c89 | ||
|
|
2111c35b83 | ||
|
|
83ad8e81a9 | ||
|
|
18ee522c77 | ||
|
|
72fa59bab2 | ||
|
|
28ebc0e2e8 | ||
|
|
3bcdd0a10a | ||
|
|
cd1c5c5e50 | ||
|
|
a83d351ccc | ||
|
|
7196f71153 | ||
|
|
1c530f64f5 | ||
|
|
997a131278 | ||
|
|
eeeaca85f8 | ||
|
|
c884d7ddb9 | ||
|
|
7bffbe2541 | ||
|
|
ed6fc3e44e | ||
|
|
a01a5d798b | ||
|
|
38f5995ae4 | ||
|
|
e7c80da602 | ||
|
|
33696974fe | ||
|
|
376d1e38d5 | ||
|
|
c5385af754 | ||
|
|
422ee671d8 | ||
|
|
76b1a559f8 | ||
|
|
afc6dcd7b0 | ||
|
|
cf1fbd2923 | ||
|
|
a0f27bd80b | ||
|
|
46f8c6d082 | ||
|
|
5f9fdd9b62 | ||
|
|
9ed6636ad2 | ||
|
|
f8af29e3a1 | ||
|
|
669b6cd629 | ||
|
|
281c965213 | ||
|
|
80445f24bf | ||
|
|
10af19f419 | ||
|
|
a149a8da50 | ||
|
|
843ab52da0 | ||
|
|
506179f0c8 | ||
|
|
43881d5f66 | ||
|
|
ad9521528e | ||
|
|
d67be0c7de | ||
|
|
056f8af0ae | ||
|
|
4f8d897342 | ||
|
|
0a4c9e307f | ||
|
|
79f2d03d32 | ||
|
|
d2c93b770f | ||
|
|
bb25385097 | ||
|
|
60c5f7d890 | ||
|
|
3293299f34 | ||
|
|
6581af72b4 | ||
|
|
4ba9c73458 | ||
|
|
f7509e7dc9 | ||
|
|
19c2a6612b | ||
|
|
1b440a8e92 | ||
|
|
39e7aa52a2 | ||
|
|
0c8e004874 | ||
|
|
f9f67ddef4 | ||
|
|
2ac829ca32 | ||
|
|
6bafca0555 | ||
|
|
7516d3ddf4 | ||
|
|
a2136c22a5 | ||
|
|
3fcca35c73 | ||
|
|
6c27bc7f53 | ||
|
|
30f1db6e6d | ||
|
|
e80e53d4de | ||
|
|
8e5a780fc6 | ||
|
|
ad35f0bbc2 | ||
|
|
5c743dc169 | ||
|
|
b26338d0ef | ||
|
|
275ae04e56 | ||
|
|
672e252506 | ||
|
|
85558061ff | ||
|
|
b4c8a017ea | ||
|
|
5c8d05e076 | ||
|
|
0cfc6c3d4e | ||
|
|
cdedc13713 | ||
|
|
95172d7d17 | ||
|
|
5cc13b919a | ||
|
|
9ec03c0353 | ||
|
|
ef485db9a8 | ||
|
|
16ff55b27f | ||
|
|
fa1149cd4a | ||
|
|
5a937d3059 | ||
|
|
f11e609a14 | ||
|
|
e010b0974a | ||
|
|
fe1549960d | ||
|
|
df23e45861 | ||
|
|
5ec07ee7ab | ||
|
|
f1ebf5a7f0 | ||
|
|
dae2cc8514 | ||
|
|
5de8f1a19f | ||
|
|
be2369bdd4 | ||
|
|
51df4d8508 | ||
|
|
f7225d8e17 | ||
|
|
a9c9501af6 | ||
|
|
74de2725cb | ||
|
|
6250c453d9 | ||
|
|
54417a51f8 | ||
|
|
2f120db20e | ||
|
|
2079395774 | ||
|
|
b4c57116c1 | ||
|
|
ace7f76869 | ||
|
|
5349fd7ccd | ||
|
|
5999f6664f | ||
|
|
245ae28c27 | ||
|
|
4afa045545 | ||
|
|
c32ff88400 | ||
|
|
4214634de8 | ||
|
|
bffc6aff53 | ||
|
|
05e114f8b9 | ||
|
|
66d5f3dfd2 | ||
|
|
305e3a61e8 | ||
|
|
b614bef035 | ||
|
|
cce16daf1f | ||
|
|
94eb35ffda | ||
|
|
1ebc1ae841 | ||
|
|
e90a17a3d2 | ||
|
|
61747bafdd | ||
|
|
374ace0a34 | ||
|
|
2c355d2d68 | ||
|
|
512554196b | ||
|
|
a33715c015 | ||
|
|
3bc44c8526 | ||
|
|
4ccd0528f4 | ||
|
|
64d6a38bf5 | ||
|
|
9ede336a0c | ||
|
|
1c0d4b8bc6 | ||
|
|
0b53696181 | ||
|
|
d06b105102 | ||
|
|
b70f49522e | ||
|
|
23d75bac09 | ||
|
|
14ca71eed0 | ||
|
|
d519095436 | ||
|
|
2238c49352 | ||
|
|
ef71228e1a | ||
|
|
8bf407a5e5 | ||
|
|
79fe3757b1 | ||
|
|
c9dc5df28d | ||
|
|
57b2c819f9 | ||
|
|
04860456e8 | ||
|
|
14c334d2b0 | ||
|
|
d57796a667 | ||
|
|
551802aebb | ||
|
|
59b5ffaf95 | ||
|
|
d975836b25 | ||
|
|
5351c76c5d | ||
|
|
324dd75a52 | ||
|
|
bb830c6cbf | ||
|
|
1fd357dd97 | ||
|
|
51726f7ac4 | ||
|
|
d306abf8d7 | ||
|
|
a2aae1fa48 | ||
|
|
05ce84c5e8 | ||
|
|
b2a2cac32e | ||
|
|
2dbb265cf9 | ||
|
|
737207582a | ||
|
|
d654238115 | ||
|
|
279e84bf58 | ||
|
|
9dfbdb8aec | ||
|
|
931aebc5d5 | ||
|
|
3896079940 | ||
|
|
a69e39860a | ||
|
|
5cd31f97b6 | ||
|
|
08ee48c1d7 | ||
|
|
05cf5a491e | ||
|
|
8a8fc59d20 | ||
|
|
7f96fa94b7 | ||
|
|
ad29a6a02a | ||
|
|
54ac866554 | ||
|
|
2080677d83 | ||
|
|
11a1f04b0f | ||
|
|
8a7b216d67 | ||
|
|
e5dba06035 | ||
|
|
beeef7068f | ||
|
|
1f5db12adb | ||
|
|
e5c8508ad7 | ||
|
|
633afeb9e2 | ||
|
|
797011879a | ||
|
|
7365f8137c | ||
|
|
2f1369a877 | ||
|
|
e803facba6 | ||
|
|
dc7b341e02 | ||
|
|
73c52b95f5 | ||
|
|
1037fd56bc | ||
|
|
25525ad899 | ||
|
|
55a0cb95b7 | ||
|
|
00d438d5fb | ||
|
|
eb02745e06 | ||
|
|
fe4985f6f0 | ||
|
|
8825235088 | ||
|
|
44a60785c6 | ||
|
|
473e235397 | ||
|
|
16814e1e1d | ||
|
|
3546766e72 | ||
|
|
b57d9caef3 | ||
|
|
0603edc202 | ||
|
|
2a0cb7963a | ||
|
|
a56bd6c334 | ||
|
|
f5400f0c94 | ||
|
|
6a6c650062 | ||
|
|
ae084eb317 | ||
|
|
7c77db7135 | ||
|
|
7b14a87b9d | ||
|
|
0d0ebfd7bc | ||
|
|
dc438fa620 | ||
|
|
f5a5644d12 | ||
|
|
91cc2524d5 | ||
|
|
e504e5e012 | ||
|
|
6b2f414438 | ||
|
|
a0da3029fd | ||
|
|
30fe325428 | ||
|
|
6131013ce9 | ||
|
|
f1c145054a | ||
|
|
078aaaf150 | ||
|
|
c3a55fffab | ||
|
|
4eddf28c8f | ||
|
|
dd92c5b723 | ||
|
|
b5922086cb | ||
|
|
df12e4fc79 | ||
|
|
90ed311198 | ||
|
|
c922c63fbc | ||
|
|
28b278508f | ||
|
|
6b54f321b4 | ||
|
|
e47ec7cd10 | ||
|
|
701f6018f2 | ||
|
|
5ade203e31 | ||
|
|
6e83f37754 | ||
|
|
972161a991 | ||
|
|
700e11d342 | ||
|
|
fd79885b23 | ||
|
|
a0810b5b6e | ||
|
|
39271b45de | ||
|
|
db68aaf4ac | ||
|
|
a6cc8fa90d | ||
|
|
47f34f4ce8 | ||
|
|
b7a8347f45 | ||
|
|
c6d241f4f4 | ||
|
|
06b2fda1c1 | ||
|
|
5c1ca9271e | ||
|
|
e7485c5d79 | ||
|
|
80436a89f9 | ||
|
|
b36793cef0 | ||
|
|
43b51e78fc | ||
|
|
9688f73046 | ||
|
|
c02edd9cba | ||
|
|
b4d08e994c | ||
|
|
a220b8a208 | ||
|
|
ab480a7a86 | ||
|
|
f57a6d8d9e | ||
|
|
915ba87f7d | ||
|
|
42a95e8e20 | ||
|
|
a513357607 | ||
|
|
c8ccf4cf20 | ||
|
|
33d43a5afc | ||
|
|
3b057c7996 | ||
|
|
34547262a2 | ||
|
|
cd0ed982c0 | ||
|
|
52dcbcbfa5 | ||
|
|
0758de6d24 | ||
|
|
ae7892a6f9 | ||
|
|
73567ccedc | ||
|
|
bb552282f3 | ||
|
|
14c38101f7 | ||
|
|
cb3a30e9ad | ||
|
|
f4db41d0cb | ||
|
|
dad59f7d52 | ||
|
|
499e877165 | ||
|
|
2d249666ba | ||
|
|
cedc62a728 | ||
|
|
1e40bac24f | ||
|
|
23701d0db4 | ||
|
|
e7d8bf097a | ||
|
|
08a89aeca1 | ||
|
|
1b724f3336 | ||
|
|
ea4271ab37 | ||
|
|
d83b83a5ad | ||
|
|
0853b84e87 | ||
|
|
36225160a3 | ||
|
|
a36118f8ba | ||
|
|
a38384e7fb | ||
|
|
4b7c2bbcc0 | ||
|
|
504fe6ada3 | ||
|
|
39be54023b | ||
|
|
484ff5a6f9 | ||
|
|
59a7a577b3 | ||
|
|
0e73ef9615 | ||
|
|
d580d6c7f8 | ||
|
|
4c8bb038ce | ||
|
|
a89715b9a2 | ||
|
|
f05ea7c2e6 | ||
|
|
b68db3ab90 | ||
|
|
3539cfba36 | ||
|
|
3bf50d5267 | ||
|
|
2108019698 | ||
|
|
17a9921ba9 | ||
|
|
3baee1d077 | ||
|
|
e1ee728e31 | ||
|
|
1b45e6e1bc | ||
|
|
966aadd1d3 | ||
|
|
ecb8e3f0ac | ||
|
|
1bef6e3526 | ||
|
|
4c4d1d0f95 | ||
|
|
c36aa54370 | ||
|
|
4b480cfcf7 | ||
|
|
7e18e1bb76 | ||
|
|
44fdeb663f | ||
|
|
cf59949ba9 | ||
|
|
c8c2f28afc | ||
|
|
aa4bc6259b | ||
|
|
b7e4ea0b49 | ||
|
|
998197a47f | ||
|
|
3c8b6e6b6b | ||
|
|
be42b46ff9 | ||
|
|
7c689e33b8 | ||
|
|
af66bc02c2 | ||
|
|
752f75ad8e | ||
|
|
1cfde98585 | ||
|
|
54676295d5 | ||
|
|
61c7c65d8b | ||
|
|
6f05f735d0 | ||
|
|
befb16e531 | ||
|
|
abc433d6f2 | ||
|
|
e7c1385068 | ||
|
|
342c5aa34a | ||
|
|
f25ddfa024 | ||
|
|
e31de3a453 | ||
|
|
2f01754410 | ||
|
|
8a9921fb22 | ||
|
|
652e11a253 | ||
|
|
61cc6886fe | ||
|
|
8bb8b715c1 |
16
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -122,7 +122,21 @@ body:
|
||||
#multiple: false
|
||||
options:
|
||||
-
|
||||
- "2.0.x"
|
||||
- "`<2.2.0`"
|
||||
- "`2.2.x`"
|
||||
- "`>=2.5`"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: backend_name
|
||||
attributes:
|
||||
label: Backend name | 解析后端
|
||||
#multiple: false
|
||||
options:
|
||||
-
|
||||
- "vlm"
|
||||
- "pipeline"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
|
||||
20
.github/workflows/cli.yml
vendored
@@ -20,13 +20,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: PDF cli
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: dev
|
||||
fetch-depth: 2
|
||||
|
||||
- name: install uv
|
||||
uses: astral-sh/setup-uv@v5
|
||||
uses: astral-sh/setup-uv@v7
|
||||
|
||||
- name: install&test
|
||||
run: |
|
||||
@@ -38,11 +38,11 @@ jobs:
|
||||
cd $GITHUB_WORKSPACE && coverage run
|
||||
cd $GITHUB_WORKSPACE && python tests/get_coverage.py
|
||||
|
||||
notify_to_feishu:
|
||||
if: ${{ always() && !cancelled() && contains(needs.*.result, 'failure')}}
|
||||
needs: cli-test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: notify
|
||||
run: |
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"msg_type":"post","content":{"post":{"zh_cn":{"title":"'${{ github.repository }}' GitHubAction Failed","content":[[{"tag":"text","text":""},{"tag":"a","text":"Please click here for details ","href":"https://github.com/'${{ github.repository }}'/actions/runs/'${GITHUB_RUN_ID}'"}]]}}}}' ${{ secrets.FEISHU_WEBHOOK_URL }}
|
||||
# notify_to_feishu:
|
||||
# if: ${{ always() && !cancelled() && contains(needs.*.result, 'failure')}}
|
||||
# needs: cli-test
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: notify
|
||||
# run: |
|
||||
# curl -X POST -H "Content-Type: application/json" -d '{"msg_type":"post","content":{"post":{"zh_cn":{"title":"'${{ github.repository }}' GitHubAction Failed","content":[[{"tag":"text","text":""},{"tag":"a","text":"Please click here for details ","href":"https://github.com/'${{ github.repository }}'/actions/runs/'${GITHUB_RUN_ID}'"}]]}}}}' ${{ secrets.FEISHU_WEBHOOK_URL }}
|
||||
|
||||
2
.github/workflows/mkdocs.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout master
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: dev
|
||||
- name: Deploy docs
|
||||
|
||||
16
.github/workflows/python-package.yml
vendored
@@ -16,13 +16,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: master
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
@@ -64,7 +64,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: master
|
||||
fetch-depth: 0
|
||||
@@ -75,7 +75,7 @@ jobs:
|
||||
cat mineru/version.py
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
@@ -95,7 +95,7 @@ jobs:
|
||||
steps:
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: master
|
||||
fetch-depth: 0
|
||||
@@ -110,7 +110,7 @@ jobs:
|
||||
python -m build --wheel
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: wheel-file
|
||||
path: dist/*.whl
|
||||
@@ -121,10 +121,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v4
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: wheel-file
|
||||
path: dist
|
||||
|
||||
6
.gitignore
vendored
@@ -16,6 +16,12 @@ debug/
|
||||
*.ipynb
|
||||
.idea
|
||||
|
||||
# Python build artifacts
|
||||
*.egg-info/
|
||||
build/
|
||||
dist/
|
||||
*.egg
|
||||
|
||||
# vscode history
|
||||
.history
|
||||
|
||||
|
||||
671
README.md
@@ -1,7 +1,7 @@
|
||||
<div align="center" xmlns="http://www.w3.org/1999/html">
|
||||
<!-- logo -->
|
||||
<p align="center">
|
||||
<img src="docs/images/MinerU-logo.png" width="300px" style="vertical-align:middle;">
|
||||
<img src="https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docs/images/MinerU-logo.png" width="300px" style="vertical-align:middle;">
|
||||
</p>
|
||||
|
||||
<!-- icon -->
|
||||
@@ -18,7 +18,8 @@
|
||||
[](https://huggingface.co/spaces/opendatalab/MinerU)
|
||||
[](https://www.modelscope.cn/studios/OpenDataLab/MinerU)
|
||||
[](https://colab.research.google.com/gist/myhloli/a3cb16570ab3cfeadf9d8f0ac91b4fca/mineru_demo.ipynb)
|
||||
[](https://arxiv.org/abs/2409.18839)
|
||||
[](https://arxiv.org/abs/2409.18839)
|
||||
[](https://arxiv.org/abs/2509.22186)
|
||||
[](https://deepwiki.com/opendatalab/MinerU)
|
||||
|
||||
|
||||
@@ -44,524 +45,45 @@
|
||||
|
||||
# Changelog
|
||||
|
||||
- 2025/09/26 2.5.4 released
|
||||
- Fixed an issue where some `PDF` files were mistakenly identified as `AI` files, causing parsing failures
|
||||
- 2026/03/29 3.0.0 Released
|
||||
|
||||
- 2025/09/20 2.5.3 Released
|
||||
- Dependency version range adjustment to enable Turing and earlier architecture GPUs to use vLLM acceleration for MinerU2.5 model inference.
|
||||
- `pipeline` backend compatibility fixes for torch 2.8.0.
|
||||
- Reduced default concurrency for vLLM async backend to lower server pressure and avoid connection closure issues caused by high load.
|
||||
- More compatibility-related details can be found in the [announcement](https://github.com/opendatalab/MinerU/discussions/3548)
|
||||
This release delivers a systematic upgrade centered on **parsing capability, system architecture, and engineering usability**. The main updates include:
|
||||
|
||||
- Native `DOCX` parsing
|
||||
- Official support for native `DOCX` parsing, delivering high-precision results without hallucinations.
|
||||
- Compared with the traditional workflow of first converting `DOCX` to `PDF` and then parsing it, end-to-end speed is improved by tens of times, making it better suited for scenarios with high requirements for both accuracy and throughput.
|
||||
- `pipeline` backend upgrade
|
||||
- The `pipeline` backend achieves a score of `86.2` on OmniDocBench (v1.5), surpassing the accuracy of the previous-generation mainstream VLM `MinerU2.0-2505-0.9B`.
|
||||
- Added support for parsing images/formulas inside tables, seal text recognition, vertical text support, and interline formula numbering recognition, continuously improving parsing quality for complex document scenarios.
|
||||
- While maintaining high accuracy, it keeps resource usage extremely low and continues to support inference in pure CPU environments.
|
||||
- `API / CLI / Router` orchestration upgrade
|
||||
- `mineru` now runs as an orchestration client based on `mineru-api`; when `--api-url` is not provided, it will automatically start a local temporary service.
|
||||
- `mineru-api` adds a new asynchronous task endpoint `POST /tasks`, supporting task submission, status querying, and result retrieval; meanwhile, it retains the synchronous parsing endpoint `POST /file_parse` for compatibility with legacy plugins.
|
||||
- Added `mineru-router`, designed for unified entry deployment and task routing across multiple services and multiple GPUs; its interfaces are fully compatible with `mineru-api` and support automatic task load balancing.
|
||||
- Deployment and usability improvements
|
||||
- Resolved compatibility issues with `torch >= 2.8`; the base image has been upgraded to `vllm0.11.2 + torch2.9.0`, unifying installation paths across different Compute Capabilities.
|
||||
- Optimized the parsing pipeline with a sliding-window mechanism, significantly reducing peak memory usage in long-document scenarios, so documents with tens of thousands of pages no longer need to be split manually.
|
||||
- Batch inference in `pipeline` now supports streaming writes to disk, allowing completed parsing results to be written out in time and further improving the experience for long-running tasks.
|
||||
- Completed thread-safety optimization and now fully supports multi-threaded concurrent inference; together with `mineru-router`, this enables one-click multi-GPU deployment and makes it easy to build high-concurrency, high-throughput parsing systems.
|
||||
- Completely removed the use of two AGPLv3 models (`doclayoutyolo` and `mfd_yolov8`) and one CC-BY-NC-SA 4.0 model (`layoutreader`).
|
||||
|
||||
This update is not just a set of feature enhancements, but a key leap forward in MinerU's overall system capabilities. We specifically addressed the peak memory usage issue in long-document parsing. Through optimizations such as sliding windows and streaming writes to disk, ultra-long document parsing has moved from “requiring manual splitting and careful handling” to being “stable, scalable, and ready for production workloads.” At the same time, we completed thread-safety optimization and fully enabled multi-threaded concurrent inference, further improving single-machine resource utilization and runtime stability under high-concurrency workloads. On top of this, with `mineru-router` and the new `API / CLI` orchestration framework, MinerU now supports one-click multi-GPU deployment, unified access across multiple services, and automatic task load balancing, significantly reducing the difficulty of large-scale deployment. As a result, MinerU is evolving from a standalone data production tool into a large-scale document parsing foundation for high-concurrency and high-throughput scenarios, providing enterprise-grade document data processing with infrastructure that is more stable, more efficient, and easier to scale.
|
||||
|
||||
- 2025/09/19 2.5.2 Released
|
||||
|
||||
We are officially releasing MinerU2.5, currently the most powerful multimodal large model for document parsing.
|
||||
With only 1.2B parameters, MinerU2.5's accuracy on the OmniDocBench benchmark comprehensively surpasses top-tier multimodal models like Gemini 2.5 Pro, GPT-4o, and Qwen2.5-VL-72B. It also significantly outperforms leading specialized models such as dots.ocr, MonkeyOCR, and PP-StructureV3.
|
||||
The model has been released on [HuggingFace](https://huggingface.co/opendatalab/MinerU2.5-2509-1.2B) and [ModelScope](https://modelscope.cn/models/opendatalab/MinerU2.5-2509-1.2B) platforms. Welcome to download and use!
|
||||
- Core Highlights:
|
||||
- SOTA Performance with Extreme Efficiency: As a 1.2B model, it achieves State-of-the-Art (SOTA) results that exceed models in the 10B and 100B+ classes, redefining the performance-per-parameter standard in document AI.
|
||||
- Advanced Architecture for Across-the-Board Leadership: By combining a two-stage inference pipeline (decoupling layout analysis from content recognition) with a native high-resolution architecture, it achieves SOTA performance across five key areas: layout analysis, text recognition, formula recognition, table recognition, and reading order.
|
||||
- Key Capability Enhancements:
|
||||
- Layout Detection: Delivers more complete results by accurately covering non-body content like headers, footers, and page numbers. It also provides more precise element localization and natural format reconstruction for lists and references.
|
||||
- Table Parsing: Drastically improves parsing for challenging cases, including rotated tables, borderless/semi-structured tables, and long/complex tables.
|
||||
- Formula Recognition: Significantly boosts accuracy for complex, long-form, and hybrid Chinese-English formulas, greatly enhancing the parsing capability for mathematical documents.
|
||||
|
||||
Additionally, with the release of vlm 2.5, we have made some adjustments to the repository:
|
||||
- The vlm backend has been upgraded to version 2.5, supporting the MinerU2.5 model and no longer compatible with the MinerU2.0-2505-0.9B model. The last version supporting the 2.0 model is mineru-2.2.2.
|
||||
- VLM inference-related code has been moved to [mineru_vl_utils](https://github.com/opendatalab/mineru-vl-utils), reducing coupling with the main mineru repository and facilitating independent iteration in the future.
|
||||
- The vlm accelerated inference framework has been switched from `sglang` to `vllm`, achieving full compatibility with the vllm ecosystem, allowing users to use the MinerU2.5 model and accelerated inference on any platform that supports the vllm framework.
|
||||
- Due to major upgrades in the vlm model supporting more layout types, we have made some adjustments to the structure of the parsing intermediate file `middle.json` and result file `content_list.json`. Please refer to the [documentation](https://opendatalab.github.io/MinerU/reference/output_files/) for details.
|
||||
|
||||
Other repository optimizations:
|
||||
- Removed file extension whitelist validation for input files. When input files are PDF documents or images, there are no longer requirements for file extensions, improving usability.
|
||||
|
||||
<details>
|
||||
<summary>History Log</summary>
|
||||
|
||||
<details>
|
||||
<summary>2025/09/10 2.2.2 Released</summary>
|
||||
<ul>
|
||||
<li>Fixed the issue where the new table recognition model would affect the overall parsing task when some table parsing failed</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/09/08 2.2.1 Released</summary>
|
||||
<ul>
|
||||
<li>Fixed the issue where some newly added models were not downloaded when using the model download command.</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/09/05 2.2.0 Released</summary>
|
||||
<ul>
|
||||
<li>
|
||||
Major Updates
|
||||
<ul>
|
||||
<li>In this version, we focused on improving table parsing accuracy by introducing a new <a href="https://github.com/RapidAI/TableStructureRec">wired table recognition model</a> and a brand-new hybrid table structure parsing algorithm, significantly enhancing the table recognition capabilities of the <code>pipeline</code> backend.</li>
|
||||
<li>We also added support for cross-page table merging, which is supported by both <code>pipeline</code> and <code>vlm</code> backends, further improving the completeness and accuracy of table parsing.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Other Updates
|
||||
<ul>
|
||||
<li>The <code>pipeline</code> backend now supports 270-degree rotated table parsing, bringing support for table parsing in 0/90/270-degree orientations</li>
|
||||
<li><code>pipeline</code> added OCR capability support for Thai and Greek, and updated the English OCR model to the latest version. English recognition accuracy improved by 11%, Thai recognition model accuracy is 82.68%, and Greek recognition model accuracy is 89.28% (by PPOCRv5)</li>
|
||||
<li>Added <code>bbox</code> field (mapped to 0-1000 range) in the output <code>content_list.json</code>, making it convenient for users to directly obtain position information for each content block</li>
|
||||
<li>Removed the <code>pipeline_old_linux</code> installation option, no longer supporting legacy Linux systems such as <code>CentOS 7</code>, to provide better support for <code>uv</code>'s <code>sync</code>/<code>run</code> commands</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/08/01 2.1.10 Released</summary>
|
||||
<ul>
|
||||
<li>Fixed an issue in the <code>pipeline</code> backend where block overlap caused the parsing results to deviate from expectations #3232</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/07/30 2.1.9 Released</summary>
|
||||
<ul>
|
||||
<li><code>transformers</code> 4.54.1 version adaptation</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/07/28 2.1.8 Released</summary>
|
||||
<ul>
|
||||
<li><code>sglang</code> 0.4.9.post5 version adaptation</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/07/27 2.1.7 Released</summary>
|
||||
<ul>
|
||||
<li><code>transformers</code> 4.54.0 version adaptation</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/07/26 2.1.6 Released</summary>
|
||||
<ul>
|
||||
<li>Fixed table parsing issues in handwritten documents when using <code>vlm</code> backend</li>
|
||||
<li>Fixed visualization box position drift issue when document is rotated #3175</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/07/24 2.1.5 Released</summary>
|
||||
<ul>
|
||||
<li><code>sglang</code> 0.4.9 version adaptation, synchronously upgrading the dockerfile base image to sglang 0.4.9.post3</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/07/23 2.1.4 Released</summary>
|
||||
<ul>
|
||||
<li><strong>Bug Fixes</strong>
|
||||
<ul>
|
||||
<li>Fixed the issue of excessive memory consumption during the <code>MFR</code> step in the <code>pipeline</code> backend under certain scenarios #2771</li>
|
||||
<li>Fixed the inaccurate matching between <code>image</code>/<code>table</code> and <code>caption</code>/<code>footnote</code> under certain conditions #3129</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/07/16 2.1.1 Released</summary>
|
||||
<ul>
|
||||
<li><strong>Bug fixes</strong>
|
||||
<ul>
|
||||
<li>Fixed text block content loss issue that could occur in certain <code>pipeline</code> scenarios #3005</li>
|
||||
<li>Fixed issue where <code>sglang-client</code> required unnecessary packages like <code>torch</code> #2968</li>
|
||||
<li>Updated <code>dockerfile</code> to fix incomplete text content parsing due to missing fonts in Linux #2915</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Usability improvements</strong>
|
||||
<ul>
|
||||
<li>Updated <code>compose.yaml</code> to facilitate direct startup of <code>sglang-server</code>, <code>mineru-api</code>, and <code>mineru-gradio</code> services</li>
|
||||
<li>Launched brand new <a href="https://opendatalab.github.io/MinerU/">online documentation site</a>, simplified readme, providing better documentation experience</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/07/05 2.1.0 Released</summary>
|
||||
<ul>
|
||||
<li>This is the first major update of MinerU 2, which includes a large number of new features and improvements, covering significant performance optimizations, user experience enhancements, and bug fixes. The detailed update contents are as follows:</li>
|
||||
<li><strong>Performance Optimizations:</strong>
|
||||
<ul>
|
||||
<li>Significantly improved preprocessing speed for documents with specific resolutions (around 2000 pixels on the long side).</li>
|
||||
<li>Greatly enhanced post-processing speed when the <code>pipeline</code> backend handles batch processing of documents with fewer pages (<10 pages).</li>
|
||||
<li>Layout analysis speed of the <code>pipeline</code> backend has been increased by approximately 20%.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Experience Enhancements:</strong>
|
||||
<ul>
|
||||
<li>Built-in ready-to-use <code>fastapi service</code> and <code>gradio webui</code>. For detailed usage instructions, please refer to <a href="https://opendatalab.github.io/MinerU/usage/quick_usage/#advanced-usage-via-api-webui-sglang-clientserver">Documentation</a>.</li>
|
||||
<li>Adapted to <code>sglang</code> version <code>0.4.8</code>, significantly reducing the GPU memory requirements for the <code>vlm-sglang</code> backend. It can now run on graphics cards with as little as <code>8GB GPU memory</code> (Turing architecture or newer).</li>
|
||||
<li>Added transparent parameter passing for all commands related to <code>sglang</code>, allowing the <code>sglang-engine</code> backend to receive all <code>sglang</code> parameters consistently with the <code>sglang-server</code>.</li>
|
||||
<li>Supports feature extensions based on configuration files, including <code>custom formula delimiters</code>, <code>enabling heading classification</code>, and <code>customizing local model directories</code>. For detailed usage instructions, please refer to <a href="https://opendatalab.github.io/MinerU/usage/quick_usage/#extending-mineru-functionality-with-configuration-files">Documentation</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>New Features:</strong>
|
||||
<ul>
|
||||
<li>Updated the <code>pipeline</code> backend with the PP-OCRv5 multilingual text recognition model, supporting text recognition in 37 languages such as French, Spanish, Portuguese, Russian, and Korean, with an average accuracy improvement of over 30%. <a href="https://paddlepaddle.github.io/PaddleOCR/latest/en/version3.x/algorithm/PP-OCRv5/PP-OCRv5_multi_languages.html">Details</a></li>
|
||||
<li>Introduced limited support for vertical text layout in the <code>pipeline</code> backend.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/06/20 2.0.6 Released</summary>
|
||||
<ul>
|
||||
<li>Fixed occasional parsing interruptions caused by invalid block content in <code>vlm</code> mode</li>
|
||||
<li>Fixed parsing interruptions caused by incomplete table structures in <code>vlm</code> mode</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/06/17 2.0.5 Released</summary>
|
||||
<ul>
|
||||
<li>Fixed the issue where models were still required to be downloaded in the <code>sglang-client</code> mode</li>
|
||||
<li>Fixed the issue where the <code>sglang-client</code> mode unnecessarily depended on packages like <code>torch</code> during runtime.</li>
|
||||
<li>Fixed the issue where only the first instance would take effect when attempting to launch multiple <code>sglang-client</code> instances via multiple URLs within the same process</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/06/15 2.0.3 released</summary>
|
||||
<ul>
|
||||
<li>Fixed a configuration file key-value update error that occurred when downloading model type was set to <code>all</code></li>
|
||||
<li>Fixed the issue where the formula and table feature toggle switches were not working in <code>command line mode</code>, causing the features to remain enabled.</li>
|
||||
<li>Fixed compatibility issues with sglang version 0.4.7 in the <code>sglang-engine</code> mode.</li>
|
||||
<li>Updated Dockerfile and installation documentation for deploying the full version of MinerU in sglang environment</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/06/13 2.0.0 Released</summary>
|
||||
<ul>
|
||||
<li><strong>New Architecture</strong>: MinerU 2.0 has been deeply restructured in code organization and interaction methods, significantly improving system usability, maintainability, and extensibility.
|
||||
<ul>
|
||||
<li><strong>Removal of Third-party Dependency Limitations</strong>: Completely eliminated the dependency on <code>pymupdf</code>, moving the project toward a more open and compliant open-source direction.</li>
|
||||
<li><strong>Ready-to-use, Easy Configuration</strong>: No need to manually edit JSON configuration files; most parameters can now be set directly via command line or API.</li>
|
||||
<li><strong>Automatic Model Management</strong>: Added automatic model download and update mechanisms, allowing users to complete model deployment without manual intervention.</li>
|
||||
<li><strong>Offline Deployment Friendly</strong>: Provides built-in model download commands, supporting deployment requirements in completely offline environments.</li>
|
||||
<li><strong>Streamlined Code Structure</strong>: Removed thousands of lines of redundant code, simplified class inheritance logic, significantly improving code readability and development efficiency.</li>
|
||||
<li><strong>Unified Intermediate Format Output</strong>: Adopted standardized <code>middle_json</code> format, compatible with most secondary development scenarios based on this format, ensuring seamless ecosystem business migration.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>New Model</strong>: MinerU 2.0 integrates our latest small-parameter, high-performance multimodal document parsing model, achieving end-to-end high-speed, high-precision document understanding.
|
||||
<ul>
|
||||
<li><strong>Small Model, Big Capabilities</strong>: With parameters under 1B, yet surpassing traditional 72B-level vision-language models (VLMs) in parsing accuracy.</li>
|
||||
<li><strong>Multiple Functions in One</strong>: A single model covers multilingual recognition, handwriting recognition, layout analysis, table parsing, formula recognition, reading order sorting, and other core tasks.</li>
|
||||
<li><strong>Ultimate Inference Speed</strong>: Achieves peak throughput exceeding 10,000 tokens/s through <code>sglang</code> acceleration on a single NVIDIA 4090 card, easily handling large-scale document processing requirements.</li>
|
||||
<li><strong>Online Experience</strong>: You can experience our brand-new VLM model on <a href="https://mineru.net/OpenSourceTools/Extractor">MinerU.net</a>, <a href="https://huggingface.co/spaces/opendatalab/MinerU">Hugging Face</a>, and <a href="https://www.modelscope.cn/studios/OpenDataLab/MinerU">ModelScope</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Incompatible Changes Notice</strong>: To improve overall architectural rationality and long-term maintainability, this version contains some incompatible changes:
|
||||
<ul>
|
||||
<li>Python package name changed from <code>magic-pdf</code> to <code>mineru</code>, and the command-line tool changed from <code>magic-pdf</code> to <code>mineru</code>. Please update your scripts and command calls accordingly.</li>
|
||||
<li>For modular system design and ecosystem consistency considerations, MinerU 2.0 no longer includes the LibreOffice document conversion module. If you need to process Office documents, we recommend converting them to PDF format through an independently deployed LibreOffice service before proceeding with subsequent parsing operations.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
<details>
|
||||
<summary>2025/05/24 Release 1.3.12</summary>
|
||||
<ul>
|
||||
<li>Added support for PPOCRv5 models, updated <code>ch_server</code> model to <code>PP-OCRv5_rec_server</code>, and <code>ch_lite</code> model to <code>PP-OCRv5_rec_mobile</code> (model update required)
|
||||
<ul>
|
||||
<li>In testing, we found that PPOCRv5(server) has some improvement for handwritten documents, but has slightly lower accuracy than v4_server_doc for other document types, so the default ch model remains unchanged as <code>PP-OCRv4_server_rec_doc</code>.</li>
|
||||
<li>Since PPOCRv5 has enhanced recognition capabilities for handwriting and special characters, you can manually choose the PPOCRv5 model for Japanese-Traditional Chinese mixed scenarios and handwritten documents</li>
|
||||
<li>You can select the appropriate model through the lang parameter <code>lang='ch_server'</code> (Python API) or <code>--lang ch_server</code> (command line):
|
||||
<ul>
|
||||
<li><code>ch</code>: <code>PP-OCRv4_server_rec_doc</code> (default) (Chinese/English/Japanese/Traditional Chinese mixed/15K dictionary)</li>
|
||||
<li><code>ch_server</code>: <code>PP-OCRv5_rec_server</code> (Chinese/English/Japanese/Traditional Chinese mixed + handwriting/18K dictionary)</li>
|
||||
<li><code>ch_lite</code>: <code>PP-OCRv5_rec_mobile</code> (Chinese/English/Japanese/Traditional Chinese mixed + handwriting/18K dictionary)</li>
|
||||
<li><code>ch_server_v4</code>: <code>PP-OCRv4_rec_server</code> (Chinese/English mixed/6K dictionary)</li>
|
||||
<li><code>ch_lite_v4</code>: <code>PP-OCRv4_rec_mobile</code> (Chinese/English mixed/6K dictionary)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Added support for handwritten documents through optimized layout recognition of handwritten text areas
|
||||
<ul>
|
||||
<li>This feature is supported by default, no additional configuration required</li>
|
||||
<li>You can refer to the instructions above to manually select the PPOCRv5 model for better handwritten document parsing results</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>The <code>huggingface</code> and <code>modelscope</code> demos have been updated to versions that support handwriting recognition and PPOCRv5 models, which you can experience online</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/04/29 Release 1.3.10</summary>
|
||||
<ul>
|
||||
<li>Added support for custom formula delimiters, which can be configured by modifying the <code>latex-delimiter-config</code> section in the <code>magic-pdf.json</code> file in your user directory.</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/04/27 Release 1.3.9</summary>
|
||||
<ul>
|
||||
<li>Optimized formula parsing functionality, improved formula rendering success rate</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/04/23 Release 1.3.8</summary>
|
||||
<ul>
|
||||
<li>The default <code>ocr</code> model (<code>ch</code>) has been updated to <code>PP-OCRv4_server_rec_doc</code> (model update required)
|
||||
<ul>
|
||||
<li><code>PP-OCRv4_server_rec_doc</code> is trained on a mixture of more Chinese document data and PP-OCR training data based on <code>PP-OCRv4_server_rec</code>, adding recognition capabilities for some traditional Chinese characters, Japanese, and special characters. It can recognize over 15,000 characters and improves both document-specific and general text recognition abilities.</li>
|
||||
<li><a href="https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/text_recognition.html#_3">Performance comparison of PP-OCRv4_server_rec_doc/PP-OCRv4_server_rec/PP-OCRv4_mobile_rec</a></li>
|
||||
<li>After verification, the <code>PP-OCRv4_server_rec_doc</code> model shows significant accuracy improvements in Chinese/English/Japanese/Traditional Chinese in both single language and mixed language scenarios, with comparable speed to <code>PP-OCRv4_server_rec</code>, making it suitable for most use cases.</li>
|
||||
<li>In some pure English scenarios, <code>PP-OCRv4_server_rec_doc</code> may have word adhesion issues, while <code>PP-OCRv4_server_rec</code> performs better in these cases. Therefore, we've kept the <code>PP-OCRv4_server_rec</code> model, which users can access by adding the parameter <code>lang='ch_server'</code> (Python API) or <code>--lang ch_server</code> (command line).</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/04/22 Release 1.3.7</summary>
|
||||
<ul>
|
||||
<li>Fixed the issue where the lang parameter was ineffective during table parsing model initialization</li>
|
||||
<li>Fixed the significant speed reduction of OCR and table parsing in <code>cpu</code> mode</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/04/16 Release 1.3.4</summary>
|
||||
<ul>
|
||||
<li>Slightly improved OCR-det speed by removing some unnecessary blocks</li>
|
||||
<li>Fixed page-internal sorting errors caused by footnotes in certain cases</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/04/12 Release 1.3.2</summary>
|
||||
<ul>
|
||||
<li>Fixed dependency version incompatibility issues when installing on Windows with Python 3.13</li>
|
||||
<li>Optimized memory usage during batch inference</li>
|
||||
<li>Improved parsing of tables rotated 90 degrees</li>
|
||||
<li>Enhanced parsing of oversized tables in financial report samples</li>
|
||||
<li>Fixed the occasional word adhesion issue in English text areas when OCR language is not specified (model update required)</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/04/08 Release 1.3.1</summary>
|
||||
<ul>
|
||||
<li>Fixed several compatibility issues
|
||||
<ul>
|
||||
<li>Added support for Python 3.13</li>
|
||||
<li>Made final adaptations for outdated Linux systems (such as CentOS 7) with no guarantee of continued support in future versions, <a href="https://github.com/opendatalab/MinerU/issues/1004">installation instructions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/04/03 Release 1.3.0</summary>
|
||||
<ul>
|
||||
<li>Installation and compatibility optimizations
|
||||
<ul>
|
||||
<li>Resolved compatibility issues caused by <code>detectron2</code> by removing <code>layoutlmv3</code> usage in layout</li>
|
||||
<li>Extended torch version compatibility to 2.2~2.6 (excluding 2.5)</li>
|
||||
<li>Added CUDA compatibility for versions 11.8/12.4/12.6/12.8 (CUDA version determined by torch), solving compatibility issues for users with 50-series and H-series GPUs</li>
|
||||
<li>Extended Python compatibility to versions 3.10~3.12, fixing the issue of automatic downgrade to version 0.6.1 when installing in non-3.10 environments</li>
|
||||
<li>Optimized offline deployment process, eliminating the need to download any model files after successful deployment</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Performance optimizations
|
||||
<ul>
|
||||
<li>Enhanced parsing speed for batches of small files by supporting batch processing of multiple PDF files (<a href="demo/batch_demo.py">script example</a>), with formula parsing speed improved by up to 1400% and overall parsing speed improved by up to 500% compared to version 1.0.1</li>
|
||||
<li>Reduced memory usage and improved parsing speed by optimizing MFR model loading and usage (requires re-running the <a href="docs/how_to_download_models_zh_cn.md">model download process</a> to get incremental updates to model files)</li>
|
||||
<li>Optimized GPU memory usage, requiring only 6GB minimum to run this project</li>
|
||||
<li>Improved running speed on MPS devices</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Parsing effect optimizations
|
||||
<ul>
|
||||
<li>Updated MFR model to <code>unimernet(2503)</code>, fixing line break loss issues in multi-line formulas</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Usability optimizations
|
||||
<ul>
|
||||
<li>Completely replaced the <code>paddle</code> framework and <code>paddleocr</code> in the project by using <code>paddleocr2torch</code>, resolving conflicts between <code>paddle</code> and <code>torch</code>, as well as thread safety issues caused by the <code>paddle</code> framework</li>
|
||||
<li>Added real-time progress bar display during parsing, allowing precise tracking of parsing progress and making the waiting process more bearable</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
<details>
|
||||
<summary>2025/03/03 1.2.1 released</summary>
|
||||
<ul>
|
||||
<li>Fixed the impact on punctuation marks during full-width to half-width conversion of letters and numbers</li>
|
||||
<li>Fixed caption matching inaccuracies in certain scenarios</li>
|
||||
<li>Fixed formula span loss issues in certain scenarios</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/02/24 1.2.0 released</summary>
|
||||
<p>This version includes several fixes and improvements to enhance parsing efficiency and accuracy:</p>
|
||||
<ul>
|
||||
<li><strong>Performance Optimization</strong>
|
||||
<ul>
|
||||
<li>Increased classification speed for PDF documents in auto mode.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Parsing Optimization</strong>
|
||||
<ul>
|
||||
<li>Improved parsing logic for documents containing watermarks, significantly enhancing the parsing results for such documents.</li>
|
||||
<li>Enhanced the matching logic for multiple images/tables and captions within a single page, improving the accuracy of image-text matching in complex layouts.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Bug Fixes</strong>
|
||||
<ul>
|
||||
<li>Fixed an issue where image/table spans were incorrectly filled into text blocks under certain conditions.</li>
|
||||
<li>Resolved an issue where title blocks were empty in some cases.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/01/22 1.1.0 released</summary>
|
||||
<p>In this version we have focused on improving parsing accuracy and efficiency:</p>
|
||||
<ul>
|
||||
<li><strong>Model capability upgrade</strong> (requires re-executing the <a href="https://github.com/opendatalab/MinerU/blob/master/docs/how_to_download_models_en.md">model download process</a> to obtain incremental updates of model files)
|
||||
<ul>
|
||||
<li>The layout recognition model has been upgraded to the latest <code>doclayout_yolo(2501)</code> model, improving layout recognition accuracy.</li>
|
||||
<li>The formula parsing model has been upgraded to the latest <code>unimernet(2501)</code> model, improving formula recognition accuracy.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Performance optimization</strong>
|
||||
<ul>
|
||||
<li>On devices that meet certain configuration requirements (16GB+ VRAM), by optimizing resource usage and restructuring the processing pipeline, overall parsing speed has been increased by more than 50%.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Parsing effect optimization</strong>
|
||||
<ul>
|
||||
<li>Added a new heading classification feature (testing version, enabled by default) to the online demo (<a href="https://mineru.net/OpenSourceTools/Extractor">mineru.net</a>/<a href="https://huggingface.co/spaces/opendatalab/MinerU">huggingface</a>/<a href="https://www.modelscope.cn/studios/OpenDataLab/MinerU">modelscope</a>), which supports hierarchical classification of headings, thereby enhancing document structuring.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/01/10 1.0.1 released</summary>
|
||||
<p>This is our first official release, where we have introduced a completely new API interface and enhanced compatibility through extensive refactoring, as well as a brand new automatic language identification feature:</p>
|
||||
<ul>
|
||||
<li><strong>New API Interface</strong>
|
||||
<ul>
|
||||
<li>For the data-side API, we have introduced the Dataset class, designed to provide a robust and flexible data processing framework. This framework currently supports a variety of document formats, including images (.jpg and .png), PDFs, Word documents (.doc and .docx), and PowerPoint presentations (.ppt and .pptx). It ensures effective support for data processing tasks ranging from simple to complex.</li>
|
||||
<li>For the user-side API, we have meticulously designed the MinerU processing workflow as a series of composable Stages. Each Stage represents a specific processing step, allowing users to define new Stages according to their needs and creatively combine these stages to customize their data processing workflows.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Enhanced Compatibility</strong>
|
||||
<ul>
|
||||
<li>By optimizing the dependency environment and configuration items, we ensure stable and efficient operation on ARM architecture Linux systems.</li>
|
||||
<li>We have deeply integrated with Huawei Ascend NPU acceleration, providing autonomous and controllable high-performance computing capabilities. This supports the localization and development of AI application platforms in China. <a href="https://github.com/opendatalab/MinerU/blob/master/docs/README_Ascend_NPU_Acceleration_zh_CN.md">Ascend NPU Acceleration</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Automatic Language Identification</strong>
|
||||
<ul>
|
||||
<li>By introducing a new language recognition model, setting the <code>lang</code> configuration to <code>auto</code> during document parsing will automatically select the appropriate OCR language model, improving the accuracy of scanned document parsing.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/11/22 0.10.0 released</summary>
|
||||
<p>Introducing hybrid OCR text extraction capabilities:</p>
|
||||
<ul>
|
||||
<li>Significantly improved parsing performance in complex text distribution scenarios such as dense formulas, irregular span regions, and text represented by images.</li>
|
||||
<li>Combines the dual advantages of accurate content extraction and faster speed in text mode, and more precise span/line region recognition in OCR mode.</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/11/15 0.9.3 released</summary>
|
||||
<p>Integrated <a href="https://github.com/RapidAI/RapidTable">RapidTable</a> for table recognition, improving single-table parsing speed by more than 10 times, with higher accuracy and lower GPU memory usage.</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/11/06 0.9.2 released</summary>
|
||||
<p>Integrated the <a href="https://huggingface.co/U4R/StructTable-InternVL2-1B">StructTable-InternVL2-1B</a> model for table recognition functionality.</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/10/31 0.9.0 released</summary>
|
||||
<p>This is a major new version with extensive code refactoring, addressing numerous issues, improving performance, reducing hardware requirements, and enhancing usability:</p>
|
||||
<ul>
|
||||
<li>Refactored the sorting module code to use <a href="https://github.com/ppaanngggg/layoutreader">layoutreader</a> for reading order sorting, ensuring high accuracy in various layouts.</li>
|
||||
<li>Refactored the paragraph concatenation module to achieve good results in cross-column, cross-page, cross-figure, and cross-table scenarios.</li>
|
||||
<li>Refactored the list and table of contents recognition functions, significantly improving the accuracy of list blocks and table of contents blocks, as well as the parsing of corresponding text paragraphs.</li>
|
||||
<li>Refactored the matching logic for figures, tables, and descriptive text, greatly enhancing the accuracy of matching captions and footnotes to figures and tables, and reducing the loss rate of descriptive text to near zero.</li>
|
||||
<li>Added multi-language support for OCR, supporting detection and recognition of 84 languages. For the list of supported languages, see <a href="https://paddlepaddle.github.io/PaddleOCR/latest/en/ppocr/blog/multi_languages.html#5-support-languages-and-abbreviations">OCR Language Support List</a>.</li>
|
||||
<li>Added memory recycling logic and other memory optimization measures, significantly reducing memory usage. The memory requirement for enabling all acceleration features except table acceleration (layout/formula/OCR) has been reduced from 16GB to 8GB, and the memory requirement for enabling all acceleration features has been reduced from 24GB to 10GB.</li>
|
||||
<li>Optimized configuration file feature switches, adding an independent formula detection switch to significantly improve speed and parsing results when formula detection is not needed.</li>
|
||||
<li>Integrated <a href="https://github.com/opendatalab/PDF-Extract-Kit">PDF-Extract-Kit 1.0</a>:
|
||||
<ul>
|
||||
<li>Added the self-developed <code>doclayout_yolo</code> model, which speeds up processing by more than 10 times compared to the original solution while maintaining similar parsing effects, and can be freely switched with <code>layoutlmv3</code> via the configuration file.</li>
|
||||
<li>Upgraded formula parsing to <code>unimernet 0.2.1</code>, improving formula parsing accuracy while significantly reducing memory usage.</li>
|
||||
<li>Due to the repository change for <code>PDF-Extract-Kit 1.0</code>, you need to re-download the model. Please refer to <a href="https://github.com/opendatalab/MinerU/blob/master/docs/how_to_download_models_en.md">How to Download Models</a> for detailed steps.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/09/27 Version 0.8.1 released</summary>
|
||||
<p>Fixed some bugs, and providing a <a href="https://github.com/opendatalab/MinerU/blob/master/projects/web_demo/README.md">localized deployment version</a> of the <a href="https://opendatalab.com/OpenSourceTools/Extractor/PDF/">online demo</a> and the <a href="https://github.com/opendatalab/MinerU/blob/master/projects/web/README.md">front-end interface</a>.</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/09/09 Version 0.8.0 released</summary>
|
||||
<p>Supporting fast deployment with Dockerfile, and launching demos on Huggingface and Modelscope.</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/08/30 Version 0.7.1 released</summary>
|
||||
<p>Add paddle tablemaster table recognition option</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/08/09 Version 0.7.0b1 released</summary>
|
||||
<p>Simplified installation process, added table recognition functionality</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/08/01 Version 0.6.2b1 released</summary>
|
||||
<p>Optimized dependency conflict issues and installation documentation</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/07/05 Initial open-source release</summary>
|
||||
</details>
|
||||
</details>
|
||||
> 📝 View the complete [Changelog](https://opendatalab.github.io/MinerU/reference/changelog/) for more historical version information
|
||||
|
||||
# MinerU
|
||||
|
||||
## Project Introduction
|
||||
|
||||
MinerU is a tool that converts PDFs into machine-readable formats (e.g., markdown, JSON), allowing for easy extraction into any format.
|
||||
MinerU is a document parsing tool that converts `PDF`, image, and `DOCX` inputs into machine-readable formats such as Markdown and JSON for downstream retrieval, extraction, and processing.
|
||||
MinerU was born during the pre-training process of [InternLM](https://github.com/InternLM/InternLM). We focus on solving symbol conversion issues in scientific literature and hope to contribute to technological development in the era of large models.
|
||||
Compared to well-known commercial products, MinerU is still young. If you encounter any issues or if the results are not as expected, please submit an issue on [issue](https://github.com/opendatalab/MinerU/issues) and **attach the relevant PDF**.
|
||||
Compared to well-known commercial products, MinerU is still young. If you encounter any issues or if the results are not as expected, please submit an issue on [issue](https://github.com/opendatalab/MinerU/issues) and **attach the relevant document or sample file**.
|
||||
|
||||
https://github.com/user-attachments/assets/4bea02c9-6d54-4cd6-97ed-dff14340982c
|
||||
|
||||
## Key Features
|
||||
|
||||
- Support `PDF`, image, and `DOCX` inputs.
|
||||
- Remove headers, footers, footnotes, page numbers, etc., to ensure semantic coherence.
|
||||
- Output text in human-readable order, suitable for single-column, multi-column, and complex layouts.
|
||||
- Preserve the structure of the original document, including headings, paragraphs, lists, etc.
|
||||
@@ -569,9 +91,10 @@ https://github.com/user-attachments/assets/4bea02c9-6d54-4cd6-97ed-dff14340982c
|
||||
- Automatically recognize and convert formulas in the document to LaTeX format.
|
||||
- Automatically recognize and convert tables in the document to HTML format.
|
||||
- Automatically detect scanned PDFs and garbled PDFs and enable OCR functionality.
|
||||
- OCR supports detection and recognition of 84 languages.
|
||||
- OCR supports detection and recognition of 109 languages.
|
||||
- Supports multiple output formats, such as multimodal and NLP Markdown, JSON sorted by reading order, and rich intermediate formats.
|
||||
- Supports various visualization results, including layout visualization and span visualization, for efficient confirmation of output quality.
|
||||
- Built-in CLI, FastAPI, Gradio WebUI, for local orchestration and multi-service deployment.
|
||||
- Supports running in a pure CPU environment, and also supports GPU(CUDA)/NPU(CANN)/MPS acceleration
|
||||
- Compatible with Windows, Linux, and Mac platforms.
|
||||
|
||||
@@ -606,61 +129,97 @@ A WebUI developed based on Gradio, with a simple interface and only core parsing
|
||||
> In non-mainline environments, due to the diversity of hardware and software configurations, as well as third-party dependency compatibility issues, we cannot guarantee 100% project availability. Therefore, for users who wish to use this project in non-recommended environments, we suggest carefully reading the documentation and FAQ first. Most issues already have corresponding solutions in the FAQ. We also encourage community feedback to help us gradually expand support.
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Parsing Backend</td>
|
||||
<td>pipeline</td>
|
||||
<td>vlm-transformers</td>
|
||||
<td>vlm-vllm</td>
|
||||
<th rowspan="2">Parsing Backend</th>
|
||||
<th rowspan="2">pipeline</th>
|
||||
<th colspan="2">*-auto-engine</th>
|
||||
<th colspan="2">*-http-client</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Operating System</td>
|
||||
<td>Linux / Windows / macOS</td>
|
||||
<td>Linux / Windows</td>
|
||||
<td>Linux / Windows (via WSL2)</td>
|
||||
<th>hybrid</th>
|
||||
<th>vlm</th>
|
||||
<th>hybrid</th>
|
||||
<th>vlm</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Backend Features</th>
|
||||
<td >Good Compatibility</td>
|
||||
<td colspan="2">High Hardware Requirements</td>
|
||||
<td colspan="2">For OpenAI Compatible Servers<sup>2</sup></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Accuracy<sup>1</sup></th>
|
||||
<td style="text-align:center;">86+</td>
|
||||
<td colspan="4" style="text-align:center;">90+</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CPU Inference Support</td>
|
||||
<td>✅</td>
|
||||
<td colspan="2">❌</td>
|
||||
<th>Operating System</th>
|
||||
<td colspan="5" style="text-align:center;">Linux<sup>3</sup> / Windows<sup>4</sup> / macOS<sup>5</sup></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GPU Requirements</td>
|
||||
<td>Turing architecture and later, 6GB+ VRAM or Apple Silicon</td>
|
||||
<td colspan="2">Turing architecture and later, 8GB+ VRAM</td>
|
||||
<th>Pure CPU Support</th>
|
||||
<td style="text-align:center;">✅</td>
|
||||
<td colspan="2" style="text-align:center;">❌</td>
|
||||
<td colspan="2" style="text-align:center;">✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>GPU Acceleration</th>
|
||||
<td colspan="4" style="text-align:center;">Volta and later architecture GPUs or Apple Silicon</td>
|
||||
<td rowspan="2">Not Required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Memory Requirements</td>
|
||||
<td colspan="3">Minimum 16GB+, recommended 32GB+</td>
|
||||
<th>Min VRAM</th>
|
||||
<td style="text-align:center;">4GB</td>
|
||||
<td style="text-align:center;">8GB</td>
|
||||
<td style="text-align:center;">8GB</td>
|
||||
<td style="text-align:center;">2GB</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Disk Space Requirements</td>
|
||||
<td colspan="3">20GB+, SSD recommended</td>
|
||||
<th>RAM</th>
|
||||
<td colspan="3" style="text-align:center;">Min 16GB, Recommended 32GB or more</td>
|
||||
<td colspan="2" style="text-align:center;">Min 16GB</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Python Version</td>
|
||||
<td colspan="3">3.10-3.13</td>
|
||||
<th>Disk Space</th>
|
||||
<td colspan="3" style="text-align:center;">Min 20GB, SSD Recommended</td>
|
||||
<td colspan="2" style="text-align:center;">Min 2GB</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Python Version</th>
|
||||
<td colspan="5" style="text-align:center;">3.10-3.13</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<sup>1</sup> Accuracy metrics are the End-to-End Evaluation Overall scores from OmniDocBench (v1.5), based on the latest version of `MinerU`.
|
||||
<sup>2</sup> Servers compatible with OpenAI API, such as local model servers or remote model services deployed via inference frameworks like `vLLM`/`SGLang`/`LMDeploy`.
|
||||
<sup>3</sup> Linux only supports distributions from 2019 and later.
|
||||
<sup>4</sup> Since the key dependency `ray` does not support Python 3.13 on Windows, only versions 3.10~3.12 are supported.
|
||||
<sup>5</sup> macOS requires version 14.0 or later.
|
||||
|
||||
|
||||
### Install MinerU
|
||||
|
||||
#### Install MinerU using pip or uv
|
||||
```bash
|
||||
pip install --upgrade pip
|
||||
pip install uv
|
||||
uv pip install -U "mineru[core]"
|
||||
uv pip install -U "mineru[all]"
|
||||
```
|
||||
|
||||
#### Install MinerU from source code
|
||||
```bash
|
||||
git clone https://github.com/opendatalab/MinerU.git
|
||||
cd MinerU
|
||||
uv pip install -e .[core]
|
||||
uv pip install -e .[all]
|
||||
```
|
||||
|
||||
> [!TIP]
|
||||
> `mineru[core]` includes all core features except `vLLM` acceleration, compatible with Windows / Linux / macOS systems, suitable for most users.
|
||||
> If you need to use `vLLM` acceleration for VLM model inference or install a lightweight client on edge devices, please refer to the documentation [Extension Modules Installation Guide](https://opendatalab.github.io/MinerU/quick_start/extension_modules/).
|
||||
> `mineru[all]` includes all core features, compatible with Windows / Linux / macOS systems, suitable for most users.
|
||||
> If you need to specify the inference framework for the VLM model, or only intend to install a lightweight client on an edge device, please refer to the documentation [Extension Modules Installation Guide](https://opendatalab.github.io/MinerU/quick_start/extension_modules/).
|
||||
|
||||
---
|
||||
|
||||
@@ -672,12 +231,17 @@ You can get the [Docker Deployment Instructions](https://opendatalab.github.io/M
|
||||
|
||||
### Using MinerU
|
||||
|
||||
The simplest command line invocation is:
|
||||
|
||||
If your device meets the GPU acceleration requirements in the table above, you can use a simple command line for document parsing:
|
||||
```bash
|
||||
mineru -p <input_path> -o <output_path>
|
||||
```
|
||||
If your device does not meet the GPU acceleration requirements, you can specify the backend as `pipeline` to run in a pure CPU environment:
|
||||
```bash
|
||||
mineru -p <input_path> -o <output_path> -b pipeline
|
||||
```
|
||||
|
||||
You can use MinerU for PDF parsing through various methods such as command line, API, and WebUI. For detailed instructions, please refer to the [Usage Guide](https://opendatalab.github.io/MinerU/usage/).
|
||||
`mineru` currently supports local `PDF`, image, and `DOCX` file or directory inputs, and can be used for document parsing through the CLI, API, WebUI, and `mineru-router`. For detailed instructions, please refer to the [Usage Guide](https://opendatalab.github.io/MinerU/usage/).
|
||||
|
||||
# TODO
|
||||
|
||||
@@ -719,37 +283,45 @@ You can use MinerU for PDF parsing through various methods such as command line,
|
||||
|
||||
[LICENSE.md](LICENSE.md)
|
||||
|
||||
Currently, some models in this project are trained based on YOLO. However, since YOLO follows the AGPL license, it may impose restrictions on certain use cases. In future iterations, we plan to explore and replace these with models under more permissive licenses to enhance user-friendliness and flexibility.
|
||||
The source code in this repository is licensed under AGPLv3.
|
||||
|
||||
# Acknowledgments
|
||||
|
||||
- [PDF-Extract-Kit](https://github.com/opendatalab/PDF-Extract-Kit)
|
||||
- [DocLayout-YOLO](https://github.com/opendatalab/DocLayout-YOLO)
|
||||
- [UniMERNet](https://github.com/opendatalab/UniMERNet)
|
||||
- [RapidTable](https://github.com/RapidAI/RapidTable)
|
||||
- [TableStructureRec](https://github.com/RapidAI/TableStructureRec)
|
||||
- [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)
|
||||
- [PaddleOCR2Pytorch](https://github.com/frotms/PaddleOCR2Pytorch)
|
||||
- [layoutreader](https://github.com/ppaanngggg/layoutreader)
|
||||
- [xy-cut](https://github.com/Sanster/xy-cut)
|
||||
- [fast-langdetect](https://github.com/LlmKira/fast-langdetect)
|
||||
- [pypdfium2](https://github.com/pypdfium2-team/pypdfium2)
|
||||
- [pdftext](https://github.com/datalab-to/pdftext)
|
||||
- [pdfminer.six](https://github.com/pdfminer/pdfminer.six)
|
||||
- [pypdf](https://github.com/py-pdf/pypdf)
|
||||
- [magika](https://github.com/google/magika)
|
||||
- [vLLM](https://github.com/vllm-project/vllm)
|
||||
- [LMDeploy](https://github.com/InternLM/lmdeploy)
|
||||
|
||||
# Citation
|
||||
|
||||
```bibtex
|
||||
@misc{wang2024mineruopensourcesolutionprecise,
|
||||
title={MinerU: An Open-Source Solution for Precise Document Content Extraction},
|
||||
author={Bin Wang and Chao Xu and Xiaomeng Zhao and Linke Ouyang and Fan Wu and Zhiyuan Zhao and Rui Xu and Kaiwen Liu and Yuan Qu and Fukai Shang and Bo Zhang and Liqun Wei and Zhihao Sui and Wei Li and Botian Shi and Yu Qiao and Dahua Lin and Conghui He},
|
||||
year={2024},
|
||||
eprint={2409.18839},
|
||||
archivePrefix={arXiv},
|
||||
primaryClass={cs.CV},
|
||||
url={https://arxiv.org/abs/2409.18839},
|
||||
@article{dong2026minerudiffusion,
|
||||
title={MinerU-Diffusion: Rethinking Document OCR as Inverse Rendering via Diffusion Decoding},
|
||||
author={Dong, Hejun and Niu, Junbo and Wang, Bin and Zeng, Weijun and Zhang, Wentao and He, Conghui},
|
||||
journal={arXiv preprint arXiv:2603.22458},
|
||||
year={2026}
|
||||
}
|
||||
|
||||
@article{niu2025mineru2,
|
||||
title={Mineru2. 5: A decoupled vision-language model for efficient high-resolution document parsing},
|
||||
author={Niu, Junbo and Liu, Zheng and Gu, Zhuangcheng and Wang, Bin and Ouyang, Linke and Zhao, Zhiyuan and Chu, Tao and He, Tianyao and Wu, Fan and Zhang, Qintong and others},
|
||||
journal={arXiv preprint arXiv:2509.22186},
|
||||
year={2025}
|
||||
}
|
||||
|
||||
@article{wang2024mineru,
|
||||
title={Mineru: An open-source solution for precise document content extraction},
|
||||
author={Wang, Bin and Xu, Chao and Zhao, Xiaomeng and Ouyang, Linke and Wu, Fan and Zhao, Zhiyuan and Xu, Rui and Liu, Kaiwen and Qu, Yuan and Shang, Fukai and others},
|
||||
journal={arXiv preprint arXiv:2409.18839},
|
||||
year={2024}
|
||||
}
|
||||
|
||||
@article{he2024opendatalab,
|
||||
@@ -772,6 +344,7 @@ Currently, some models in this project are trained based on YOLO. However, since
|
||||
|
||||
|
||||
# Links
|
||||
- [MinerU-Diffusion: Rethinking Document OCR as Inverse Rendering via Diffusion Decoding](https://github.com/opendatalab/MinerU-Diffusion)
|
||||
- [Easy Data Preparation with latest LLMs-based Operators and Pipelines](https://github.com/OpenDCAI/DataFlow)
|
||||
- [Vis3 (OSS browser based on s3)](https://github.com/opendatalab/Vis3)
|
||||
- [LabelU (A Lightweight Multi-modal Data Annotation Tool)](https://github.com/opendatalab/labelU)
|
||||
@@ -780,4 +353,4 @@ Currently, some models in this project are trained based on YOLO. However, since
|
||||
- [OmniDocBench (A Comprehensive Benchmark for Document Parsing and Evaluation)](https://github.com/opendatalab/OmniDocBench)
|
||||
- [Magic-HTML (Mixed web page extraction tool)](https://github.com/opendatalab/magic-html)
|
||||
- [Magic-Doc (Fast speed ppt/pptx/doc/docx/pdf extraction tool)](https://github.com/InternLM/magic-doc)
|
||||
- [Dingo: A Comprehensive AI Data Quality Evaluation Tool](https://github.com/MigoXLab/dingo)
|
||||
- [Dingo: A Comprehensive AI Data Quality Evaluation Tool](https://github.com/MigoXLab/dingo)
|
||||
|
||||
658
README_zh-CN.md
@@ -1,7 +1,7 @@
|
||||
<div align="center" xmlns="http://www.w3.org/1999/html">
|
||||
<!-- logo -->
|
||||
<p align="center">
|
||||
<img src="docs/images/MinerU-logo.png" width="300px" style="vertical-align:middle;">
|
||||
<img src="https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docs/images/MinerU-logo.png" width="300px" style="vertical-align:middle;">
|
||||
</p>
|
||||
|
||||
<!-- icon -->
|
||||
@@ -18,7 +18,8 @@
|
||||
[](https://www.modelscope.cn/studios/OpenDataLab/MinerU)
|
||||
[](https://huggingface.co/spaces/opendatalab/MinerU)
|
||||
[](https://colab.research.google.com/gist/myhloli/a3cb16570ab3cfeadf9d8f0ac91b4fca/mineru_demo.ipynb)
|
||||
[](https://arxiv.org/abs/2409.18839)
|
||||
[](https://arxiv.org/abs/2409.18839)
|
||||
[](https://arxiv.org/abs/2509.22186)
|
||||
[](https://deepwiki.com/opendatalab/MinerU)
|
||||
|
||||
|
||||
@@ -44,511 +45,45 @@
|
||||
|
||||
# 更新记录
|
||||
|
||||
- 2025/09/26 2.5.4 发布
|
||||
- 修复部分`pdf`文件被识别成`ai`文件导致无法解析的问题
|
||||
- 2026/03/29 3.0.0 发布
|
||||
|
||||
- 2025/09/20 2.5.3 发布
|
||||
- 依赖版本范围调整,使得Turing及更早架构显卡可以使用vLLM加速推理MinerU2.5模型。
|
||||
- `pipeline`后端对torch 2.8.0的一些兼容性修复。
|
||||
- 降低vLLM异步后端默认的并发数,降低服务端压力以避免高压导致的链接关闭问题。
|
||||
- 更多兼容性相关内容详见[公告](https://github.com/opendatalab/MinerU/discussions/3547)
|
||||
本次版本更新围绕**解析能力、系统架构与工程可用性**进行了系统升级。主要更新内容包括:
|
||||
|
||||
- `DOCX` 原生解析
|
||||
- 正式支持 `DOCX` 原生解析,在无幻觉前提下实现高精度解析。
|
||||
- 相较于“先将 `DOCX` 转为 `PDF` 再解析”的传统流程,端到端速度提升数十倍以上,更适合对精度与吞吐均有要求的场景。
|
||||
- `pipeline` 后端升级
|
||||
- `pipeline` 后端在 OmniDocBench (v1.5) 上取得 `86.2` 分,精度超过上一代主流 VLM `MinerU2.0-2505-0.9B`。
|
||||
- 新增表格内图片/公式解析、印章文字识别、竖排文本支持、行间公式序号识别等能力,持续提升复杂文档场景下的解析效果。
|
||||
- 在保持高精度的同时,资源占用极低,并继续支持纯 CPU 环境推理。
|
||||
- `API / CLI / Router` 编排升级
|
||||
- `mineru` 现作为基于 `mineru-api` 的编排客户端运行;在未传入 `--api-url` 时,会自动拉起本地临时服务。
|
||||
- `mineru-api` 新增异步任务接口 `POST /tasks`,支持任务提交、状态查询与结果获取;同时保留同步解析接口 `POST /file_parse`,以兼容老版本插件。
|
||||
- 新增 `mineru-router`,适用于多服务、多 GPU 的统一入口部署与任务路由;其接口与 `mineru-api` 完全兼容,并支持任务自动负载均衡。
|
||||
- 部署与使用体验优化
|
||||
- 解决了 `torch >= 2.8` 的兼容问题,基础镜像升级为 `vllm0.11.2 + torch2.9.0`,统一了不同 Compute Capability 的安装路径。
|
||||
- 通过滑动窗口优化解析链路,显著降低长文档场景下的内存峰值占用,上万页文档解析不再需要手动拆分。
|
||||
- `pipeline` 的 batch 推理支持流式落盘,已完成的解析结果可及时写出,进一步提升长任务处理体验。
|
||||
- 完成线程安全优化,全面支持多线程并发推理;配合 `mineru-router`,可一键实现多卡部署,轻松构建高并发、高吞吐解析系统。
|
||||
- 完全移除了两个 AGPLv3 模型(`doclayoutyolo` 和 `mfd_yolov8`)以及一个 CC-BY-NC-SA 4.0 模型(`layoutreader`)的使用。
|
||||
|
||||
本次更新不仅是若干功能点的补强,更是 MinerU 在系统能力上的一次关键跃迁。我们重点解决了长文档解析过程中的内存峰值占用问题,通过滑动窗口、流式落盘等链路优化,让超长文档解析从“需要手动拆分、谨慎处理”走向“稳定可跑、规模可扩展”。同时,我们完成了线程安全优化,全面支持多线程并发推理,进一步提升了单机资源利用率与高并发场景下的运行稳定性。在此基础上,基于 mineru-router 与全新的 API / CLI 编排体系,MinerU 已具备一键多卡部署、多服务统一接入、任务自动负载均衡的能力,显著降低了大规模部署难度。至此,MinerU 正在从单一的数据生产工具,进一步演进为面向高并发、高吞吐场景的大规模文档解析基座,为企业级文档数据处理提供更稳定、更高效、更易扩展的基础设施能力。
|
||||
|
||||
- 2025/09/19 2.5.2 发布
|
||||
我们正式发布 MinerU2.5,当前最强文档解析多模态大模型。仅凭 1.2B 参数,MinerU2.5 在 OmniDocBench 文档解析评测中,精度已全面超越 Gemini2.5-Pro、GPT-4o、Qwen2.5-VL-72B等顶级多模态大模型,并显著领先于主流文档解析专用模型(如 dots.ocr, MonkeyOCR, PP-StructureV3 等)。
|
||||
模型已发布至[HuggingFace](https://huggingface.co/opendatalab/MinerU2.5-2509-1.2B)和[ModelScope](https://modelscope.cn/models/opendatalab/MinerU2.5-2509-1.2B)平台,欢迎大家下载使用!
|
||||
- 核心亮点
|
||||
- 极致能效,性能SOTA: 以 1.2B 的轻量化规模,实现了超越百亿乃至千亿级模型的SOTA性能,重新定义了文档解析的能效比。
|
||||
- 先进架构,全面领先: 通过 “两阶段推理” (解耦布局分析与内容识别) 与 原生高分辨率架构 的结合,在布局分析、文本识别、公式识别、表格识别及阅读顺序五大方面均达到 SOTA 水平。
|
||||
- 关键能力提升
|
||||
- 布局检测: 结果更完整,精准覆盖页眉、页脚、页码等非正文内容;同时提供更精准的元素定位与更自然的格式还原(如列表、参考文献)。
|
||||
- 表格解析: 大幅优化了对旋转表格、无线/少线表、以及长难表格的解析能力。
|
||||
- 公式识别: 显著提升中英混合公式及复杂长公式的识别准确率,大幅改善数学类文档解析能力。
|
||||
|
||||
此外,伴随vlm 2.5的发布,我们对仓库做出一些调整:
|
||||
- vlm后端升级至2.5版本,支持MinerU2.5模型,不再兼容MinerU2.0-2505-0.9B模型,最后一个支持2.0模型的版本为mineru-2.2.2。
|
||||
- vlm推理相关代码已移至[mineru_vl_utils](https://github.com/opendatalab/mineru-vl-utils),降低与mineru主仓库的耦合度,便于后续独立迭代。
|
||||
- vlm加速推理框架从`sglang`切换至`vllm`,并实现对vllm生态的完全兼容,使得用户可以在任何支持vllm框架的平台上使用MinerU2.5模型并加速推理。
|
||||
- 由于vlm模型的重大升级,支持更多layout type,因此我们对解析的中间文件`middle.json`和结果文件`content_list.json`的结构做出一些调整,请参考[文档](https://opendatalab.github.io/MinerU/zh/reference/output_files/)了解详情。
|
||||
|
||||
其他仓库优化:
|
||||
- 移除对输入文件的后缀名白名单校验,当输入文件为PDF文档或图片时,对文件的后缀名不再有要求,提升易用性。
|
||||
|
||||
<details>
|
||||
<summary>历史日志</summary>
|
||||
|
||||
<details>
|
||||
<summary>2025/09/10 2.2.2 发布</summary>
|
||||
<ul>
|
||||
<li>修复新的表格识别模型在部分表格解析失败时影响整体解析任务的问题</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/09/08 2.2.1 发布</summary>
|
||||
<ul>
|
||||
<li>修复使用模型下载命令时,部分新增模型未下载的问题</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/09/05 2.2.0 发布</summary>
|
||||
<ul>
|
||||
<li>
|
||||
主要更新
|
||||
<ul>
|
||||
<li>在这个版本我们重点提升了表格的解析精度,通过引入新的<a href="https://github.com/RapidAI/TableStructureRec">有线表识别模型</a>和全新的混合表格结构解析算法,显著提升了<code>pipeline</code>后端的表格识别能力。</li>
|
||||
<li>另外我们增加了对跨页表格合并的支持,这一功能同时支持<code>pipeline</code>和<code>vlm</code>后端,进一步提升了表格解析的完整性和准确性。</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
其他更新
|
||||
<ul>
|
||||
<li><code>pipeline</code>后端增加270度旋转的表格解析能力,现已支持0/90/270度三个方向的表格解析</li>
|
||||
<li><code>pipeline</code>增加对泰文、希腊文的ocr能力支持,并更新了英文ocr模型至最新,英文识别精度提升11%,泰文识别模型精度 82.68%,希腊文识别模型精度 89.28%(by PPOCRv5)</li>
|
||||
<li>在输出的<code>content_list.json</code>中增加了<code>bbox</code>字段(映射至0-1000范围内),方便用户直接获取每个内容块的位置信息</li>
|
||||
<li>移除<code>pipeline_old_linux</code>安装可选项,不再支持老版本的Linux系统如<code>Centos 7</code>等,以便对<code>uv</code>的<code>sync</code>/<code>run</code>等命令进行更好的支持</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/08/01 2.1.10 发布</summary>
|
||||
<ul>
|
||||
<li>修复<code>pipeline</code>后端因block覆盖导致的解析结果与预期不符 #3232</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/07/30 2.1.9 发布</summary>
|
||||
<ul>
|
||||
<li><code>transformers</code> 4.54.1 版本适配</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/07/28 2.1.8 发布</summary>
|
||||
<ul>
|
||||
<li><code>sglang</code> 0.4.9.post5 版本适配</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/07/27 2.1.7 发布</summary>
|
||||
<ul>
|
||||
<li><code>transformers</code> 4.54.0 版本适配</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/07/26 2.1.6 发布</summary>
|
||||
<ul>
|
||||
<li>修复<code>vlm</code>后端解析部分手写文档时的表格异常问题</li>
|
||||
<li>修复文档旋转时可视化框位置漂移问题 #3175</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/07/24 2.1.5 发布</summary>
|
||||
<ul>
|
||||
<li><code>sglang</code> 0.4.9 版本适配,同步升级dockerfile基础镜像为sglang 0.4.9.post3</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/07/23 2.1.4 发布</summary>
|
||||
<ul>
|
||||
<li><strong>bug修复</strong>
|
||||
<ul>
|
||||
<li>修复<code>pipeline</code>后端中<code>MFR</code>步骤在某些情况下显存消耗过大的问题 #2771</li>
|
||||
<li>修复某些情况下<code>image</code>/<code>table</code>与<code>caption</code>/<code>footnote</code>匹配不准确的问题 #3129</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/07/16 2.1.1 发布</summary>
|
||||
<ul>
|
||||
<li><strong>bug修复</strong>
|
||||
<ul>
|
||||
<li>修复<code>pipeline</code>在某些情况可能发生的文本块内容丢失问题 #3005</li>
|
||||
<li>修复<code>sglang-client</code>需要安装<code>torch</code>等不必要的包的问题 #2968</li>
|
||||
<li>更新<code>dockerfile</code>以修复linux字体缺失导致的解析文本内容不完整问题 #2915</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>易用性更新</strong>
|
||||
<ul>
|
||||
<li>更新<code>compose.yaml</code>,便于用户直接启动<code>sglang-server</code>、<code>mineru-api</code>、<code>mineru-gradio</code>服务</li>
|
||||
<li>启用全新的<a href="https://opendatalab.github.io/MinerU/zh/">在线文档站点</a>,简化readme,提供更好的文档体验</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/07/05 2.1.0 发布</summary>
|
||||
<p>这是 MinerU 2 的第一个大版本更新,包含了大量新功能和改进,包含众多性能优化、体验优化和bug修复,具体更新内容如下:</p>
|
||||
<ul>
|
||||
<li><strong>性能优化:</strong>
|
||||
<ul>
|
||||
<li>大幅提升某些特定分辨率(长边2000像素左右)文档的预处理速度</li>
|
||||
<li>大幅提升<code>pipeline</code>后端批量处理大量页数较少(<10)文档时的后处理速度</li>
|
||||
<li><code>pipeline</code>后端的layout分析速度提升约20%</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>体验优化:</strong>
|
||||
<ul>
|
||||
<li>内置开箱即用的<code>fastapi服务</code>和<code>gradio webui</code>,详细使用方法请参考<a href="https://opendatalab.github.io/MinerU/zh/usage/quick_usage/#apiwebuisglang-clientserver">文档</a></li>
|
||||
<li><code>sglang</code>适配<code>0.4.8</code>版本,大幅降低<code>vlm-sglang</code>后端的显存要求,最低可在<code>8G显存</code>(Turing及以后架构)的显卡上运行</li>
|
||||
<li>对所有命令增加<code>sglang</code>的参数透传,使得<code>sglang-engine</code>后端可以与<code>sglang-server</code>一致,接收<code>sglang</code>的所有参数</li>
|
||||
<li>支持基于配置文件的功能扩展,包含<code>自定义公式标识符</code>、<code>开启标题分级功能</code>、<code>自定义本地模型目录</code>,详细使用方法请参考<a href="https://opendatalab.github.io/MinerU/zh/usage/quick_usage/#mineru_1">文档</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>新特性:</strong>
|
||||
<ul>
|
||||
<li><code>pipeline</code>后端更新 PP-OCRv5 多语种文本识别模型,支持法语、西班牙语、葡萄牙语、俄语、韩语等 37 种语言的文字识别,平均精度涨幅超30%。<a href="https://paddlepaddle.github.io/PaddleOCR/latest/version3.x/algorithm/PP-OCRv5/PP-OCRv5_multi_languages.html">详情</a></li>
|
||||
<li><code>pipeline</code>后端增加对竖排文本的有限支持</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/06/20 2.0.6发布</summary>
|
||||
<ul>
|
||||
<li>修复<code>vlm</code>模式下,某些偶发的无效块内容导致解析中断问题</li>
|
||||
<li>修复<code>vlm</code>模式下,某些不完整的表结构导致的解析中断问题</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/06/17 2.0.5发布</summary>
|
||||
<ul>
|
||||
<li>修复了<code>sglang-client</code>模式下依然需要下载模型的问题</li>
|
||||
<li>修复了<code>sglang-client</code>模式需要依赖<code>torch</code>等实际运行不需要的包的问题</li>
|
||||
<li>修复了同一进程内尝试通过多个url启动多个<code>sglang-client</code>实例时,只有第一个生效的问题</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/06/15 2.0.3发布</summary>
|
||||
<ul>
|
||||
<li>修复了当下载模型类型设置为<code>all</code>时,配置文件出现键值更新错误的问题</li>
|
||||
<li>修复了命令行模式下公式和表格功能开关不生效导致功能无法关闭的问题</li>
|
||||
<li>修复了<code>sglang-engine</code>模式下,0.4.7版本sglang的兼容性问题</li>
|
||||
<li>更新了sglang环境下部署完整版MinerU的Dockerfile和相关安装文档</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/06/13 2.0.0发布</summary>
|
||||
<ul>
|
||||
<li><strong>全新架构</strong>:MinerU 2.0 在代码结构和交互方式上进行了深度重构,显著提升了系统的易用性、可维护性与扩展能力。
|
||||
<ul>
|
||||
<li><strong>去除第三方依赖限制</strong>:彻底移除对 <code>pymupdf</code> 的依赖,推动项目向更开放、合规的开源方向迈进。</li>
|
||||
<li><strong>开箱即用,配置便捷</strong>:无需手动编辑 JSON 配置文件,绝大多数参数已支持命令行或 API 直接设置。</li>
|
||||
<li><strong>模型自动管理</strong>:新增模型自动下载与更新机制,用户无需手动干预即可完成模型部署。</li>
|
||||
<li><strong>离线部署友好</strong>:提供内置模型下载命令,支持完全断网环境下的部署需求。</li>
|
||||
<li><strong>代码结构精简</strong>:移除数千行冗余代码,简化类继承逻辑,显著提升代码可读性与开发效率。</li>
|
||||
<li><strong>统一中间格式输出</strong>:采用标准化的 <code>middle_json</code> 格式,兼容多数基于该格式的二次开发场景,确保生态业务无缝迁移。</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>全新模型</strong>:MinerU 2.0 集成了我们最新研发的小参数量、高性能多模态文档解析模型,实现端到端的高速、高精度文档理解。
|
||||
<ul>
|
||||
<li><strong>小模型,大能力</strong>:模型参数不足 1B,却在解析精度上超越传统 72B 级别的视觉语言模型(VLM)。</li>
|
||||
<li><strong>多功能合一</strong>:单模型覆盖多语言识别、手写识别、版面分析、表格解析、公式识别、阅读顺序排序等核心任务。</li>
|
||||
<li><strong>极致推理速度</strong>:在单卡 NVIDIA 4090 上通过 <code>sglang</code> 加速,达到峰值吞吐量超过 10,000 token/s,轻松应对大规模文档处理需求。</li>
|
||||
<li><strong>在线体验</strong>:您可以在<a href="https://mineru.net/OpenSourceTools/Extractor">MinerU.net</a>、<a href="https://huggingface.co/spaces/opendatalab/MinerU">Hugging Face</a>, 以及<a href="https://www.modelscope.cn/studios/OpenDataLab/MinerU">ModelScope</a>体验我们的全新VLM模型</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>不兼容变更说明</strong>:为提升整体架构合理性与长期可维护性,本版本包含部分不兼容的变更:
|
||||
<ul>
|
||||
<li>Python 包名从 <code>magic-pdf</code> 更改为 <code>mineru</code>,命令行工具也由 <code>magic-pdf</code> 改为 <code>mineru</code>,请同步更新脚本与调用命令。</li>
|
||||
<li>出于对系统模块化设计与生态一致性的考虑,MinerU 2.0 已不再内置 LibreOffice 文档转换模块。如需处理 Office 文档,建议通过独立部署的 LibreOffice 服务先行转换为 PDF 格式,再进行后续解析操作。</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
<details>
|
||||
<summary>2025/05/24 1.3.12 发布</summary>
|
||||
<ul>
|
||||
<li>增加ppocrv5模型的支持,将<code>ch_server</code>模型更新为<code>PP-OCRv5_rec_server</code>,<code>ch_lite</code>模型更新为<code>PP-OCRv5_rec_mobile</code>(需更新模型)
|
||||
<ul>
|
||||
<li>在测试中,发现ppocrv5(server)对手写文档效果有一定提升,但在其余类别文档的精度略差于v4_server_doc,因此默认的ch模型保持不变,仍为<code>PP-OCRv4_server_rec_doc</code>。</li>
|
||||
<li>由于ppocrv5强化了手写场景和特殊字符的识别能力,因此您可以在日繁混合场景以及手写文档场景下手动选择使用ppocrv5模型</li>
|
||||
<li>您可通过lang参数<code>lang='ch_server'</code>(python api)或<code>--lang ch_server</code>(命令行)自行选择相应的模型:
|
||||
<ul>
|
||||
<li><code>ch</code> :<code>PP-OCRv4_rec_server_doc</code>(默认)(中英日繁混合/1.5w字典)</li>
|
||||
<li><code>ch_server</code> :<code>PP-OCRv5_rec_server</code>(中英日繁混合+手写场景/1.8w字典)</li>
|
||||
<li><code>ch_lite</code> :<code>PP-OCRv5_rec_mobile</code>(中英日繁混合+手写场景/1.8w字典)</li>
|
||||
<li><code>ch_server_v4</code> :<code>PP-OCRv4_rec_server</code>(中英混合/6k字典)</li>
|
||||
<li><code>ch_lite_v4</code> :<code>PP-OCRv4_rec_mobile</code>(中英混合/6k字典)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>增加手写文档的支持,通过优化layout对手写文本区域的识别,现已支持手写文档的解析
|
||||
<ul>
|
||||
<li>默认支持此功能,无需额外配置</li>
|
||||
<li>可以参考上述说明,手动选择ppocrv5模型以获得更好的手写文档解析效果</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><code>huggingface</code>和<code>modelscope</code>的demo已更新为支持手写识别和ppocrv5模型的版本,可自行在线体验</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/04/29 1.3.10 发布</summary>
|
||||
<ul>
|
||||
<li>支持使用自定义公式标识符,可通过修改用户目录下的<code>magic-pdf.json</code>文件中的<code>latex-delimiter-config</code>项实现。</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/04/27 1.3.9 发布</summary>
|
||||
<ul>
|
||||
<li>优化公式解析功能,提升公式渲染的成功率</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/04/23 1.3.8 发布</summary>
|
||||
<ul>
|
||||
<li><code>ocr</code>默认模型(<code>ch</code>)更新为<code>PP-OCRv4_server_rec_doc</code>(需更新模型)
|
||||
<ul>
|
||||
<li><code>PP-OCRv4_server_rec_doc</code>是在<code>PP-OCRv4_server_rec</code>的基础上,在更多中文文档数据和PP-OCR训练数据的混合数据训练而成,增加了部分繁体字、日文、特殊字符的识别能力,可支持识别的字符为1.5万+,除文档相关的文字识别能力提升外,也同时提升了通用文字的识别能力。</li>
|
||||
<li><a href="https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/text_recognition.html#_3">PP-OCRv4_server_rec_doc/PP-OCRv4_server_rec/PP-OCRv4_mobile_rec 性能对比</a></li>
|
||||
<li>经验证,<code>PP-OCRv4_server_rec_doc</code>模型在<code>中英日繁</code>单种语言或多种语言混合场景均有明显精度提升,且速度与<code>PP-OCRv4_server_rec</code>相当,适合绝大部分场景使用。</li>
|
||||
<li><code>PP-OCRv4_server_rec_doc</code>在小部分纯英文场景可能会发生单词粘连问题,<code>PP-OCRv4_server_rec</code>则在此场景下表现更好,因此我们保留了<code>PP-OCRv4_server_rec</code>模型,用户可通过增加参数<code>lang='ch_server'</code>(python api)或<code>--lang ch_server</code>(命令行)调用。</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/04/22 1.3.7 发布</summary>
|
||||
<ul>
|
||||
<li>修复表格解析模型初始化时lang参数失效的问题</li>
|
||||
<li>修复在<code>cpu</code>模式下ocr和表格解析速度大幅下降的问题</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/04/16 1.3.4 发布</summary>
|
||||
<ul>
|
||||
<li>通过移除一些无用的块,小幅提升了ocr-det的速度</li>
|
||||
<li>修复部分情况下由footnote导致的页面内排序错误</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/04/12 1.3.2 发布</summary>
|
||||
<ul>
|
||||
<li>修复了windows系统下,在python3.13环境安装时一些依赖包版本不兼容的问题</li>
|
||||
<li>优化批量推理时的内存占用</li>
|
||||
<li>优化旋转90度表格的解析效果</li>
|
||||
<li>优化财报样本中超大表格的解析效果</li>
|
||||
<li>修复了在未指定OCR语言时,英文文本区域偶尔出现的单词黏连问题(需要更新模型)</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/04/08 1.3.1 发布</summary>
|
||||
<ul>
|
||||
<li>修复了一些兼容问题
|
||||
<ul>
|
||||
<li>支持python 3.13</li>
|
||||
<li>为部分过时的linux系统(如centos7)做出最后适配,并不再保证后续版本的继续支持,<a href="https://github.com/opendatalab/MinerU/issues/1004">安装说明</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/04/03 1.3.0 发布</summary>
|
||||
<ul>
|
||||
<li>安装与兼容性优化
|
||||
<ul>
|
||||
<li>通过移除layout中<code>layoutlmv3</code>的使用,解决了由<code>detectron2</code>导致的兼容问题</li>
|
||||
<li>torch版本兼容扩展到2.2~2.6(2.5除外)</li>
|
||||
<li>cuda兼容支持11.8/12.4/12.6/12.8(cuda版本由torch决定),解决部分用户50系显卡与H系显卡的兼容问题</li>
|
||||
<li>python兼容版本扩展到3.10~3.12,解决了在非3.10环境下安装时自动降级到0.6.1的问题</li>
|
||||
<li>优化离线部署流程,部署成功后不需要联网下载任何模型文件</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>性能优化
|
||||
<ul>
|
||||
<li>通过支持多个pdf文件的batch处理(<a href="demo/batch_demo.py">脚本样例</a>),提升了批量小文件的解析速度 (与1.0.1版本相比,公式解析速度最高提升超过1400%,整体解析速度最高提升超过500%)</li>
|
||||
<li>通过优化mfr模型的加载和使用,降低了显存占用并提升了解析速度(需重新执行<a href="docs/how_to_download_models_zh_cn.md">模型下载流程</a>以获得模型文件的增量更新)</li>
|
||||
<li>优化显存占用,最低仅需6GB即可运行本项目</li>
|
||||
<li>优化了在mps设备上的运行速度</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>解析效果优化
|
||||
<ul>
|
||||
<li>mfr模型更新到<code>unimernet(2503)</code>,解决多行公式中换行丢失的问题</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>易用性优化
|
||||
<ul>
|
||||
<li>通过使用<code>paddleocr2torch</code>,完全替代<code>paddle</code>框架以及<code>paddleocr</code>在项目中的使用,解决了<code>paddle</code>和<code>torch</code>的冲突问题,和由于<code>paddle</code>框架导致的线程不安全问题</li>
|
||||
<li>解析过程增加实时进度条显示,精准把握解析进度,让等待不再痛苦</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/03/03 1.2.1 发布,修复了一些问题</summary>
|
||||
<ul>
|
||||
<li>修复在字母与数字的全角转半角操作时对标点符号的影响</li>
|
||||
<li>修复在某些情况下caption的匹配不准确问题</li>
|
||||
<li>修复在某些情况下的公式span丢失问题</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/02/24 1.2.0 发布,这个版本我们修复了一些问题,提升了解析的效率与精度:</summary>
|
||||
<ul>
|
||||
<li>性能优化
|
||||
<ul>
|
||||
<li>auto模式下pdf文档的分类速度提升</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>解析优化
|
||||
<ul>
|
||||
<li>优化对包含水印文档的解析逻辑,显著提升包含水印文档的解析效果</li>
|
||||
<li>改进了单页内多个图像/表格与caption的匹配逻辑,提升了复杂布局下图文匹配的准确性</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>问题修复
|
||||
<ul>
|
||||
<li>修复在某些情况下图片/表格span被填充进textblock导致的异常</li>
|
||||
<li>修复在某些情况下标题block为空的问题</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/01/22 1.1.0 发布,在这个版本我们重点提升了解析的精度与效率:</summary>
|
||||
<ul>
|
||||
<li>模型能力升级(需重新执行 <a href="https://github.com/opendatalab/MinerU/docs/how_to_download_models_zh_cn.md">模型下载流程</a> 以获得模型文件的增量更新)
|
||||
<ul>
|
||||
<li>布局识别模型升级到最新的 `doclayout_yolo(2501)` 模型,提升了layout识别精度</li>
|
||||
<li>公式解析模型升级到最新的 `unimernet(2501)` 模型,提升了公式识别精度</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>性能优化
|
||||
<ul>
|
||||
<li>在配置满足一定条件(显存16GB+)的设备上,通过优化资源占用和重构处理流水线,整体解析速度提升50%以上</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>解析效果优化
|
||||
<ul>
|
||||
<li>在线demo(<a href="https://mineru.net/OpenSourceTools/Extractor">mineru.net</a> / <a href="https://huggingface.co/spaces/opendatalab/MinerU">huggingface</a> / <a href="https://www.modelscope.cn/studios/OpenDataLab/MinerU">modelscope</a>)上新增标题分级功能(测试版本,默认开启),支持对标题进行分级,提升文档结构化程度</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2025/01/10 1.0.1 发布,这是我们的第一个正式版本,在这个版本中,我们通过大量重构带来了全新的API接口和更广泛的兼容性,以及全新的自动语言识别功能:</summary>
|
||||
<ul>
|
||||
<li>全新API接口
|
||||
<ul>
|
||||
<li>对于数据侧API,我们引入了Dataset类,旨在提供一个强大而灵活的数据处理框架。该框架当前支持包括图像(.jpg及.png)、PDF、Word(.doc及.docx)、以及PowerPoint(.ppt及.pptx)在内的多种文档格式,确保了从简单到复杂的数据处理任务都能得到有效的支持。</li>
|
||||
<li>针对用户侧API,我们将MinerU的处理流程精心设计为一系列可组合的Stage阶段。每个Stage代表了一个特定的处理步骤,用户可以根据自身需求自由地定义新的Stage,并通过创造性地组合这些阶段来定制专属的数据处理流程。</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>更广泛的兼容性适配
|
||||
<ul>
|
||||
<li>通过优化依赖环境和配置项,确保在ARM架构的Linux系统上能够稳定高效运行。</li>
|
||||
<li>深度适配华为昇腾NPU加速,积极响应信创要求,提供自主可控的高性能计算能力,助力人工智能应用平台的国产化应用与发展。 <a href="https://github.com/opendatalab/MinerU/docs/README_Ascend_NPU_Acceleration_zh_CN.md">NPU加速教程</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>自动语言识别
|
||||
<ul>
|
||||
<li>通过引入全新的语言识别模型, 在文档解析中将 `lang` 配置为 `auto`,即可自动选择合适的OCR语言模型,提升扫描类文档解析的准确性。</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/11/22 0.10.0发布,通过引入混合OCR文本提取能力,</summary>
|
||||
<ul>
|
||||
<li>在公式密集、span区域不规范、部分文本使用图像表现等复杂文本分布场景下获得解析效果的显著提升</li>
|
||||
<li>同时具备文本模式内容提取准确、速度更快与OCR模式span/line区域识别更准的双重优势</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/11/15 0.9.3发布,为表格识别功能接入了<a href="https://github.com/RapidAI/RapidTable">RapidTable</a>,单表解析速度提升10倍以上,准确率更高,显存占用更低</summary>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/11/06 0.9.2发布,为表格识别功能接入了<a href="https://huggingface.co/U4R/StructTable-InternVL2-1B">StructTable-InternVL2-1B</a>模型</summary>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/10/31 0.9.0发布,这是我们进行了大量代码重构的全新版本,解决了众多问题,提升了性能,降低了硬件需求,并提供了更丰富的易用性:</summary>
|
||||
<ul>
|
||||
<li>重构排序模块代码,使用 <a href="https://github.com/ppaanngggg/layoutreader">layoutreader</a> 进行阅读顺序排序,确保在各种排版下都能实现极高准确率</li>
|
||||
<li>重构段落拼接模块,在跨栏、跨页、跨图、跨表情况下均能实现良好的段落拼接效果</li>
|
||||
<li>重构列表和目录识别功能,极大提升列表块和目录块识别的准确率及对应文本段落的解析效果</li>
|
||||
<li>重构图、表与描述性文本的匹配逻辑,大幅提升 caption 和 footnote 与图表的匹配准确率,并将描述性文本的丢失率降至接近0</li>
|
||||
<li>增加 OCR 的多语言支持,支持 84 种语言的检测与识别,语言支持列表详见 <a href="https://paddlepaddle.github.io/PaddleOCR/latest/ppocr/blog/multi_languages.html#5">OCR 语言支持列表</a></li>
|
||||
<li>增加显存回收逻辑及其他显存优化措施,大幅降低显存使用需求。开启除表格加速外的全部加速功能(layout/公式/OCR)的显存需求从16GB降至8GB,开启全部加速功能的显存需求从24GB降至10GB</li>
|
||||
<li>优化配置文件的功能开关,增加独立的公式检测开关,无需公式检测时可大幅提升速度和解析效果</li>
|
||||
<li>集成 <a href="https://github.com/opendatalab/PDF-Extract-Kit">PDF-Extract-Kit 1.0</a>
|
||||
<ul>
|
||||
<li>加入自研的 `doclayout_yolo` 模型,在相近解析效果情况下比原方案提速10倍以上,可通过配置文件与 `layoutlmv3` 自由切换</li>
|
||||
<li>公式解析升级至 `unimernet 0.2.1`,在提升公式解析准确率的同时,大幅降低显存需求</li>
|
||||
<li>因 `PDF-Extract-Kit 1.0` 更换仓库,需要重新下载模型,步骤详见 <a href="https://github.com/opendatalab/MinerU/docs/how_to_download_models_zh_cn.md">如何下载模型</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/09/27 0.8.1发布,修复了一些bug,同时提供了<a href="https://opendatalab.com/OpenSourceTools/Extractor/PDF/">在线demo</a>的<a href="https://github.com/opendatalab/MinerU/projects/web_demo/README_zh-CN.md">本地化部署版本</a>和<a href="https://github.com/opendatalab/MinerU/projects/web/README_zh-CN.md">前端界面</a></summary>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/09/09 0.8.0发布,支持Dockerfile快速部署,同时上线了huggingface、modelscope demo</summary>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/08/30 0.7.1发布,集成了paddle tablemaster表格识别功能</summary>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/08/09 0.7.0b1发布,简化安装步骤提升易用性,加入表格识别功能</summary>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/08/01 0.6.2b1发布,优化了依赖冲突问题和安装文档</summary>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>2024/07/05 首次开源</summary>
|
||||
</details>
|
||||
</details>
|
||||
> 📝 查看完整的 [更新日志](https://opendatalab.github.io/MinerU/zh/reference/changelog/) 了解更多历史版本信息
|
||||
|
||||
# MinerU
|
||||
|
||||
## 项目简介
|
||||
|
||||
MinerU是一款将PDF转化为机器可读格式的工具(如markdown、json),可以很方便地抽取为任意格式。
|
||||
MinerU 是一款文档解析工具,可将 `PDF`、图片和 `DOCX` 转化为机器可读格式(如 Markdown、JSON),便于后续检索、抽取与二次处理。
|
||||
MinerU诞生于[书生-浦语](https://github.com/InternLM/InternLM)的预训练过程中,我们将会集中精力解决科技文献中的符号转化问题,希望在大模型时代为科技发展做出贡献。
|
||||
相比国内外知名商用产品MinerU还很年轻,如果遇到问题或者结果不及预期请到[issue](https://github.com/opendatalab/MinerU/issues)提交问题,同时**附上相关PDF**。
|
||||
相比国内外知名商用产品MinerU还很年轻,如果遇到问题或者结果不及预期请到[issue](https://github.com/opendatalab/MinerU/issues)提交问题,同时**附上相关文档或样例文件**。
|
||||
|
||||
https://github.com/user-attachments/assets/4bea02c9-6d54-4cd6-97ed-dff14340982c
|
||||
|
||||
## 主要功能
|
||||
|
||||
- 支持 `PDF`、图片与 `DOCX` 输入
|
||||
- 删除页眉、页脚、脚注、页码等元素,确保语义连贯
|
||||
- 输出符合人类阅读顺序的文本,适用于单栏、多栏及复杂排版
|
||||
- 保留原文档的结构,包括标题、段落、列表等
|
||||
@@ -556,9 +91,10 @@ https://github.com/user-attachments/assets/4bea02c9-6d54-4cd6-97ed-dff14340982c
|
||||
- 自动识别并转换文档中的公式为LaTeX格式
|
||||
- 自动识别并转换文档中的表格为HTML格式
|
||||
- 自动检测扫描版PDF和乱码PDF,并启用OCR功能
|
||||
- OCR支持84种语言的检测与识别
|
||||
- OCR支持109种语言的检测与识别
|
||||
- 支持多种输出格式,如多模态与NLP的Markdown、按阅读顺序排序的JSON、含有丰富信息的中间格式等
|
||||
- 支持多种可视化结果,包括layout可视化、span可视化等,便于高效确认输出效果与质检
|
||||
- 内置命令行、FastAPI、Gradio WebUI,支持本地编排和多服务部署
|
||||
- 支持纯CPU环境运行,并支持 GPU(CUDA)/NPU(CANN)/MPS 加速
|
||||
- 兼容Windows、Linux和Mac平台
|
||||
|
||||
@@ -592,61 +128,100 @@ https://github.com/user-attachments/assets/4bea02c9-6d54-4cd6-97ed-dff14340982c
|
||||
> 在非主线环境中,由于硬件、软件配置的多样性,以及第三方依赖项的兼容性问题,我们无法100%保证项目的完全可用性。因此,对于希望在非推荐环境中使用本项目的用户,我们建议先仔细阅读文档以及FAQ,大多数问题已经在FAQ中有对应的解决方案,除此之外我们鼓励社区反馈问题,以便我们能够逐步扩大支持范围。
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>解析后端</td>
|
||||
<td>pipeline</td>
|
||||
<td>vlm-transformers</td>
|
||||
<td>vlm-vllm</td>
|
||||
<th rowspan="2">解析后端</th>
|
||||
<th rowspan="2">pipeline</th>
|
||||
<th colspan="2">*-auto-engine</th>
|
||||
<th colspan="2">*-http-client</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>操作系统</td>
|
||||
<td>Linux / Windows / macOS</td>
|
||||
<td>Linux / Windows</td>
|
||||
<td>Linux / Windows (via WSL2)</td>
|
||||
<th>hybrid</th>
|
||||
<th>vlm</th>
|
||||
<th>hybrid</th>
|
||||
<th>vlm</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>后端特性</th>
|
||||
<td >兼容性好</td>
|
||||
<td colspan="2">硬件配置要求较高</td>
|
||||
<td colspan="2">适用于OpenAI兼容服务器<sup>2</sup></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>精度指标<sup>1</sup></th>
|
||||
<td style="text-align:center;">86+</td>
|
||||
<td colspan="4" style="text-align:center;">90+</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CPU推理支持</td>
|
||||
<td>✅</td>
|
||||
<td colspan="2">❌</td>
|
||||
<th>操作系统</th>
|
||||
<td colspan="5" style="text-align:center;">Linux<sup>3</sup> / Windows<sup>4</sup> / macOS<sup>5</sup></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GPU要求</td>
|
||||
<td>Turing及以后架构,6G显存以上或Apple Silicon</td>
|
||||
<td colspan="2">Turing及以后架构,8G显存以上</td>
|
||||
<th>纯CPU平台支持</th>
|
||||
<td style="text-align:center;">✅</td>
|
||||
<td colspan="2" style="text-align:center;">❌</td>
|
||||
<td colspan="2" style="text-align:center;">✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>GPU加速支持</th>
|
||||
<td colspan="4" style="text-align:center;">Volta及以后架构GPU或Apple Silicon</td>
|
||||
<td rowspan="2">不需要</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>内存要求</td>
|
||||
<td colspan="3">最低16G以上,推荐32G以上</td>
|
||||
<th>显存最低要求</th>
|
||||
<td style="text-align:center;">4GB</td>
|
||||
<td style="text-align:center;">8GB</td>
|
||||
<td style="text-align:center;">8GB</td>
|
||||
<td style="text-align:center;">2GB</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>磁盘空间要求</td>
|
||||
<td colspan="3">20G以上,推荐使用SSD</td>
|
||||
<th>内存要求</th>
|
||||
<td colspan="3" style="text-align:center;">最低16GB以上,推荐32GB以上</td>
|
||||
<td colspan="2" style="text-align:center;">最低16GB</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>python版本</td>
|
||||
<td colspan="3">3.10-3.13</td>
|
||||
<th>磁盘空间要求</th>
|
||||
<td colspan="3" style="text-align:center;">20GB以上,推荐使用SSD</td>
|
||||
<td colspan="2" style="text-align:center;">至少2GB</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>python版本</th>
|
||||
<td colspan="5" style="text-align:center;">3.10-3.13</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<sup>1</sup> 精度指标为OmniDocBench (v1.5)的End-to-End Evaluation Overall分数,基于`MinerU`最新版本测试
|
||||
<sup>2</sup> 兼容OpenAI API的服务器,如通过`vLLM`/`SGLang`/`LMDeploy`等推理框架部署的本地模型服务器或远程模型服务
|
||||
<sup>3</sup> Linux仅支持2019年及以后发行版
|
||||
<sup>4</sup> 由于关键依赖`ray`未能在windows平台支持Python 3.13,故仅支持至3.10~3.12版本
|
||||
<sup>5</sup> macOS 需使用14.0以上版本
|
||||
|
||||
> [!TIP]
|
||||
> 除以上主流环境与平台外,我们也收录了一些社区用户反馈的其他平台支持情况,详情请参考[其他加速卡适配](https://opendatalab.github.io/MinerU/zh/usage/)。
|
||||
> 如果您有意将自己的环境适配经验分享给社区,欢迎通过[show-and-tell](https://github.com/opendatalab/MinerU/discussions/categories/show-and-tell)提交或提交PR至[其他加速卡适配](https://github.com/opendatalab/MinerU/tree/master/docs/zh/usage/acceleration_cards)文档。
|
||||
|
||||
### 安装 MinerU
|
||||
|
||||
#### 使用pip或uv安装MinerU
|
||||
```bash
|
||||
pip install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple
|
||||
pip install uv -i https://mirrors.aliyun.com/pypi/simple
|
||||
uv pip install -U "mineru[core]" -i https://mirrors.aliyun.com/pypi/simple
|
||||
uv pip install -U "mineru[all]" -i https://mirrors.aliyun.com/pypi/simple
|
||||
```
|
||||
|
||||
#### 通过源码安装MinerU
|
||||
```bash
|
||||
git clone https://github.com/opendatalab/MinerU.git
|
||||
cd MinerU
|
||||
uv pip install -e .[core] -i https://mirrors.aliyun.com/pypi/simple
|
||||
uv pip install -e .[all] -i https://mirrors.aliyun.com/pypi/simple
|
||||
```
|
||||
|
||||
> [!TIP]
|
||||
> `mineru[core]`包含除`vLLM`加速外的所有核心功能,兼容Windows / Linux / macOS系统,适合绝大多数用户。
|
||||
> 如果您有使用`vLLM`加速VLM模型推理,或是在边缘设备安装轻量版client端等需求,可以参考文档[扩展模块安装指南](https://opendatalab.github.io/MinerU/zh/quick_start/extension_modules/)。
|
||||
> `mineru[all]`包含所有核心功能,兼容Windows / Linux / macOS系统,适合绝大多数用户。
|
||||
> 如果您需要指定vlm模型的推理框架,或是仅准备在边缘设备安装轻量版client端,可以参考文档[扩展模块安装指南](https://opendatalab.github.io/MinerU/zh/quick_start/extension_modules/)。
|
||||
|
||||
---
|
||||
|
||||
@@ -658,12 +233,22 @@ MinerU提供了便捷的docker部署方式,这有助于快速搭建环境并
|
||||
|
||||
### 使用 MinerU
|
||||
|
||||
最简单的命令行调用方式:
|
||||
>[!TIP]
|
||||
>默认使用托管在`huggingface`的模型进行解析,首次使用时会自动下载所需模型文件,后续使用将直接加载本地缓存的模型。如果您无法访问`huggingface`,可以通过以下命令切换至国内镜像源:
|
||||
>```bash
|
||||
>export MINERU_MODEL_SOURCE=modelscope
|
||||
>```
|
||||
|
||||
如果您的设备满足上表中GPU加速的条件,可以使用简单的命令行进行文档解析:
|
||||
```bash
|
||||
mineru -p <input_path> -o <output_path>
|
||||
```
|
||||
如果您的设备不满足GPU加速条件,可以指定后端为`pipeline`,以在纯CPU环境下运行:
|
||||
```bash
|
||||
mineru -p <input_path> -o <output_path> -b pipeline
|
||||
```
|
||||
|
||||
您可以通过命令行、API、WebUI等多种方式使用MinerU进行PDF解析,具体使用方法请参考[使用指南](https://opendatalab.github.io/MinerU/zh/usage/)。
|
||||
当前 `mineru` 支持本地 `PDF / 图片 / DOCX` 文件或目录输入,并可通过命令行、API、WebUI、`mineru-router` 等多种方式进行文档解析,具体使用方法请参考[使用指南](https://opendatalab.github.io/MinerU/zh/usage/)。
|
||||
|
||||
# TODO
|
||||
|
||||
@@ -705,37 +290,38 @@ mineru -p <input_path> -o <output_path>
|
||||
|
||||
[LICENSE.md](LICENSE.md)
|
||||
|
||||
本项目目前部分模型基于YOLO训练,但因其遵循AGPL协议,可能对某些使用场景构成限制。未来版本迭代中,我们计划探索并替换为许可条款更为宽松的模型,以提升用户友好度及灵活性。
|
||||
本仓库源码采用 AGPLv3 许可。
|
||||
|
||||
# Acknowledgments
|
||||
|
||||
- [PDF-Extract-Kit](https://github.com/opendatalab/PDF-Extract-Kit)
|
||||
- [DocLayout-YOLO](https://github.com/opendatalab/DocLayout-YOLO)
|
||||
- [UniMERNet](https://github.com/opendatalab/UniMERNet)
|
||||
- [RapidTable](https://github.com/RapidAI/RapidTable)
|
||||
- [TableStructureRec](https://github.com/RapidAI/TableStructureRec)
|
||||
- [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)
|
||||
- [PaddleOCR2Pytorch](https://github.com/frotms/PaddleOCR2Pytorch)
|
||||
- [layoutreader](https://github.com/ppaanngggg/layoutreader)
|
||||
- [xy-cut](https://github.com/Sanster/xy-cut)
|
||||
- [fast-langdetect](https://github.com/LlmKira/fast-langdetect)
|
||||
- [pypdfium2](https://github.com/pypdfium2-team/pypdfium2)
|
||||
- [pdftext](https://github.com/datalab-to/pdftext)
|
||||
- [pdfminer.six](https://github.com/pdfminer/pdfminer.six)
|
||||
- [pypdf](https://github.com/py-pdf/pypdf)
|
||||
- [magika](https://github.com/google/magika)
|
||||
- [vLLM](https://github.com/vllm-project/vllm)
|
||||
- [LMDeploy](https://github.com/InternLM/lmdeploy)
|
||||
|
||||
# Citation
|
||||
|
||||
```bibtex
|
||||
@misc{wang2024mineruopensourcesolutionprecise,
|
||||
title={MinerU: An Open-Source Solution for Precise Document Content Extraction},
|
||||
author={Bin Wang and Chao Xu and Xiaomeng Zhao and Linke Ouyang and Fan Wu and Zhiyuan Zhao and Rui Xu and Kaiwen Liu and Yuan Qu and Fukai Shang and Bo Zhang and Liqun Wei and Zhihao Sui and Wei Li and Botian Shi and Yu Qiao and Dahua Lin and Conghui He},
|
||||
year={2024},
|
||||
eprint={2409.18839},
|
||||
archivePrefix={arXiv},
|
||||
primaryClass={cs.CV},
|
||||
url={https://arxiv.org/abs/2409.18839},
|
||||
@article{niu2025mineru2,
|
||||
title={Mineru2. 5: A decoupled vision-language model for efficient high-resolution document parsing},
|
||||
author={Niu, Junbo and Liu, Zheng and Gu, Zhuangcheng and Wang, Bin and Ouyang, Linke and Zhao, Zhiyuan and Chu, Tao and He, Tianyao and Wu, Fan and Zhang, Qintong and others},
|
||||
journal={arXiv preprint arXiv:2509.22186},
|
||||
year={2025}
|
||||
}
|
||||
|
||||
@article{wang2024mineru,
|
||||
title={Mineru: An open-source solution for precise document content extraction},
|
||||
author={Wang, Bin and Xu, Chao and Zhao, Xiaomeng and Ouyang, Linke and Wu, Fan and Zhao, Zhiyuan and Xu, Rui and Liu, Kaiwen and Qu, Yuan and Shang, Fukai and others},
|
||||
journal={arXiv preprint arXiv:2409.18839},
|
||||
year={2024}
|
||||
}
|
||||
|
||||
@article{he2024opendatalab,
|
||||
@@ -766,4 +352,4 @@ mineru -p <input_path> -o <output_path>
|
||||
- [OmniDocBench (A Comprehensive Benchmark for Document Parsing and Evaluation)](https://github.com/opendatalab/OmniDocBench)
|
||||
- [Magic-HTML (Mixed web page extraction tool)](https://github.com/opendatalab/magic-html)
|
||||
- [Magic-Doc (Fast speed ppt/pptx/doc/docx/pdf extraction tool)](https://github.com/InternLM/magic-doc)
|
||||
- [Dingo: A Comprehensive AI Data Quality Evaluation Tool](https://github.com/MigoXLab/dingo)
|
||||
- [Dingo: A Comprehensive AI Data Quality Evaluation Tool](https://github.com/MigoXLab/dingo)
|
||||
|
||||
437
demo/demo.py
@@ -1,239 +1,256 @@
|
||||
# Copyright (c) Opendatalab. All rights reserved.
|
||||
import copy
|
||||
import json
|
||||
import asyncio
|
||||
import os
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
|
||||
from loguru import logger
|
||||
import httpx
|
||||
|
||||
from mineru.cli.common import convert_pdf_bytes_to_bytes_by_pypdfium2, prepare_env, read_fn
|
||||
from mineru.data.data_reader_writer import FileBasedDataWriter
|
||||
from mineru.utils.draw_bbox import draw_layout_bbox, draw_span_bbox
|
||||
from mineru.utils.enum_class import MakeMode
|
||||
from mineru.backend.vlm.vlm_analyze import doc_analyze as vlm_doc_analyze
|
||||
from mineru.backend.pipeline.pipeline_analyze import doc_analyze as pipeline_doc_analyze
|
||||
from mineru.backend.pipeline.pipeline_middle_json_mkcontent import union_make as pipeline_union_make
|
||||
from mineru.backend.pipeline.model_json_to_middle_json import result_to_middle_json as pipeline_result_to_middle_json
|
||||
from mineru.backend.vlm.vlm_middle_json_mkcontent import union_make as vlm_union_make
|
||||
from mineru.cli import api_client as _api_client
|
||||
from mineru.cli.common import image_suffixes, office_suffixes, pdf_suffixes
|
||||
from mineru.utils.guess_suffix_or_lang import guess_suffix_by_path
|
||||
|
||||
SUPPORTED_INPUT_SUFFIXES = set(pdf_suffixes + image_suffixes + office_suffixes)
|
||||
|
||||
def do_parse(
|
||||
output_dir, # Output directory for storing parsing results
|
||||
pdf_file_names: list[str], # List of PDF file names to be parsed
|
||||
pdf_bytes_list: list[bytes], # List of PDF bytes to be parsed
|
||||
p_lang_list: list[str], # List of languages for each PDF, default is 'ch' (Chinese)
|
||||
backend="pipeline", # The backend for parsing PDF, default is 'pipeline'
|
||||
parse_method="auto", # The method for parsing PDF, default is 'auto'
|
||||
formula_enable=True, # Enable formula parsing
|
||||
table_enable=True, # Enable table parsing
|
||||
server_url=None, # Server URL for vlm-http-client backend
|
||||
f_draw_layout_bbox=True, # Whether to draw layout bounding boxes
|
||||
f_draw_span_bbox=True, # Whether to draw span bounding boxes
|
||||
f_dump_md=True, # Whether to dump markdown files
|
||||
f_dump_middle_json=True, # Whether to dump middle JSON files
|
||||
f_dump_model_output=True, # Whether to dump model output files
|
||||
f_dump_orig_pdf=True, # Whether to dump original PDF files
|
||||
f_dump_content_list=True, # Whether to dump content list files
|
||||
f_make_md_mode=MakeMode.MM_MD, # The mode for making markdown content, default is MM_MD
|
||||
start_page_id=0, # Start page ID for parsing, default is 0
|
||||
end_page_id=None, # End page ID for parsing, default is None (parse all pages until the end of the document)
|
||||
):
|
||||
|
||||
if backend == "pipeline":
|
||||
for idx, pdf_bytes in enumerate(pdf_bytes_list):
|
||||
new_pdf_bytes = convert_pdf_bytes_to_bytes_by_pypdfium2(pdf_bytes, start_page_id, end_page_id)
|
||||
pdf_bytes_list[idx] = new_pdf_bytes
|
||||
def collect_input_files(input_path: str | Path) -> list[Path]:
|
||||
path = Path(input_path).expanduser().resolve()
|
||||
if not path.exists():
|
||||
raise FileNotFoundError(f"Input path does not exist: {path}")
|
||||
|
||||
infer_results, all_image_lists, all_pdf_docs, lang_list, ocr_enabled_list = pipeline_doc_analyze(pdf_bytes_list, p_lang_list, parse_method=parse_method, formula_enable=formula_enable,table_enable=table_enable)
|
||||
if path.is_file():
|
||||
file_suffix = guess_suffix_by_path(path)
|
||||
if file_suffix not in SUPPORTED_INPUT_SUFFIXES:
|
||||
raise ValueError(f"Unsupported input file type: {path.name}")
|
||||
return [path]
|
||||
|
||||
for idx, model_list in enumerate(infer_results):
|
||||
model_json = copy.deepcopy(model_list)
|
||||
pdf_file_name = pdf_file_names[idx]
|
||||
local_image_dir, local_md_dir = prepare_env(output_dir, pdf_file_name, parse_method)
|
||||
image_writer, md_writer = FileBasedDataWriter(local_image_dir), FileBasedDataWriter(local_md_dir)
|
||||
if not path.is_dir():
|
||||
raise ValueError(f"Input path must be a file or directory: {path}")
|
||||
|
||||
images_list = all_image_lists[idx]
|
||||
pdf_doc = all_pdf_docs[idx]
|
||||
_lang = lang_list[idx]
|
||||
_ocr_enable = ocr_enabled_list[idx]
|
||||
middle_json = pipeline_result_to_middle_json(model_list, images_list, pdf_doc, image_writer, _lang, _ocr_enable, formula_enable)
|
||||
input_files = sorted(
|
||||
(
|
||||
candidate.resolve()
|
||||
for candidate in path.iterdir()
|
||||
if candidate.is_file()
|
||||
and guess_suffix_by_path(candidate) in SUPPORTED_INPUT_SUFFIXES
|
||||
),
|
||||
key=lambda item: item.name,
|
||||
)
|
||||
if not input_files:
|
||||
raise ValueError(f"No supported files found in directory: {path}")
|
||||
return input_files
|
||||
|
||||
pdf_info = middle_json["pdf_info"]
|
||||
|
||||
pdf_bytes = pdf_bytes_list[idx]
|
||||
_process_output(
|
||||
pdf_info, pdf_bytes, pdf_file_name, local_md_dir, local_image_dir,
|
||||
md_writer, f_draw_layout_bbox, f_draw_span_bbox, f_dump_orig_pdf,
|
||||
f_dump_md, f_dump_content_list, f_dump_middle_json, f_dump_model_output,
|
||||
f_make_md_mode, middle_json, model_json, is_pipeline=True
|
||||
def build_form_data(
|
||||
language: str,
|
||||
backend: str,
|
||||
parse_method: str,
|
||||
formula_enable: bool,
|
||||
table_enable: bool,
|
||||
server_url: str | None,
|
||||
start_page_id: int,
|
||||
end_page_id: int | None,
|
||||
) -> dict[str, str | list[str]]:
|
||||
return _api_client.build_parse_request_form_data(
|
||||
lang_list=[language],
|
||||
backend=backend,
|
||||
parse_method=parse_method,
|
||||
formula_enable=formula_enable,
|
||||
table_enable=table_enable,
|
||||
server_url=server_url,
|
||||
start_page_id=start_page_id,
|
||||
end_page_id=end_page_id,
|
||||
return_md=True,
|
||||
return_middle_json=False,
|
||||
return_model_output=False,
|
||||
return_content_list=False,
|
||||
return_images=True,
|
||||
response_format_zip=True,
|
||||
return_original_file=False,
|
||||
)
|
||||
|
||||
|
||||
def format_status_message(status_snapshot: _api_client.TaskStatusSnapshot) -> str:
|
||||
if status_snapshot.queued_ahead is None:
|
||||
return status_snapshot.status
|
||||
return f"{status_snapshot.status} (queued_ahead={status_snapshot.queued_ahead})"
|
||||
|
||||
|
||||
def prepare_local_api_temp_dir() -> None:
|
||||
current_temp_dir = Path(tempfile.gettempdir())
|
||||
if os.name == "nt" or not Path("/tmp").exists():
|
||||
return
|
||||
if not str(current_temp_dir).startswith("/mnt/"):
|
||||
return
|
||||
|
||||
# vLLM/ZeroMQ IPC sockets fail on drvfs-backed temp directories under WSL.
|
||||
os.environ["TMPDIR"] = "/tmp"
|
||||
tempfile.tempdir = None
|
||||
|
||||
|
||||
async def run_demo(
|
||||
input_path: str | Path,
|
||||
output_dir: str | Path,
|
||||
*,
|
||||
api_url: str | None = None,
|
||||
backend: str = "hybrid-auto-engine",
|
||||
parse_method: str = "auto",
|
||||
language: str = "ch",
|
||||
formula_enable: bool = True,
|
||||
table_enable: bool = True,
|
||||
server_url: str | None = None,
|
||||
start_page_id: int = 0,
|
||||
end_page_id: int | None = None,
|
||||
) -> None:
|
||||
api_url = api_url or None
|
||||
server_url = server_url or None
|
||||
if backend.endswith("http-client") and not server_url:
|
||||
raise ValueError(f"backend={backend} requires server_url")
|
||||
|
||||
input_files = collect_input_files(input_path)
|
||||
output_path = Path(output_dir).expanduser().resolve()
|
||||
output_path.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
form_data = build_form_data(
|
||||
language=language,
|
||||
backend=backend,
|
||||
parse_method=parse_method,
|
||||
formula_enable=formula_enable,
|
||||
table_enable=table_enable,
|
||||
server_url=server_url,
|
||||
start_page_id=start_page_id,
|
||||
end_page_id=end_page_id,
|
||||
)
|
||||
upload_assets = [
|
||||
_api_client.UploadAsset(path=file_path, upload_name=file_path.name)
|
||||
for file_path in input_files
|
||||
]
|
||||
|
||||
local_server: _api_client.LocalAPIServer | None = None
|
||||
result_zip_path: Path | None = None
|
||||
task_label = f"{len(input_files)} file(s)"
|
||||
|
||||
async with httpx.AsyncClient(
|
||||
timeout=_api_client.build_http_timeout(),
|
||||
follow_redirects=True,
|
||||
) as http_client:
|
||||
try:
|
||||
if api_url is None:
|
||||
prepare_local_api_temp_dir()
|
||||
local_server = _api_client.LocalAPIServer()
|
||||
base_url = local_server.start()
|
||||
print(f"Started local mineru-api: {base_url}")
|
||||
server_health = await _api_client.wait_for_local_api_ready(
|
||||
http_client,
|
||||
local_server,
|
||||
)
|
||||
else:
|
||||
server_health = await _api_client.fetch_server_health(
|
||||
http_client,
|
||||
_api_client.normalize_base_url(api_url),
|
||||
)
|
||||
|
||||
print(f"Using API: {server_health.base_url}")
|
||||
print(f"Submitting {len(upload_assets)} file(s)")
|
||||
submit_response = await _api_client.submit_parse_task(
|
||||
base_url=server_health.base_url,
|
||||
upload_assets=upload_assets,
|
||||
form_data=form_data,
|
||||
)
|
||||
else:
|
||||
if backend.startswith("vlm-"):
|
||||
backend = backend[4:]
|
||||
print(f"task_id: {submit_response.task_id}")
|
||||
if submit_response.queued_ahead is not None:
|
||||
print(f"status: pending (queued_ahead={submit_response.queued_ahead})")
|
||||
|
||||
f_draw_span_bbox = False
|
||||
parse_method = "vlm"
|
||||
for idx, pdf_bytes in enumerate(pdf_bytes_list):
|
||||
pdf_file_name = pdf_file_names[idx]
|
||||
pdf_bytes = convert_pdf_bytes_to_bytes_by_pypdfium2(pdf_bytes, start_page_id, end_page_id)
|
||||
local_image_dir, local_md_dir = prepare_env(output_dir, pdf_file_name, parse_method)
|
||||
image_writer, md_writer = FileBasedDataWriter(local_image_dir), FileBasedDataWriter(local_md_dir)
|
||||
middle_json, infer_result = vlm_doc_analyze(pdf_bytes, image_writer=image_writer, backend=backend, server_url=server_url)
|
||||
last_status_message = None
|
||||
|
||||
pdf_info = middle_json["pdf_info"]
|
||||
def on_status_update(status_snapshot: _api_client.TaskStatusSnapshot) -> None:
|
||||
nonlocal last_status_message
|
||||
message = format_status_message(status_snapshot)
|
||||
if message == last_status_message:
|
||||
return
|
||||
last_status_message = message
|
||||
print(f"status: {message}")
|
||||
|
||||
_process_output(
|
||||
pdf_info, pdf_bytes, pdf_file_name, local_md_dir, local_image_dir,
|
||||
md_writer, f_draw_layout_bbox, f_draw_span_bbox, f_dump_orig_pdf,
|
||||
f_dump_md, f_dump_content_list, f_dump_middle_json, f_dump_model_output,
|
||||
f_make_md_mode, middle_json, infer_result, is_pipeline=False
|
||||
await _api_client.wait_for_task_result(
|
||||
client=http_client,
|
||||
submit_response=submit_response,
|
||||
task_label=task_label,
|
||||
status_snapshot_callback=on_status_update,
|
||||
)
|
||||
print("status: completed")
|
||||
result_zip_path = await _api_client.download_result_zip(
|
||||
client=http_client,
|
||||
submit_response=submit_response,
|
||||
task_label=task_label,
|
||||
)
|
||||
finally:
|
||||
if local_server is not None:
|
||||
local_server.stop()
|
||||
|
||||
|
||||
def _process_output(
|
||||
pdf_info,
|
||||
pdf_bytes,
|
||||
pdf_file_name,
|
||||
local_md_dir,
|
||||
local_image_dir,
|
||||
md_writer,
|
||||
f_draw_layout_bbox,
|
||||
f_draw_span_bbox,
|
||||
f_dump_orig_pdf,
|
||||
f_dump_md,
|
||||
f_dump_content_list,
|
||||
f_dump_middle_json,
|
||||
f_dump_model_output,
|
||||
f_make_md_mode,
|
||||
middle_json,
|
||||
model_output=None,
|
||||
is_pipeline=True
|
||||
):
|
||||
"""处理输出文件"""
|
||||
if f_draw_layout_bbox:
|
||||
draw_layout_bbox(pdf_info, pdf_bytes, local_md_dir, f"{pdf_file_name}_layout.pdf")
|
||||
|
||||
if f_draw_span_bbox:
|
||||
draw_span_bbox(pdf_info, pdf_bytes, local_md_dir, f"{pdf_file_name}_span.pdf")
|
||||
|
||||
if f_dump_orig_pdf:
|
||||
md_writer.write(
|
||||
f"{pdf_file_name}_origin.pdf",
|
||||
pdf_bytes,
|
||||
)
|
||||
|
||||
image_dir = str(os.path.basename(local_image_dir))
|
||||
|
||||
if f_dump_md:
|
||||
make_func = pipeline_union_make if is_pipeline else vlm_union_make
|
||||
md_content_str = make_func(pdf_info, f_make_md_mode, image_dir)
|
||||
md_writer.write_string(
|
||||
f"{pdf_file_name}.md",
|
||||
md_content_str,
|
||||
)
|
||||
|
||||
if f_dump_content_list:
|
||||
make_func = pipeline_union_make if is_pipeline else vlm_union_make
|
||||
content_list = make_func(pdf_info, MakeMode.CONTENT_LIST, image_dir)
|
||||
md_writer.write_string(
|
||||
f"{pdf_file_name}_content_list.json",
|
||||
json.dumps(content_list, ensure_ascii=False, indent=4),
|
||||
)
|
||||
|
||||
if f_dump_middle_json:
|
||||
md_writer.write_string(
|
||||
f"{pdf_file_name}_middle.json",
|
||||
json.dumps(middle_json, ensure_ascii=False, indent=4),
|
||||
)
|
||||
|
||||
if f_dump_model_output:
|
||||
md_writer.write_string(
|
||||
f"{pdf_file_name}_model.json",
|
||||
json.dumps(model_output, ensure_ascii=False, indent=4),
|
||||
)
|
||||
|
||||
logger.info(f"local output dir is {local_md_dir}")
|
||||
|
||||
|
||||
def parse_doc(
|
||||
path_list: list[Path],
|
||||
output_dir,
|
||||
lang="ch",
|
||||
backend="pipeline",
|
||||
method="auto",
|
||||
server_url=None,
|
||||
start_page_id=0,
|
||||
end_page_id=None
|
||||
):
|
||||
"""
|
||||
Parameter description:
|
||||
path_list: List of document paths to be parsed, can be PDF or image files.
|
||||
output_dir: Output directory for storing parsing results.
|
||||
lang: Language option, default is 'ch', optional values include['ch', 'ch_server', 'ch_lite', 'en', 'korean', 'japan', 'chinese_cht', 'ta', 'te', 'ka']。
|
||||
Input the languages in the pdf (if known) to improve OCR accuracy. Optional.
|
||||
Adapted only for the case where the backend is set to "pipeline"
|
||||
backend: the backend for parsing pdf:
|
||||
pipeline: More general.
|
||||
vlm-transformers: More general.
|
||||
vlm-vllm-engine: Faster(engine).
|
||||
vlm-http-client: Faster(client).
|
||||
without method specified, pipeline will be used by default.
|
||||
method: the method for parsing pdf:
|
||||
auto: Automatically determine the method based on the file type.
|
||||
txt: Use text extraction method.
|
||||
ocr: Use OCR method for image-based PDFs.
|
||||
Without method specified, 'auto' will be used by default.
|
||||
Adapted only for the case where the backend is set to "pipeline".
|
||||
server_url: When the backend is `http-client`, you need to specify the server_url, for example:`http://127.0.0.1:30000`
|
||||
start_page_id: Start page ID for parsing, default is 0
|
||||
end_page_id: End page ID for parsing, default is None (parse all pages until the end of the document)
|
||||
"""
|
||||
assert result_zip_path is not None
|
||||
try:
|
||||
file_name_list = []
|
||||
pdf_bytes_list = []
|
||||
lang_list = []
|
||||
for path in path_list:
|
||||
file_name = str(Path(path).stem)
|
||||
pdf_bytes = read_fn(path)
|
||||
file_name_list.append(file_name)
|
||||
pdf_bytes_list.append(pdf_bytes)
|
||||
lang_list.append(lang)
|
||||
do_parse(
|
||||
output_dir=output_dir,
|
||||
pdf_file_names=file_name_list,
|
||||
pdf_bytes_list=pdf_bytes_list,
|
||||
p_lang_list=lang_list,
|
||||
backend=backend,
|
||||
parse_method=method,
|
||||
server_url=server_url,
|
||||
start_page_id=start_page_id,
|
||||
end_page_id=end_page_id
|
||||
)
|
||||
except Exception as e:
|
||||
logger.exception(e)
|
||||
_api_client.safe_extract_zip(result_zip_path, output_path)
|
||||
finally:
|
||||
result_zip_path.unlink(missing_ok=True)
|
||||
print(f"Extracted result to: {output_path}")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# args
|
||||
__dir__ = os.path.dirname(os.path.abspath(__file__))
|
||||
pdf_files_dir = os.path.join(__dir__, "pdfs")
|
||||
output_dir = os.path.join(__dir__, "output")
|
||||
pdf_suffixes = ["pdf"]
|
||||
image_suffixes = ["png", "jpeg", "jp2", "webp", "gif", "bmp", "jpg"]
|
||||
def main() -> None:
|
||||
demo_dir = Path(__file__).resolve().parent
|
||||
|
||||
doc_path_list = []
|
||||
for doc_path in Path(pdf_files_dir).glob('*'):
|
||||
if guess_suffix_by_path(doc_path) in pdf_suffixes + image_suffixes:
|
||||
doc_path_list.append(doc_path)
|
||||
# Input can be a single supported file or a directory containing supported files.
|
||||
input_path = demo_dir / "pdfs"
|
||||
# Parsed outputs will be extracted into this directory.
|
||||
output_dir = demo_dir / "api_output"
|
||||
# Set this to an existing MinerU FastAPI base URL, for example:
|
||||
# "http://127.0.0.1:8000"
|
||||
# Leave it as None to start a temporary local mineru-api automatically.
|
||||
api_url = None
|
||||
|
||||
# Available examples:
|
||||
# "hybrid-auto-engine" -> local hybrid parsing, recommended default
|
||||
# "pipeline" -> more general OCR/text pipeline
|
||||
# "vlm-auto-engine" -> local VLM parsing
|
||||
# "vlm-http-client" -> remote OpenAI-compatible VLM server
|
||||
# "hybrid-http-client" -> remote OpenAI-compatible hybrid server
|
||||
backend = "hybrid-auto-engine"
|
||||
# Available options:
|
||||
# "auto" -> let MinerU choose between text extraction and OCR
|
||||
# "txt" -> force text extraction
|
||||
# "ocr" -> force OCR
|
||||
parse_method = "auto"
|
||||
# OCR language hint. This is mainly used by pipeline and hybrid backends.
|
||||
language = "ch"
|
||||
# Enable formula parsing in the output.
|
||||
formula_enable = True
|
||||
# Enable table parsing in the output.
|
||||
table_enable = True
|
||||
# Required only for "*-http-client" backends, for example:
|
||||
# "http://127.0.0.1:30000"
|
||||
server_url = None
|
||||
# Zero-based page range. Set end_page_id to None to parse to the last page.
|
||||
start_page_id = 0
|
||||
end_page_id = None
|
||||
|
||||
"""如果您由于网络问题无法下载模型,可以设置环境变量MINERU_MODEL_SOURCE为modelscope使用免代理仓库下载模型"""
|
||||
# os.environ['MINERU_MODEL_SOURCE'] = "modelscope"
|
||||
|
||||
"""Use pipeline mode if your environment does not support VLM"""
|
||||
parse_doc(doc_path_list, output_dir, backend="pipeline")
|
||||
asyncio.run(
|
||||
run_demo(
|
||||
input_path=input_path,
|
||||
output_dir=output_dir,
|
||||
api_url=api_url,
|
||||
backend=backend,
|
||||
parse_method=parse_method,
|
||||
language=language,
|
||||
formula_enable=formula_enable,
|
||||
table_enable=table_enable,
|
||||
server_url=server_url,
|
||||
start_page_id=start_page_id,
|
||||
end_page_id=end_page_id,
|
||||
)
|
||||
)
|
||||
|
||||
"""To enable VLM mode, change the backend to 'vlm-xxx'"""
|
||||
# parse_doc(doc_path_list, output_dir, backend="vlm-transformers") # more general.
|
||||
# parse_doc(doc_path_list, output_dir, backend="vlm-vllm-engine") # faster(engine).
|
||||
# parse_doc(doc_path_list, output_dir, backend="vlm-http-client", server_url="http://127.0.0.1:30000") # faster(client).
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
BIN
demo/docx/demo1.docx
Normal file
BIN
demo/pptx/powerpoint_sample.pptx
Normal file
@@ -1,15 +1,7 @@
|
||||
# Use DaoCloud mirrored vllm image for China region for gpu with Ampere architecture and above (Compute Capability>=8.0)
|
||||
# Use DaoCloud mirrored vllm image for China region for gpu with Volta、Turing、Ampere、Ada Lovelace、Hopper、Blackwell architecture (7.0 <= Compute Capability <= 12.0)
|
||||
# Compute Capability version query (https://developer.nvidia.com/cuda-gpus)
|
||||
FROM docker.m.daocloud.io/vllm/vllm-openai:v0.10.1.1
|
||||
|
||||
# Use the official vllm image
|
||||
# FROM vllm/vllm-openai:v0.10.1.1
|
||||
|
||||
# Use DaoCloud mirrored vllm image for China region for gpu with Turing architecture and below (Compute Capability<8.0)
|
||||
# FROM docker.m.daocloud.io/vllm/vllm-openai:v0.10.2
|
||||
|
||||
# Use the official vllm image
|
||||
# FROM vllm/vllm-openai:v0.10.2
|
||||
# support x86_64 architecture and ARM(AArch64) architecture
|
||||
FROM docker.m.daocloud.io/vllm/vllm-openai:v0.11.2
|
||||
|
||||
# Install libgl for opencv support & Noto fonts for Chinese characters
|
||||
RUN apt-get update && \
|
||||
@@ -23,7 +15,7 @@ RUN apt-get update && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install mineru latest
|
||||
RUN python3 -m pip install -U 'mineru[core]' -i https://mirrors.aliyun.com/pypi/simple --break-system-packages && \
|
||||
RUN python3 -m pip install -U 'mineru[core]>=3.0.0' -i https://mirrors.aliyun.com/pypi/simple --break-system-packages && \
|
||||
python3 -m pip cache purge
|
||||
|
||||
# Download models and update the configuration file
|
||||
|
||||
27
docker/china/corex.Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
||||
# Base image containing the vLLM inference environment, requiring amd64(x86-64) CPU + iluvatar GPU.
|
||||
FROM crpi-vofi3w62lkohhxsp.cn-shanghai.personal.cr.aliyuncs.com/opendatalab-mineru/corex:4.4.0_torch2.7.1_vllm0.11.2_py3.10
|
||||
|
||||
|
||||
# Install Noto fonts for Chinese characters
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
fonts-noto-core \
|
||||
fonts-noto-cjk \
|
||||
fontconfig && \
|
||||
fc-cache -fv && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install mineru latest
|
||||
RUN python3 -m pip install -U pip -i https://mirrors.aliyun.com/pypi/simple && \
|
||||
python3 -m pip install 'mineru[core]>=3.0.0' \
|
||||
numpy==1.26.4 \
|
||||
opencv-python==4.11.0.86 \
|
||||
-i https://mirrors.aliyun.com/pypi/simple && \
|
||||
python3 -m pip cache purge
|
||||
|
||||
# Download models and update the configuration file
|
||||
RUN /bin/bash -c "mineru-models-download -s modelscope -m all"
|
||||
|
||||
# Set the entry point to activate the virtual environment and run the command line tool
|
||||
ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]
|
||||
31
docker/china/dcu.Dockerfile
Normal file
@@ -0,0 +1,31 @@
|
||||
# Base image containing the vLLM inference environment, requiring amd64(x86-64) CPU + Hygon DCU.
|
||||
FROM harbor.sourcefind.cn:5443/dcu/admin/base/vllm:0.9.2-ubuntu22.04-dtk25.04.2-1226-das1.7-py3.10-20251226
|
||||
|
||||
|
||||
# Install Noto fonts for Chinese characters
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
fonts-noto-core \
|
||||
fonts-noto-cjk \
|
||||
fontconfig && \
|
||||
fc-cache -fv && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install mineru latest
|
||||
RUN python3 -m pip install -U pip -i https://mirrors.aliyun.com/pypi/simple && \
|
||||
python3 -m pip install "mineru[gradio]>=3.0.0" \
|
||||
"ftfy>=6.3.1,<7" \
|
||||
"shapely>=2.0.7,<3" \
|
||||
"pyclipper>=1.3.0,<2" \
|
||||
"omegaconf>=2.3.0,<3" \
|
||||
numpy==1.25.0 \
|
||||
opencv-python==4.11.0.86 \
|
||||
-i https://mirrors.aliyun.com/pypi/simple && \
|
||||
python3 -m pip cache purge
|
||||
|
||||
# Download models and update the configuration file
|
||||
RUN /bin/bash -c "mineru-models-download -s modelscope -m all"
|
||||
|
||||
# Set the entry point to activate the virtual environment and run the command line tool
|
||||
ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]
|
||||
30
docker/china/gcu.Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
# Base image containing the vLLM inference environment, requiring amd64(x86-64) CPU + Enflame GCU.
|
||||
FROM crpi-vofi3w62lkohhxsp.cn-shanghai.personal.cr.aliyuncs.com/opendatalab-mineru/gcu:docker_images_topsrider_i3x_3.6.20260106_vllm0.11_pytorch2.8.0
|
||||
|
||||
|
||||
# Install Noto fonts for Chinese characters
|
||||
RUN echo 'deb http://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse\n\
|
||||
deb http://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse\n\
|
||||
deb http://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse\n\
|
||||
deb http://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse' > /tmp/aliyun-sources.list && \
|
||||
apt-get -o Dir::Etc::SourceList=/tmp/aliyun-sources.list update && \
|
||||
apt-get -o Dir::Etc::SourceList=/tmp/aliyun-sources.list install -y \
|
||||
fonts-noto-core \
|
||||
fonts-noto-cjk \
|
||||
fontconfig && \
|
||||
fc-cache -fv && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/aliyun-sources.list
|
||||
|
||||
# Install mineru latest
|
||||
RUN python3 -m pip install "mineru[core]>=3.0.0" \
|
||||
numpy==1.26.4 \
|
||||
opencv-python==4.11.0.86 \
|
||||
-i https://mirrors.aliyun.com/pypi/simple && \
|
||||
python3 -m pip cache purge
|
||||
|
||||
# Download models and update the configuration file
|
||||
RUN /bin/bash -c "mineru-models-download -s modelscope -m all"
|
||||
|
||||
# Set the entry point to activate the virtual environment and run the command line tool
|
||||
ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]
|
||||
30
docker/china/kxpu.Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
# Base image containing the vLLM inference environment, requiring amd64(x86-64) CPU + Kunlun XPU.
|
||||
FROM docker.1ms.run/wjie520/vllm_kunlun:v0.10.1.1rc1
|
||||
|
||||
|
||||
# Install Noto fonts for Chinese characters
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
fonts-noto-core \
|
||||
fonts-noto-cjk \
|
||||
fontconfig && \
|
||||
fc-cache -fv && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install mineru latest
|
||||
RUN python3 -m pip install -U pip -i https://mirrors.aliyun.com/pypi/simple && \
|
||||
python3 -m pip install "mineru[gradio]>=3.0.0" \
|
||||
"ftfy>=6.3.1,<7" \
|
||||
"shapely>=2.0.7,<3" \
|
||||
"pyclipper>=1.3.0,<2" \
|
||||
"omegaconf>=2.3.0,<3" \
|
||||
-i https://mirrors.aliyun.com/pypi/simple && \
|
||||
sed -i '1,200{s/self\.act = act_layer()/self.act = nn.GELU()/;t;b};' /root/miniconda/envs/vllm_kunlun_0.10.1.1/lib/python3.10/site-packages/vllm_kunlun/models/qwen2_vl.py && \
|
||||
python3 -m pip cache purge
|
||||
|
||||
# Download models and update the configuration file
|
||||
RUN /bin/bash -c "mineru-models-download -s modelscope -m all"
|
||||
|
||||
# Set the entry point to activate the virtual environment and run the command line tool
|
||||
ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]
|
||||
34
docker/china/maca.Dockerfile
Normal file
@@ -0,0 +1,34 @@
|
||||
# 基础镜像配置 vLLM 或 LMDeploy 推理环境,请根据实际需要选择其中一个,要求 amd64(x86-64) CPU + metax GPU。
|
||||
# Base image containing the vLLM inference environment, requiring amd64(x86-64) CPU + metax GPU.
|
||||
FROM cr.metax-tech.com/public-ai-release/maca/vllm:maca.ai3.1.0.7-torch2.6-py310-ubuntu22.04-amd64
|
||||
# Base image containing the LMDeploy inference environment, requiring amd64(x86-64) CPU + metax GPU.
|
||||
# FROM crpi-vofi3w62lkohhxsp.cn-shanghai.personal.cr.aliyuncs.com/opendatalab-mineru/maca:maca.ai3.1.0.7-torch2.6-py310-ubuntu22.04-lmdeploy0.10.2-amd64
|
||||
|
||||
# Install libgl for opencv support & Noto fonts for Chinese characters
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
fonts-noto-core \
|
||||
fonts-noto-cjk \
|
||||
fontconfig \
|
||||
libgl1 && \
|
||||
fc-cache -fv && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# mod torchvision to be compatible with torch 2.6
|
||||
RUN sed -i '3s/^Version: 0.15.1+metax3\.1\.0\.4$/Version: 0.21.0+metax3.1.0.4/' /opt/conda/lib/python3.10/site-packages/torchvision-0.15.1+metax3.1.0.4.dist-info/METADATA && \
|
||||
mv /opt/conda/lib/python3.10/site-packages/torchvision-0.15.1+metax3.1.0.4.dist-info /opt/conda/lib/python3.10/site-packages/torchvision-0.21.0+metax3.1.0.4.dist-info
|
||||
|
||||
# Install mineru latest
|
||||
RUN /opt/conda/bin/python3 -m pip install -U pip -i https://mirrors.aliyun.com/pypi/simple && \
|
||||
/opt/conda/bin/python3 -m pip install 'mineru[core]>=3.0.0' \
|
||||
numpy==1.26.4 \
|
||||
opencv-python==4.11.0.86 \
|
||||
-i https://mirrors.aliyun.com/pypi/simple && \
|
||||
/opt/conda/bin/python3 -m pip cache purge
|
||||
|
||||
# Download models and update the configuration file
|
||||
RUN /bin/bash -c "/opt/conda/bin/mineru-models-download -s modelscope -m all"
|
||||
|
||||
# Set the entry point to activate the virtual environment and run the command line tool
|
||||
ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]
|
||||
42
docker/china/mlu.Dockerfile
Normal file
@@ -0,0 +1,42 @@
|
||||
# 基础镜像配置 vLLM 或 LMDeploy ,请根据实际需要选择其中一个,要求 amd64(x86-64) CPU + Cambricon MLU.
|
||||
# Base image containing the LMDEPLOY inference environment, requiring amd64(x86-64) CPU + Cambricon MLU.
|
||||
FROM crpi-4crprmm5baj1v8iv.cn-hangzhou.personal.cr.aliyuncs.com/lmdeploy_dlinfer/camb:mineru25
|
||||
ARG BACKEND=lmdeploy
|
||||
# Base image containing the vLLM inference environment, requiring amd64(x86-64) CPU + Cambricon MLU.
|
||||
# FROM crpi-vofi3w62lkohhxsp.cn-shanghai.personal.cr.aliyuncs.com/opendatalab-mineru/mlu:vllm0.8.3-torch2.6.0-torchmlu1.26.1-ubuntu22.04-py310
|
||||
# ARG BACKEND=vllm
|
||||
|
||||
# Install Noto fonts for Chinese characters
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
fonts-noto-core \
|
||||
fonts-noto-cjk \
|
||||
fontconfig && \
|
||||
fc-cache -fv && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install mineru latest
|
||||
RUN /bin/bash -c '\
|
||||
if [ "$BACKEND" = "vllm" ]; then \
|
||||
source /torch/venv3/pytorch_infer/bin/activate; \
|
||||
fi && \
|
||||
python3 -m pip install -U pip -i https://mirrors.aliyun.com/pypi/simple && \
|
||||
python3 -m pip install "mineru[core]>=3.0.0" \
|
||||
numpy==1.26.4 \
|
||||
opencv-python==4.11.0.86 \
|
||||
-i https://mirrors.aliyun.com/pypi/simple && \
|
||||
python3 -m pip install $(if [ "$BACKEND" = "lmdeploy" ]; then echo "accelerate==1.2.0"; else echo "transformers==4.50.3"; fi) && \
|
||||
python3 -m pip cache purge'
|
||||
|
||||
# Download models and update the configuration file
|
||||
RUN /bin/bash -c '\
|
||||
if [ "$BACKEND" = "vllm" ]; then \
|
||||
source /torch/venv3/pytorch_infer/bin/activate; \
|
||||
fi && \
|
||||
mineru-models-download -s modelscope -m all'
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
# Set the entry point to activate the virtual environment and run the command line tool
|
||||
ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]
|
||||
35
docker/china/musa.Dockerfile
Normal file
@@ -0,0 +1,35 @@
|
||||
# Base image containing the vLLM inference environment, requiring amd64(x86-64) CPU + MooreThreads GPU.
|
||||
FROM registry.mthreads.com/mcconline/vllm-musa-qy2-py310:v0.8.4-release
|
||||
|
||||
|
||||
# Install libgl for opencv support & Noto fonts for Chinese characters
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
fonts-noto-core \
|
||||
fonts-noto-cjk \
|
||||
fontconfig \
|
||||
libgl1 && \
|
||||
fc-cache -fv && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install mineru latest
|
||||
RUN python3 -m pip install -U pip -i https://mirrors.aliyun.com/pypi/simple && \
|
||||
git clone https://gitcode.com/gh_mirrors/vi/vision.git -b v0.20.0 --depth 1 && \
|
||||
cd vision && \
|
||||
python3 setup.py install && \
|
||||
python3 -m pip install "mineru[gradio]>=3.0.0" \
|
||||
"ftfy>=6.3.1,<7" \
|
||||
"shapely>=2.0.7,<3" \
|
||||
"pyclipper>=1.3.0,<2" \
|
||||
"omegaconf>=2.3.0,<3" \
|
||||
numpy==1.26.4 \
|
||||
opencv-python==4.11.0.86 \
|
||||
-i https://mirrors.aliyun.com/pypi/simple && \
|
||||
python3 -m pip cache purge
|
||||
|
||||
# Download models and update the configuration file
|
||||
RUN /bin/bash -c "mineru-models-download -s modelscope -m all"
|
||||
|
||||
# Set the entry point to activate the virtual environment and run the command line tool
|
||||
ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]
|
||||
32
docker/china/npu.Dockerfile
Normal file
@@ -0,0 +1,32 @@
|
||||
# 基础镜像配置 vLLM 或 LMDeploy ,请根据实际需要选择其中一个,要求 ARM(AArch64) CPU + Ascend NPU。
|
||||
# Base image containing the vLLM inference environment, requiring ARM(AArch64) CPU + Ascend NPU.
|
||||
FROM quay.m.daocloud.io/ascend/vllm-ascend:v0.11.0
|
||||
# Base image containing the LMDeploy inference environment, requiring ARM(AArch64) CPU + Ascend NPU.
|
||||
# FROM crpi-4crprmm5baj1v8iv.cn-hangzhou.personal.cr.aliyuncs.com/lmdeploy_dlinfer/ascend:mineru-a2
|
||||
|
||||
|
||||
# Install libgl for opencv support & Noto fonts for Chinese characters
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
fonts-noto-core \
|
||||
fonts-noto-cjk \
|
||||
fontconfig \
|
||||
libgl1 \
|
||||
libglib2.0-0 && \
|
||||
fc-cache -fv && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install mineru latest
|
||||
RUN python3 -m pip install -U pip -i https://mirrors.aliyun.com/pypi/simple && \
|
||||
python3 -m pip install 'mineru[core]>=3.0.0' \
|
||||
numpy==1.26.4 \
|
||||
opencv-python==4.11.0.86 \
|
||||
-i https://mirrors.aliyun.com/pypi/simple && \
|
||||
python3 -m pip cache purge
|
||||
|
||||
# Download models and update the configuration file
|
||||
RUN TORCH_DEVICE_BACKEND_AUTOLOAD=0 /bin/bash -c "mineru-models-download -s modelscope -m all"
|
||||
|
||||
# Set the entry point to activate the virtual environment and run the command line tool
|
||||
ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]
|
||||
30
docker/china/ppu.Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
# 基础镜像配置 vLLM 或 LMDeploy 推理环境,请根据实际需要选择其中一个,要求 amd64(x86-64) CPU + t-head PPU。
|
||||
# Base image containing the vLLM inference environment, requiring amd64(x86-64) CPU + t-head PPU.
|
||||
FROM crpi-vofi3w62lkohhxsp.cn-shanghai.personal.cr.aliyuncs.com/opendatalab-mineru/ppu:ppu-pytorch2.6.0-ubuntu24.04-cuda12.6-vllm0.8.5-py312
|
||||
# Base image containing the LMDeploy inference environment, requiring amd64(x86-64) CPU + t-head PPU.
|
||||
# FROM crpi-4crprmm5baj1v8iv.cn-hangzhou.personal.cr.aliyuncs.com/lmdeploy_dlinfer/ppu:mineru-ppu
|
||||
|
||||
# Install libgl for opencv support & Noto fonts for Chinese characters
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
fonts-noto-core \
|
||||
fonts-noto-cjk \
|
||||
fontconfig \
|
||||
libgl1 && \
|
||||
fc-cache -fv && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install mineru latest
|
||||
RUN python3 -m pip install -U pip -i https://mirrors.aliyun.com/pypi/simple && \
|
||||
python3 -m pip install 'mineru[core]>=3.0.0' \
|
||||
numpy==1.26.4 \
|
||||
opencv-python==4.11.0.86 \
|
||||
-i https://mirrors.aliyun.com/pypi/simple && \
|
||||
python3 -m pip cache purge
|
||||
|
||||
# Download models and update the configuration file
|
||||
RUN /bin/bash -c "mineru-models-download -s modelscope -m all"
|
||||
|
||||
# Set the entry point to activate the virtual environment and run the command line tool
|
||||
ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]
|
||||
@@ -1,14 +1,14 @@
|
||||
services:
|
||||
mineru-vllm-server:
|
||||
image: mineru-vllm:latest
|
||||
container_name: mineru-vllm-server
|
||||
mineru-openai-server:
|
||||
image: mineru:latest
|
||||
container_name: mineru-openai-server
|
||||
restart: always
|
||||
profiles: ["vllm-server"]
|
||||
profiles: ["openai-server"]
|
||||
ports:
|
||||
- 30000:30000
|
||||
environment:
|
||||
MINERU_MODEL_SOURCE: local
|
||||
entrypoint: mineru-vllm-server
|
||||
entrypoint: mineru-openai-server
|
||||
command:
|
||||
--host 0.0.0.0
|
||||
--port 30000
|
||||
@@ -25,11 +25,11 @@ services:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
device_ids: ["0"]
|
||||
device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"]
|
||||
capabilities: [gpu]
|
||||
|
||||
mineru-api:
|
||||
image: mineru-vllm:latest
|
||||
image: mineru:latest
|
||||
container_name: mineru-api
|
||||
restart: always
|
||||
profiles: ["api"]
|
||||
@@ -48,16 +48,18 @@ services:
|
||||
memlock: -1
|
||||
stack: 67108864
|
||||
ipc: host
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"]
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
device_ids: [ "0" ]
|
||||
capabilities: [ gpu ]
|
||||
device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"]
|
||||
capabilities: [gpu]
|
||||
|
||||
mineru-gradio:
|
||||
image: mineru-vllm:latest
|
||||
image: mineru:latest
|
||||
container_name: mineru-gradio
|
||||
restart: always
|
||||
profiles: ["gradio"]
|
||||
@@ -69,7 +71,6 @@ services:
|
||||
command:
|
||||
--server-name 0.0.0.0
|
||||
--server-port 7860
|
||||
--enable-vllm-engine true # Enable the vllm engine for Gradio
|
||||
# --enable-api false # If you want to disable the API, set this to false
|
||||
# --max-convert-pages 20 # If you want to limit the number of pages for conversion, set this to a specific number
|
||||
# parameters for vllm-engine
|
||||
@@ -84,5 +85,5 @@ services:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
device_ids: [ "0" ]
|
||||
capabilities: [ gpu ]
|
||||
device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"]
|
||||
capabilities: [gpu]
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
# Use the official vllm image for gpu with Ampere architecture and above (Compute Capability>=8.0)
|
||||
# Use the official vllm image for gpu with Volta、Turing、Ampere、Ada Lovelace、Hopper、Blackwell architecture (7.0 <= Compute Capability <= 12.0)
|
||||
# Compute Capability version query (https://developer.nvidia.com/cuda-gpus)
|
||||
FROM vllm/vllm-openai:v0.10.1.1
|
||||
|
||||
# Use the official vllm image for gpu with Turing architecture and below (Compute Capability<8.0)
|
||||
# FROM vllm/vllm-openai:v0.10.2
|
||||
# support x86_64 architecture and ARM(AArch64) architecture
|
||||
FROM vllm/vllm-openai:v0.11.2
|
||||
|
||||
# Install libgl for opencv support & Noto fonts for Chinese characters
|
||||
RUN apt-get update && \
|
||||
@@ -17,7 +15,7 @@ RUN apt-get update && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install mineru latest
|
||||
RUN python3 -m pip install -U 'mineru[core]' --break-system-packages && \
|
||||
RUN python3 -m pip install -U 'mineru[core]>=3.0.0' --break-system-packages && \
|
||||
python3 -m pip cache purge
|
||||
|
||||
# Download models and update the configuration file
|
||||
|
||||
BIN
docs/assets/images/BISHENG_01.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
docs/assets/images/Cherry_Studio_1.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
docs/assets/images/Cherry_Studio_2.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
docs/assets/images/Cherry_Studio_3.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
docs/assets/images/Cherry_Studio_4.png
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
docs/assets/images/Cherry_Studio_5.png
Normal file
|
After Width: | Height: | Size: 64 KiB |
BIN
docs/assets/images/Cherry_Studio_6.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
docs/assets/images/Cherry_Studio_7.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
docs/assets/images/Cherry_Studio_8.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
docs/assets/images/Coze_1.png
Normal file
|
After Width: | Height: | Size: 64 KiB |
BIN
docs/assets/images/Coze_10.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
docs/assets/images/Coze_11.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
docs/assets/images/Coze_12.png
Normal file
|
After Width: | Height: | Size: 110 KiB |
BIN
docs/assets/images/Coze_13.png
Normal file
|
After Width: | Height: | Size: 79 KiB |
BIN
docs/assets/images/Coze_14.png
Normal file
|
After Width: | Height: | Size: 104 KiB |
BIN
docs/assets/images/Coze_15.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
docs/assets/images/Coze_16.png
Normal file
|
After Width: | Height: | Size: 87 KiB |
BIN
docs/assets/images/Coze_17.png
Normal file
|
After Width: | Height: | Size: 201 KiB |
BIN
docs/assets/images/Coze_18.png
Normal file
|
After Width: | Height: | Size: 261 KiB |
BIN
docs/assets/images/Coze_19.png
Normal file
|
After Width: | Height: | Size: 261 KiB |
BIN
docs/assets/images/Coze_2.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
docs/assets/images/Coze_20.png
Normal file
|
After Width: | Height: | Size: 145 KiB |
BIN
docs/assets/images/Coze_21.png
Normal file
|
After Width: | Height: | Size: 130 KiB |
BIN
docs/assets/images/Coze_3.png
Normal file
|
After Width: | Height: | Size: 95 KiB |
BIN
docs/assets/images/Coze_4.png
Normal file
|
After Width: | Height: | Size: 110 KiB |
BIN
docs/assets/images/Coze_5.png
Normal file
|
After Width: | Height: | Size: 102 KiB |
BIN
docs/assets/images/Coze_6.png
Normal file
|
After Width: | Height: | Size: 101 KiB |
BIN
docs/assets/images/Coze_7.png
Normal file
|
After Width: | Height: | Size: 214 KiB |
BIN
docs/assets/images/Coze_8.png
Normal file
|
After Width: | Height: | Size: 151 KiB |
BIN
docs/assets/images/Coze_9.png
Normal file
|
After Width: | Height: | Size: 83 KiB |
BIN
docs/assets/images/DataFLow_01.png
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
docs/assets/images/DataFlow_02.png
Normal file
|
After Width: | Height: | Size: 147 KiB |
BIN
docs/assets/images/Dify_1.png
Normal file
|
After Width: | Height: | Size: 108 KiB |
BIN
docs/assets/images/Dify_10.png
Normal file
|
After Width: | Height: | Size: 81 KiB |
BIN
docs/assets/images/Dify_11.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
docs/assets/images/Dify_12.png
Normal file
|
After Width: | Height: | Size: 129 KiB |
BIN
docs/assets/images/Dify_13.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
docs/assets/images/Dify_14.png
Normal file
|
After Width: | Height: | Size: 249 KiB |
BIN
docs/assets/images/Dify_15.png
Normal file
|
After Width: | Height: | Size: 255 KiB |
BIN
docs/assets/images/Dify_16.png
Normal file
|
After Width: | Height: | Size: 107 KiB |
BIN
docs/assets/images/Dify_17.png
Normal file
|
After Width: | Height: | Size: 125 KiB |
BIN
docs/assets/images/Dify_18.png
Normal file
|
After Width: | Height: | Size: 180 KiB |
BIN
docs/assets/images/Dify_19.png
Normal file
|
After Width: | Height: | Size: 105 KiB |
BIN
docs/assets/images/Dify_2.png
Normal file
|
After Width: | Height: | Size: 236 KiB |
BIN
docs/assets/images/Dify_20.png
Normal file
|
After Width: | Height: | Size: 177 KiB |
BIN
docs/assets/images/Dify_21.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
docs/assets/images/Dify_22.png
Normal file
|
After Width: | Height: | Size: 118 KiB |
BIN
docs/assets/images/Dify_23.png
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
docs/assets/images/Dify_24.png
Normal file
|
After Width: | Height: | Size: 133 KiB |
BIN
docs/assets/images/Dify_25.png
Normal file
|
After Width: | Height: | Size: 161 KiB |
BIN
docs/assets/images/Dify_26.png
Normal file
|
After Width: | Height: | Size: 190 KiB |
BIN
docs/assets/images/Dify_3.png
Normal file
|
After Width: | Height: | Size: 263 KiB |
BIN
docs/assets/images/Dify_4.png
Normal file
|
After Width: | Height: | Size: 264 KiB |
BIN
docs/assets/images/Dify_5.png
Normal file
|
After Width: | Height: | Size: 261 KiB |
BIN
docs/assets/images/Dify_6.png
Normal file
|
After Width: | Height: | Size: 286 KiB |
BIN
docs/assets/images/Dify_7.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
docs/assets/images/Dify_8.png
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
docs/assets/images/Dify_9.png
Normal file
|
After Width: | Height: | Size: 110 KiB |
BIN
docs/assets/images/DingTalk_01.png
Normal file
|
After Width: | Height: | Size: 133 KiB |
BIN
docs/assets/images/FastGPT_01.png
Normal file
|
After Width: | Height: | Size: 185 KiB |
BIN
docs/assets/images/FastGPT_02.png
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
docs/assets/images/ModelWhale_01.png
Normal file
|
After Width: | Height: | Size: 246 KiB |
BIN
docs/assets/images/ModelWhale_02.png
Normal file
|
After Width: | Height: | Size: 71 KiB |
BIN
docs/assets/images/ModelWhale_1.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
docs/assets/images/RagFlow_01.png
Normal file
|
After Width: | Height: | Size: 116 KiB |
BIN
docs/assets/images/RagFlow_02.png
Normal file
|
After Width: | Height: | Size: 151 KiB |
BIN
docs/assets/images/Sider_1.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
docs/assets/images/coze_0.png
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
docs/assets/images/n8n_0.png
Normal file
|
After Width: | Height: | Size: 276 KiB |
BIN
docs/assets/images/n8n_1.png
Normal file
|
After Width: | Height: | Size: 67 KiB |
BIN
docs/assets/images/n8n_10.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
docs/assets/images/n8n_2.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
docs/assets/images/n8n_3.png
Normal file
|
After Width: | Height: | Size: 71 KiB |
BIN
docs/assets/images/n8n_4.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
docs/assets/images/n8n_5.png
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
docs/assets/images/n8n_6.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
docs/assets/images/n8n_7.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
docs/assets/images/n8n_8.png
Normal file
|
After Width: | Height: | Size: 33 KiB |