Zhang Zelun 6 달 전
부모
커밋
7052cbb7d2

+ 19 - 19
docs/module_usage/tutorials/vlm_modules/doc_vlm.en.md

@@ -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:

+ 3 - 3
docs/module_usage/tutorials/vlm_modules/doc_vlm.md

@@ -46,9 +46,9 @@ comments: true
 
 ```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": "识别这份表格的内容"},
+    input={"image": "medal_table.png", "query": "识别这份表格的内容, 以markdown格式输出"},
     batch_size=1
 )
 for res in results:
@@ -59,7 +59,7 @@ for res in results:
 运行后,得到的结果为:
 
 ```bash
-{'res': {'image': 'medal_table.png', 'query': '识别这份表格的内容', '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'}}
+{'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'}}
 ```
 运行结果参数含义如下:
 - `image`: 表示输入待预测图像的路径

+ 2 - 2
docs/pipeline_usage/tutorials/vlm_pipelines/doc_understanding.en.md

@@ -57,7 +57,7 @@ pipeline = create_pipeline(pipeline="doc_understanding")
 output = pipeline.predict(
     {
         "image": "https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/medal_table.png",
-        "query": "Identify the contents of this table"
+        "query": "识别这份表格的内容, 以markdown格式输出"
     }
 )
 for res in output:
@@ -255,7 +255,7 @@ pipeline = create_pipeline(pipeline="./my_path/doc_understanding.yaml")
 output = pipeline.predict(
     {
         "image": "https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/medal_table.png",
-        "query": "Identify the contents of this table"
+        "query": "识别这份表格的内容, 以markdown格式输出"
     }
 )
 for res in output:

+ 2 - 2
docs/pipeline_usage/tutorials/vlm_pipelines/doc_understanding.md

@@ -58,7 +58,7 @@ pipeline = create_pipeline(pipeline="doc_understanding")
 output = pipeline.predict(
     {
         "image": "https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/medal_table.png",
-        "query": "识别这份表格的内容"
+        "query": "识别这份表格的内容, 以markdown格式输出"
     }
 )
 for res in output:
@@ -256,7 +256,7 @@ pipeline = create_pipeline(pipeline="./my_path/doc_understanding.yaml")
 output = pipeline.predict(
     {
         "image": "https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/medal_table.png",
-        "query": "识别这份表格的内容"
+        "query": "识别这份表格的内容, 以markdown格式输出"
     }
 )
 for res in output:

+ 1 - 1
paddlex/configs/modules/doc_vlm/PP-DocBee2-3B.yaml

@@ -9,6 +9,6 @@ Predict:
   model_dir: "/path/to/PP-DocBee2-3B"
   input:
     image: "https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/medal_table.png"
-    query: "识别这份表格的内容"
+    query: "识别这份表格的内容, 以markdown格式输出"
   kernel_option:
     run_mode: paddle