|
|
@@ -41,9 +41,9 @@ After completing the installation of the wheel package, a few lines of code can
|
|
|
|
|
|
```python
|
|
|
from paddlex import create_model
|
|
|
-model = create_model('PP-DocBee-2B')
|
|
|
+model = create_model('PP-DocBee2-3B')
|
|
|
results = model.predict(
|
|
|
- input={"image": "medal_table.png", "query": "Identify the content of this table"},
|
|
|
+ input={"image": "medal_table.png", "query": "识别这份表格的内容, 以markdown格式输出"},
|
|
|
batch_size=1
|
|
|
)
|
|
|
for res in results:
|
|
|
@@ -54,7 +54,7 @@ for res in results:
|
|
|
The results obtained will be:
|
|
|
|
|
|
```bash
|
|
|
-{'res': {'image': 'medal_table.png', 'query': 'Identify the content of this table', 'result': '| Rank | Country/Region | Gold | Silver | Bronze | Total Medals |\n| --- | --- | --- | --- | --- | --- |\n| 1 | China (CHN) | 48 | 22 | 30 | 100 |\n| 2 | USA | 36 | 39 | 37 | 112 |\n| 3 | Russia (RUS) | 24 | 13 | 23 | 60 |\n| 4 | UK (GBR) | 19 | 13 | 19 | 51 |\n| 5 | Germany (GER) | 16 | 11 | 14 | 41 |\n| 6 | Australia (AUS) | 14 | 15 | 17 | 46 |\n| 7 | Korea (KOR) | 13 | 11 | 8 | 32 |\n| 8 | Japan (JPN) | 9 | 8 | 8 | 25 |\n| 9 | Italy (ITA) | 8 | 9 | 10 | 27 |\n| 10 | France (FRA) | 7 | 16 | 20 | 43 |\n| 11 | Netherlands (NED) | 7 | 5 | 4 | 16 |\n| 12 | Ukraine (UKR) | 7 | 4 | 11 | 22 |\n| 13 | Kenya (KEN) | 6 | 4 | 6 | 16 |\n| 14 | Spain (ESP) | 5 | 11 | 3 | 19 |\n| 15 | Jamaica (JAM) | 5 | 4 | 2 | 11 |\n'}}
|
|
|
+{'res': {'image': 'medal_table.png', 'query': '识别这份表格的内容, 以markdown格式输出', 'result': '| 名次 | 国家/地区 | 金牌 | 银牌 | 铜牌 | 奖牌总数 |\n| --- | --- | --- | --- | --- | --- |\n| 1 | 中国(CHN) | 48 | 22 | 30 | 100 |\n| 2 | 美国(USA) | 36 | 39 | 37 | 112 |\n| 3 | 俄罗斯(RUS) | 24 | 13 | 23 | 60 |\n| 4 | 英国(GBR) | 19 | 13 | 19 | 51 |\n| 5 | 德国(GER) | 16 | 11 | 14 | 41 |\n| 6 | 澳大利亚(AUS) | 14 | 15 | 17 | 46 |\n| 7 | 韩国(KOR) | 13 | 11 | 8 | 32 |\n| 8 | 日本(JPN) | 9 | 8 | 8 | 25 |\n| 9 | 意大利(ITA) | 8 | 9 | 10 | 27 |\n| 10 | 法国(FRA) | 7 | 16 | 20 | 43 |\n| 11 | 荷兰(NED) | 7 | 5 | 4 | 16 |\n| 12 | 乌克兰(UKR) | 7 | 4 | 11 | 22 |\n| 13 | 肯尼亚(KEN) | 6 | 4 | 6 | 16 |\n| 14 | 西班牙(ESP) | 5 | 11 | 3 | 19 |\n| 15 | 牙买加(JAM) | 5 | 4 | 2 | 11 |\n'}}
|
|
|
```
|
|
|
The parameters in the results have the following meaning:
|
|
|
|
|
|
@@ -65,23 +65,23 @@ The parameters in the results have the following meaning:
|
|
|
The visualized prediction results are as follows:
|
|
|
|
|
|
```bash
|
|
|
-| Rank | Country/Region | Gold | Silver | Bronze | Total Medals |
|
|
|
+| 名次 | 国家/地区 | 金牌 | 银牌 | 铜牌 | 奖牌总数 |
|
|
|
| --- | --- | --- | --- | --- | --- |
|
|
|
-| 1 | China (CHN) | 48 | 22 | 30 | 100 |
|
|
|
-| 2 | USA | 36 | 39 | 37 | 112 |
|
|
|
-| 3 | Russia (RUS) | 24 | 13 | 23 | 60 |
|
|
|
-| 4 | UK (GBR) | 19 | 13 | 19 | 51 |
|
|
|
-| 5 | Germany (GER) | 16 | 11 | 14 | 41 |
|
|
|
-| 6 | Australia (AUS) | 14 | 15 | 17 | 46 |
|
|
|
-| 7 | Korea (KOR) | 13 | 11 | 8 | 32 |
|
|
|
-| 8 | Japan (JPN) | 9 | 8 | 8 | 25 |
|
|
|
-| 9 | Italy (ITA) | 8 | 9 | 10 | 27 |
|
|
|
-| 10 | France (FRA) | 7 | 16 | 20 | 43 |
|
|
|
-| 11 | Netherlands (NED) | 7 | 5 | 4 | 16 |
|
|
|
-| 12 | Ukraine (UKR) | 7 | 4 | 11 | 22 |
|
|
|
-| 13 | Kenya (KEN) | 6 | 4 | 6 | 16 |
|
|
|
-| 14 | Spain (ESP) | 5 | 11 | 3 | 19 |
|
|
|
-| 15 | Jamaica (JAM) | 5 | 4 | 2 | 11 |
|
|
|
+| 1 | 中国(CHN) | 48 | 22 | 30 | 100 |
|
|
|
+| 2 | 美国(USA) | 36 | 39 | 37 | 112 |
|
|
|
+| 3 | 俄罗斯(RUS) | 24 | 13 | 23 | 60 |
|
|
|
+| 4 | 英国(GBR) | 19 | 13 | 19 | 51 |
|
|
|
+| 5 | 德国(GER) | 16 | 11 | 14 | 41 |
|
|
|
+| 6 | 澳大利亚(AUS) | 14 | 15 | 17 | 46 |
|
|
|
+| 7 | 韩国(KOR) | 13 | 11 | 8 | 32 |
|
|
|
+| 8 | 日本(JPN) | 9 | 8 | 8 | 25 |
|
|
|
+| 9 | 意大利(ITA) | 8 | 9 | 10 | 27 |
|
|
|
+| 10 | 法国(FRA) | 7 | 16 | 20 | 43 |
|
|
|
+| 11 | 荷兰(NED) | 7 | 5 | 4 | 16 |
|
|
|
+| 12 | 乌克兰(UKR) | 7 | 4 | 11 | 22 |
|
|
|
+| 13 | 肯尼亚(KEN) | 6 | 4 | 6 | 16 |
|
|
|
+| 14 | 西班牙(ESP) | 5 | 11 | 3 | 19 |
|
|
|
+| 15 | 牙买加(JAM) | 5 | 4 | 2 | 11 |
|
|
|
```
|
|
|
|
|
|
The explanation of related methods and parameters are as follows:
|