This commit is contained in:
oneao committed 2025-06-11 21:33:35 +08:00
1 parent 6ab34e30b4
commit 3b70d0da3b
10 files changed
+106 -3214

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 557 KiB

After

Width:  |  Height:  |  Size: 558 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 KiB

After

Width:  |  Height:  |  Size: 547 KiB

@@ -1,5 +1,5 @@
{
"input_path": "C:/Users/Administrator/.paddlex/predict_input/general_ocr_002.png",
"input_path": "C:/Users/ONEAO/.paddlex/predict_input/general_ocr_002.png",
"page_index": null,
"model_settings": {
"use_doc_preprocessor": true,
@@ -691,39 +691,39 @@
"登机口于起飞前1O分钟关闭GATESCLOSE1OMINUTESBEFORE DEPARTURETIME"
],
"rec_scores": [
0.9971157908439636,
0.980294942855835,
0.9757581949234009,
0.9982836842536926,
0.9992735981941223,
0.9847624897956848,
0.999160885810852,
0.9843438267707825,
0.9987466931343079,
0.9556241631507874,
0.9915273189544678,
0.9323275089263916,
0.795452356338501,
0.9984054565429688,
0.9987124800682068,
0.9900163412094116,
0.9853596687316895,
0.9967120885848999,
0.998457133769989,
0.9965346455574036,
0.9475476145744324,
0.9983587265014648,
0.9896446466445923,
0.9970149397850037,
0.9870915412902832,
0.9862422943115234,
0.9981896281242371,
0.988991379737854,
0.9749718308448792,
0.9971947073936462,
0.9975488781929016,
0.9928285479545593,
0.9732762575149536
0.9971110224723816,
0.9802942276000977,
0.9757574796676636,
0.9982827305793762,
0.999271810054779,
0.9847618937492371,
0.9991598129272461,
0.984343409538269,
0.9987451434135437,
0.9556233286857605,
0.9915266633033752,
0.932326078414917,
0.7954467535018921,
0.9984052777290344,
0.9987090229988098,
0.9900156855583191,
0.9853563904762268,
0.996711790561676,
0.9984555244445801,
0.9965342879295349,
0.9475457072257996,
0.9983549118041992,
0.9896441102027893,
0.9970144629478455,
0.9870910048484802,
0.986241340637207,
0.9981892108917236,
0.9889904856681824,
0.974971354007721,
0.9971852898597717,
0.997547447681427,
0.9928280711174011,
0.9732754230499268
],
"rec_polys": [
[
Binary file not shown.

Before

Width:  |  Height:  |  Size: 355 KiB

After

Width:  |  Height:  |  Size: 348 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 KiB

After

Width:  |  Height:  |  Size: 309 KiB

+62 -62
View File
@@ -1271,68 +1271,68 @@
"fOrPACIFICINTERNATIONALLINES(PTE)LTDaSCarrier"
],
"rec_scores": [
0.9938989281654358,
0.972846508026123,
0.9881200194358826,
0.990138828754425,
0.9878993034362793,
0.9665594696998596,
0.9608297348022461,
0.9596557021141052,
0.9911079406738281,
0.9478586316108704,
0.9497116208076477,
0.9310017228126526,
0.9194626212120056,
0.9266672730445862,
0.9126367568969727,
0.8457321524620056,
0.9567287564277649,
0.9139136672019958,
0.9166555404663086,
0.9256715774536133,
0.9291625618934631,
0.9593757390975952,
0.9525982737541199,
0.954907238483429,
0.9660497307777405,
0.9483555555343628,
0.9553540349006653,
0.9510287642478943,
0.9745871424674988,
0.9968070387840271,
0.9835952520370483,
0.9761207699775696,
0.9424749612808228,
0.9949460625648499,
0.93708336353302,
0.964686393737793,
0.9537389278411865,
0.9928998351097107,
0.9603193998336792,
0.9215961694717407,
0.9375246167182922,
0.9979581236839294,
0.9746990203857422,
0.9987379908561707,
0.9981704950332642,
0.9976575970649719,
0.9971591830253601,
0.9966489672660828,
0.9627765417098999,
0.9630685448646545,
0.9711615443229675,
0.9970062375068665,
0.9598766565322876,
0.9645793437957764,
0.9334232211112976,
0.9843224287033081,
0.9368222951889038,
0.9272780418395996,
0.9519227743148804,
0.9674265384674072,
0.957920253276825,
0.9185543656349182
0.993898332118988,
0.9728460311889648,
0.9881201982498169,
0.9901384711265564,
0.9878991842269897,
0.9665590524673462,
0.960828423500061,
0.9596601128578186,
0.9911072850227356,
0.9478574991226196,
0.9497101902961731,
0.9310002326965332,
0.9194604754447937,
0.9266656041145325,
0.9126342535018921,
0.8457291722297668,
0.9567282795906067,
0.9139121770858765,
0.9166549444198608,
0.9256700873374939,
0.9291608333587646,
0.959374725818634,
0.9525966644287109,
0.9549065232276917,
0.9660487771034241,
0.9483537673950195,
0.955353319644928,
0.951028048992157,
0.9745868444442749,
0.9968065023422241,
0.9835948348045349,
0.9761202335357666,
0.9424735307693481,
0.9949454069137573,
0.9370826482772827,
0.9646853804588318,
0.9537377953529358,
0.9928991794586182,
0.9603179693222046,
0.9215952754020691,
0.9375240206718445,
0.9979577660560608,
0.9746984839439392,
0.9987377524375916,
0.9981698989868164,
0.9976568818092346,
0.9971590042114258,
0.996648907661438,
0.9627759456634521,
0.9630667567253113,
0.9711611866950989,
0.9970054030418396,
0.9598758220672607,
0.9645780920982361,
0.9334222674369812,
0.9843217730522156,
0.9368213415145874,
0.927276611328125,
0.9519212245941162,
0.9674260020256042,
0.9579195976257324,
0.9185529947280884
],
"rec_polys": [
[
Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 KiB

File diff suppressed because it is too large. Load diff
+10 -19
View File
@@ -1,21 +1,12 @@
# from paddleocr import PaddleOCR
# # 初始化 PaddleOCR 实例
# ocr = PaddleOCR(
# use_doc_orientation_classify=False,
# use_doc_unwarping=False,
# use_textline_orientation=False)
# # 对示例图像执行 OCR 推理
# result = ocr.predict(
# input="test1.png")
# # 可视化结果并保存 json 结果
# for res in result:
# res.print()
# res.save_to_img("output")
# res.save_to_json("output")
from paddleocr import PPChatOCRv4Doc
import paddle
# 检查 PaddlePaddle 是否安装成功
# 打印是否支持 GPU
print("是否支持 GPU:", paddle.is_compiled_with_cuda())
# 如果支持,再看看当前是否在使用 GPU
if paddle.is_compiled_with_cuda():
print("当前是否使用 GPU:", paddle.device.get_device())
chat_bot_config = {
"module_name": "chat_bot",
@@ -59,7 +50,7 @@ if use_mllm:
mllm_predict_res = pipeline.mllm_pred(
input="test1.png",
key_list=["Gross Weight"],
key_list=["Shipper"],
mllm_chat_bot_config=mllm_chat_bot_config,
)
mllm_predict_info = mllm_predict_res["mllm_res"]
@@ -73,7 +64,7 @@ vector_info = pipeline.build_vector(
visual_info_list, flag_save_bytes_vector=True, retriever_config=retriever_config
)
chat_result = pipeline.chat(
key_list=["Gross Weight"],
key_list=["Shipper"],
visual_info=visual_info_list,
vector_info=vector_info,
mllm_predict_info=mllm_predict_info,