PaddlePaddle / PaddleOCR

Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
https://paddlepaddle.github.io/PaddleOCR/
Apache License 2.0
44.24k stars 7.82k forks source link

按照文档,SER任务运行正常,但是RE任务运行报错,ValueError: (InvalidArgument) Currently, Tensor.__indices__() only allows indexing by Integers, Slices, Ellipsis, None, tuples of these types and list of Bool and Integers, but received bool in 1th slice item (at ..\paddle/fluid/pybind/slice_utils.h:298) #11076

Closed amingze closed 1 year ago

amingze commented 1 year ago

请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem

[2023/10/13 09:41:54] ppocr INFO: ** ser config ** [2023/10/13 09:41:54] ppocr INFO: Architecture : [2023/10/13 09:41:54] ppocr INFO: Backbone : [2023/10/13 09:41:54] ppocr INFO: checkpoints : ./pretrained_model/ser_vi_layoutxlm_xfund_pretrained/best_accuracy [2023/10/13 09:41:54] ppocr INFO: mode : vi [2023/10/13 09:41:54] ppocr INFO: name : LayoutXLMForSer [2023/10/13 09:41:54] ppocr INFO: num_classes : 7 [2023/10/13 09:41:54] ppocr INFO: pretrained : True [2023/10/13 09:41:54] ppocr INFO: Transform : None [2023/10/13 09:41:54] ppocr INFO: algorithm : LayoutXLM [2023/10/13 09:41:54] ppocr INFO: model_type : kie [2023/10/13 09:41:54] ppocr INFO: Eval : [2023/10/13 09:41:54] ppocr INFO: dataset : [2023/10/13 09:41:54] ppocr INFO: data_dir : train_data/XFUND/zh_val/image [2023/10/13 09:41:54] ppocr INFO: label_file_list : ['train_data/XFUND/zh_val/val.json'] [2023/10/13 09:41:54] ppocr INFO: name : SimpleDataSet [2023/10/13 09:41:54] ppocr INFO: transforms : [2023/10/13 09:41:54] ppocr INFO: DecodeImage : [2023/10/13 09:41:54] ppocr INFO: channel_first : False [2023/10/13 09:41:54] ppocr INFO: img_mode : RGB [2023/10/13 09:41:54] ppocr INFO: VQATokenLabelEncode : [2023/10/13 09:41:54] ppocr INFO: algorithm : LayoutXLM [2023/10/13 09:41:54] ppocr INFO: class_path : train_data/XFUND/class_list_xfun.txt [2023/10/13 09:41:54] ppocr INFO: contains_re : False [2023/10/13 09:41:54] ppocr INFO: order_method : tb-yx [2023/10/13 09:41:54] ppocr INFO: use_textline_bbox_info : True [2023/10/13 09:41:54] ppocr INFO: VQATokenPad : [2023/10/13 09:41:54] ppocr INFO: max_seq_len : 512 [2023/10/13 09:41:54] ppocr INFO: return_attention_mask : True [2023/10/13 09:41:54] ppocr INFO: VQASerTokenChunk : [2023/10/13 09:41:54] ppocr INFO: max_seq_len : 512 [2023/10/13 09:41:54] ppocr INFO: Resize : [2023/10/13 09:41:54] ppocr INFO: size : [224, 224] [2023/10/13 09:41:54] ppocr INFO: NormalizeImage : [2023/10/13 09:41:54] ppocr INFO: mean : [123.675, 116.28, 103.53] [2023/10/13 09:41:54] ppocr INFO: order : hwc [2023/10/13 09:41:54] ppocr INFO: scale : 1 [2023/10/13 09:41:54] ppocr INFO: std : [58.395, 57.12, 57.375] [2023/10/13 09:41:54] ppocr INFO: ToCHWImage : None [2023/10/13 09:41:54] ppocr INFO: KeepKeys : [2023/10/13 09:41:54] ppocr INFO: keep_keys : ['input_ids', 'bbox', 'attention_mask', 'token_type_ids', 'image', 'labels'] [2023/10/13 09:41:54] ppocr INFO: loader : [2023/10/13 09:41:54] ppocr INFO: batch_size_per_card : 8 [2023/10/13 09:41:54] ppocr INFO: drop_last : False [2023/10/13 09:41:54] ppocr INFO: num_workers : 4 [2023/10/13 09:41:54] ppocr INFO: shuffle : False [2023/10/13 09:41:54] ppocr INFO: Global : [2023/10/13 09:41:54] ppocr INFO: amp_custom_white_list : ['scale', 'concat', 'elementwise_add'] [2023/10/13 09:41:54] ppocr INFO: cal_metric_during_train : False [2023/10/13 09:41:54] ppocr INFO: d2s_train_image_shape : [3, 224, 224] [2023/10/13 09:41:54] ppocr INFO: epoch_num : 200 [2023/10/13 09:41:54] ppocr INFO: eval_batch_step : [0, 19] [2023/10/13 09:41:54] ppocr INFO: infer_img : ppstructure/docs/kie/input/zh_val_42.jpg [2023/10/13 09:41:54] ppocr INFO: kie_det_model_dir : None [2023/10/13 09:41:54] ppocr INFO: kie_rec_model_dir : None [2023/10/13 09:41:54] ppocr INFO: log_smooth_window : 10 [2023/10/13 09:41:54] ppocr INFO: print_batch_step : 10 [2023/10/13 09:41:54] ppocr INFO: save_epoch_step : 2000 [2023/10/13 09:41:54] ppocr INFO: save_inference_dir : None [2023/10/13 09:41:54] ppocr INFO: save_model_dir : ./output/ser_vi_layoutxlm_xfund_zh [2023/10/13 09:41:54] ppocr INFO: save_res_path : ./output/ser/xfund_zh/res [2023/10/13 09:41:54] ppocr INFO: seed : 2022 [2023/10/13 09:41:54] ppocr INFO: use_gpu : True [2023/10/13 09:41:54] ppocr INFO: use_visualdl : False [2023/10/13 09:41:54] ppocr INFO: Loss : [2023/10/13 09:41:54] ppocr INFO: key : backbone_out [2023/10/13 09:41:54] ppocr INFO: name : VQASerTokenLayoutLMLoss [2023/10/13 09:41:54] ppocr INFO: num_classes : 7 [2023/10/13 09:41:54] ppocr INFO: Metric : [2023/10/13 09:41:54] ppocr INFO: main_indicator : hmean [2023/10/13 09:41:54] ppocr INFO: name : VQASerTokenMetric [2023/10/13 09:41:54] ppocr INFO: Optimizer : [2023/10/13 09:41:54] ppocr INFO: beta1 : 0.9 [2023/10/13 09:41:54] ppocr INFO: beta2 : 0.999 [2023/10/13 09:41:54] ppocr INFO: lr : [2023/10/13 09:41:54] ppocr INFO: epochs : 200 [2023/10/13 09:41:54] ppocr INFO: learning_rate : 5e-05 [2023/10/13 09:41:54] ppocr INFO: name : Linear [2023/10/13 09:41:54] ppocr INFO: warmup_epoch : 2 [2023/10/13 09:41:54] ppocr INFO: name : AdamW [2023/10/13 09:41:54] ppocr INFO: regularizer : [2023/10/13 09:41:54] ppocr INFO: factor : 0.0 [2023/10/13 09:41:54] ppocr INFO: name : L2 [2023/10/13 09:41:54] ppocr INFO: PostProcess : [2023/10/13 09:41:54] ppocr INFO: class_path : train_data/XFUND/class_list_xfun.txt [2023/10/13 09:41:54] ppocr INFO: name : VQASerTokenLayoutLMPostProcess [2023/10/13 09:41:54] ppocr INFO: Train : [2023/10/13 09:41:54] ppocr INFO: dataset : [2023/10/13 09:41:54] ppocr INFO: data_dir : train_data/XFUND/zh_train/image [2023/10/13 09:41:54] ppocr INFO: label_file_list : ['train_data/XFUND/zh_train/train.json'] [2023/10/13 09:41:54] ppocr INFO: name : SimpleDataSet [2023/10/13 09:41:54] ppocr INFO: ratio_list : [1.0] [2023/10/13 09:41:54] ppocr INFO: transforms : [2023/10/13 09:41:54] ppocr INFO: DecodeImage : [2023/10/13 09:41:54] ppocr INFO: channel_first : False [2023/10/13 09:41:54] ppocr INFO: img_mode : RGB [2023/10/13 09:41:54] ppocr INFO: VQATokenLabelEncode : [2023/10/13 09:41:54] ppocr INFO: algorithm : LayoutXLM [2023/10/13 09:41:54] ppocr INFO: class_path : train_data/XFUND/class_list_xfun.txt [2023/10/13 09:41:54] ppocr INFO: contains_re : False [2023/10/13 09:41:54] ppocr INFO: order_method : tb-yx [2023/10/13 09:41:54] ppocr INFO: use_textline_bbox_info : True [2023/10/13 09:41:54] ppocr INFO: VQATokenPad : [2023/10/13 09:41:54] ppocr INFO: max_seq_len : 512 [2023/10/13 09:41:54] ppocr INFO: return_attention_mask : True [2023/10/13 09:41:54] ppocr INFO: VQASerTokenChunk : [2023/10/13 09:41:54] ppocr INFO: max_seq_len : 512 [2023/10/13 09:41:54] ppocr INFO: Resize : [2023/10/13 09:41:54] ppocr INFO: size : [224, 224] [2023/10/13 09:41:54] ppocr INFO: NormalizeImage : [2023/10/13 09:41:54] ppocr INFO: mean : [123.675, 116.28, 103.53] [2023/10/13 09:41:54] ppocr INFO: order : hwc [2023/10/13 09:41:54] ppocr INFO: scale : 1 [2023/10/13 09:41:54] ppocr INFO: std : [58.395, 57.12, 57.375] [2023/10/13 09:41:54] ppocr INFO: ToCHWImage : None [2023/10/13 09:41:54] ppocr INFO: KeepKeys : [2023/10/13 09:41:54] ppocr INFO: keep_keys : ['input_ids', 'bbox', 'attention_mask', 'token_type_ids', 'image', 'labels'] [2023/10/13 09:41:54] ppocr INFO: loader : [2023/10/13 09:41:54] ppocr INFO: batch_size_per_card : 8 [2023/10/13 09:41:54] ppocr INFO: drop_last : False [2023/10/13 09:41:54] ppocr INFO: num_workers : 4 [2023/10/13 09:41:54] ppocr INFO: shuffle : True [2023/10/13 09:41:54] ppocr INFO: train with paddle 2.5.1 and device Place(gpu:0) [2023-10-13 09:41:55,592] [ INFO] - Loading configuration file ./pretrained_model/ser_vi_layoutxlm_xfund_pretrained/best_accuracy\config.json [2023-10-13 09:41:55,593] [ INFO] - Loading weights file ./pretrained_model/ser_vi_layoutxlm_xfund_pretrained/best_accuracy\model_state.pdparams [2023-10-13 09:41:56,150] [ INFO] - Loaded weights file from disk, setting weights to model. W1013 09:41:56.152549 20880 gpu_resources.cc:119] Please NOTE: device: 0, GPU Compute Capability: 8.9, Driver API Version: 12.2, Runtime API Version: 11.8 W1013 09:41:56.156495 20880 gpu_resources.cc:149] device: 0, cuDNN Version: 8.9. [2023-10-13 09:41:58,145] [ INFO] - All model checkpoint weights were used when initializing LayoutXLMForTokenClassification.

[2023-10-13 09:41:58,145] [ INFO] - All the weights of LayoutXLMForTokenClassification were initialized from the model checkpoint at ./pretrained_model/ser_vi_layoutxlm_xfund_pretrained/best_accuracy. If your task is similar to the task the model of the checkpoint was trained on, you can already use LayoutXLMForTokenClassification for predictions without further training. [2023/10/13 09:41:58] ppocr INFO: resume from ./pretrained_model/ser_vi_layoutxlm_xfund_pretrained/best_accuracy [2023-10-13 09:42:01,419] [ INFO] - Already cached C:\Users\amingze.paddlenlp\models\layoutxlm-base-uncased\sentencepiece.bpe.model [2023-10-13 09:42:01,703] [ INFO] - tokenizer config file saved in C:\Users\amingze.paddlenlp\models\layoutxlm-base-uncased\tokenizer_config.json [2023-10-13 09:42:01,704] [ INFO] - Special tokens file saved in C:\Users\amingze.paddlenlp\models\layoutxlm-base-uncased\special_tokens_map.json [2023-10-13 09:42:01,706] [ INFO] - Loading configuration file ./pretrained_model/re_vi_layoutxlm_xfund_pretrained/best_accuracy\config.json [2023-10-13 09:42:01,707] [ INFO] - Loading weights file ./pretrained_model/re_vi_layoutxlm_xfund_pretrained/best_accuracy\model_state.pdparams [2023-10-13 09:42:02,401] [ INFO] - Loaded weights file from disk, setting weights to model. [2023-10-13 09:42:03,304] [ INFO] - All model checkpoint weights were used when initializing LayoutXLMForRelationExtraction.

[2023-10-13 09:42:03,304] [ INFO] - All the weights of LayoutXLMForRelationExtraction were initialized from the model checkpoint at ./pretrained_model/re_vi_layoutxlm_xfund_pretrained/best_accuracy. If your task is similar to the task the model of the checkpoint was trained on, you can already use LayoutXLMForRelationExtraction for predictions without further training. [2023/10/13 09:42:03] ppocr INFO: resume from ./pretrained_model/re_vi_layoutxlm_xfund_pretrained/best_accuracy Corrupt JPEG data: premature end of data segment Traceback (most recent call last): File "D:\code\paddle\PaddleOCR\tools\infer_kie_token_ser_re.py", line 217, in result = ser_re_engine(data) ^^^^^^^^^^^^^^^^^^^ File "D:\code\paddle\PaddleOCR\tools\infer_kie_token_ser_re.py", line 151, in call preds = self.model(re_input) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\amingze\anaconda3\Lib\site-packages\paddle\nn\layer\layers.py", line 1254, in call return self.forward(*inputs, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\code\paddle\PaddleOCR\ppocr\modeling\architectures\base_model.py", line 86, in forward x = self.backbone(x) ^^^^^^^^^^^^^^^^ File "C:\Users\amingze\anaconda3\Lib\site-packages\paddle\nn\layer\layers.py", line 1254, in call return self.forward(*inputs, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\code\paddle\PaddleOCR\ppocr\modeling\backbones\vqa_layoutlm.py", line 227, in forward x = self.model( ^^^^^^^^^^^ File "C:\Users\amingze\anaconda3\Lib\site-packages\paddle\nn\layer\layers.py", line 1254, in call return self.forward(inputs, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\amingze\anaconda3\Lib\site-packages\paddlenlp\transformers\layoutxlm\modeling.py", line 1330, in forward loss, pred_relations = self.extractor(sequence_output, entities, relations) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\amingze\anaconda3\Lib\site-packages\paddle\nn\layer\layers.py", line 1254, in call return self.forward(*inputs, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\amingze\anaconda3\Lib\site-packages\paddlenlp\transformers\layoutxlm\modeling.py", line 1224, in forward relations, entities = self.build_relation(relations, entities) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\amingze\anaconda3\Lib\site-packages\paddlenlp\transformers\layoutxlm\modeling.py", line 1186, in build_relation negative_relations = all_possible_relations[negative_mask]


  File "C:\Users\amingze\anaconda3\Lib\site-packages\paddle\fluid\dygraph\tensor_patch_methods.py", line 747, in __getitem__
    return self._getitem_index_not_tensor(item)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: (InvalidArgument) Currently, Tensor.__indices__() only allows indexing by Integers, Slices, Ellipsis, None, tuples of these types and list of Bool and Integers, but received bool in 1th slice item (at ..\paddle/fluid/pybind/slice_utils.h:298)

```
以下是我的pip list
```
aiobotocore                   2.5.0
aiofiles                      22.1.0
aiohttp                       3.8.5
aioitertools                  0.7.1
aiosignal                     1.2.0
aiosqlite                     0.18.0
alabaster                     0.7.12
anaconda-anon-usage           0.4.2
anaconda-catalogs             0.2.0
anaconda-client               1.12.1
anaconda-cloud-auth           0.1.3
anaconda-navigator            2.5.0
anaconda-project              0.11.1
anyio                         3.7.1
appdirs                       1.4.4
argon2-cffi                   21.3.0
argon2-cffi-bindings          21.2.0
arrow                         1.2.3
astor                         0.8.1
astroid                       2.14.2
astropy                       5.1
asttokens                     2.0.5
async-timeout                 4.0.2
atomicwrites                  1.4.0
attrdict                      2.0.1
attrdict3                     2.0.2
attrs                         22.1.0
Automat                       20.2.0
autopep8                      1.6.0
Babel                         2.13.0
backcall                      0.2.0
backports.functools-lru-cache 1.6.4
backports.tempfile            1.0
backports.weakref             1.0.post1
bce-python-sdk                0.8.90
bcrypt                        3.2.0
beautifulsoup4                4.12.2
binaryornot                   0.4.4
black                         0.0
bleach                        4.1.0
bokeh                         3.2.1
boltons                       23.0.0
botocore                      1.29.76
Bottleneck                    1.3.5
brotlipy                      0.7.0
cachetools                    5.3.1
certifi                       2023.7.22
cffi                          1.15.1
chardet                       4.0.0
charset-normalizer            2.0.4
click                         8.0.4
cloudpickle                   2.2.1
clyent                        1.2.2
colorama                      0.4.6
colorcet                      3.0.1
colorlog                      6.7.0
comm                          0.1.2
conda                         23.7.4
conda-build                   3.26.1
conda-content-trust           0.2.0
conda_index                   0.3.0
conda-libmamba-solver         23.7.0
conda-pack                    0.6.0
conda-package-handling        2.2.0
conda_package_streaming       0.9.0
conda-repo-cli                1.0.75
conda-token                   0.4.0
conda-verify                  3.4.2
constantly                    15.1.0
contourpy                     1.0.5
cookiecutter                  1.7.3
cryptography                  41.0.3
cssselect                     1.1.0
cssutils                      2.9.0
cycler                        0.11.0
Cython                        3.0.3
cytoolz                       0.12.0
daal4py                       2023.1.1
dask                          2023.6.0
datasets                      2.12.0
datashader                    0.15.2
datashape                     0.5.4
debugpy                       1.6.7
decorator                     5.1.1
defusedxml                    0.7.1
diff-match-patch              20200713
dill                          0.3.4
distributed                   2023.6.0
docstring-to-markdown         0.11
docutils                      0.18.1
entrypoints                   0.4
et-xmlfile                    1.1.0
executing                     0.8.3
fastapi                       0.103.2
fastjsonschema                2.16.2
filelock                      3.9.0
flake8                        6.0.0
Flask                         2.2.2
flask-babel                   4.0.0
fonttools                     4.25.0
frozenlist                    1.3.3
fsspec                        2023.4.0
future                        0.18.3
gensim                        4.3.0
glob2                         0.7
greenlet                      2.0.1
h11                           0.14.0
h5py                          3.9.0
HeapDict                      1.0.1
holoviews                     1.17.1
httpcore                      0.18.0
httpx                         0.25.0
huggingface-hub               0.15.1
hvplot                        0.8.4
hyperlink                     21.0.0
idna                          3.4
imagecodecs                   2023.1.23
imageio                       2.26.0
imagesize                     1.4.1
imbalanced-learn              0.10.1
imgaug                        0.4.0
importlib-metadata            6.0.0
incremental                   21.3.0
inflection                    0.5.1
iniconfig                     1.1.1
intake                        0.6.8
intervaltree                  3.1.0
ipykernel                     6.25.0
ipython                       8.15.0
ipython-genutils              0.2.0
ipywidgets                    8.0.4
isort                         5.9.3
itemadapter                   0.3.0
itemloaders                   1.0.4
itsdangerous                  2.0.1
jaraco.classes                3.2.1
jedi                          0.18.1
jellyfish                     1.0.1
jieba                         0.42.1
Jinja2                        3.1.2
jinja2-time                   0.2.0
jmespath                      0.10.0
joblib                        1.2.0
json5                         0.9.6
jsonpatch                     1.32
jsonpointer                   2.1
jsonschema                    4.17.3
jupyter                       1.0.0
jupyter_client                7.4.9
jupyter-console               6.6.3
jupyter_core                  5.3.0
jupyter-events                0.6.3
jupyter-server                1.23.4
jupyter_server_fileid         0.9.0
jupyter_server_ydoc           0.8.0
jupyter-ydoc                  0.2.4
jupyterlab                    3.6.3
jupyterlab-pygments           0.1.2
jupyterlab_server             2.22.0
jupyterlab-widgets            3.0.5
kaleido                       0.2.1
keyring                       23.13.1
kiwisolver                    1.4.4
lazy_loader                   0.2
lazy-object-proxy             1.6.0
libarchive-c                  2.9
libmambapy                    1.5.1
linkify-it-py                 2.0.0
llvmlite                      0.40.0
lmdb                          1.4.1
locket                        1.0.0
lxml                          4.9.3
lz4                           4.3.2
Markdown                      3.4.1
markdown-it-py                2.2.0
MarkupSafe                    2.1.1
matplotlib                    3.7.2
matplotlib-inline             0.1.6
mccabe                        0.7.0
mdit-py-plugins               0.3.0
mdurl                         0.1.0
menuinst                      1.4.19
mistune                       0.8.4
mkl-fft                       1.3.8
mkl-random                    1.2.4
mkl-service                   2.4.0
more-itertools                8.12.0
mpmath                        1.3.0
msgpack                       1.0.3
multidict                     6.0.2
multipledispatch              0.6.0
multiprocess                  0.70.12.2
munkres                       1.1.4
mypy-extensions               1.0.0
navigator-updater             0.4.0
nbclassic                     0.5.5
nbclient                      0.5.13
nbconvert                     6.5.4
nbformat                      5.9.2
nest-asyncio                  1.5.6
networkx                      3.1
nltk                          3.8.1
notebook                      6.5.4
notebook_shim                 0.2.2
numba                         0.57.1
numexpr                       2.8.4
numpy                         1.24.3
numpydoc                      1.5.0
onnx                          1.14.1
opencv-contrib-python         4.6.0.66
opencv-python                 4.6.0.66
openpyxl                      3.0.10
opt-einsum                    3.3.0
packaging                     23.1
paddle-bfloat                 0.1.7
paddle2onnx                   0.8.1
paddlefsl                     1.1.0
paddlenlp                     2.6.1
paddleocr                     2.6.0.1
paddlepaddle-gpu              2.5.1
pandas                        2.0.3
pandocfilters                 1.5.0
panel                         1.2.3
param                         1.13.0
paramiko                      2.8.1
parsel                        1.6.0
parso                         0.8.3
partd                         1.4.0
pathlib                       1.0.1
pathspec                      0.10.3
patsy                         0.5.3
pep8                          1.7.1
pexpect                       4.8.0
pickleshare                   0.7.5
Pillow                        9.4.0
pip                           23.2.1
pkce                          1.0.3
pkginfo                       1.9.6
platformdirs                  3.10.0
plotly                        5.9.0
pluggy                        1.0.0
ply                           3.11
poyo                          0.5.0
premailer                     3.10.0
prometheus-client             0.14.1
prompt-toolkit                3.0.36
Protego                       0.1.16
protobuf                      3.20.2
psutil                        5.9.0
ptyprocess                    0.7.0
pure-eval                     0.2.2
py-cpuinfo                    8.0.0
pyarrow                       11.0.0
pyasn1                        0.4.8
pyasn1-modules                0.2.8
pyclipper                     1.3.0.post5
pycodestyle                   2.10.0
pycosat                       0.6.4
pycparser                     2.21
pycryptodome                  3.19.0
pyct                          0.5.0
pycurl                        7.45.2
pydantic                      1.10.8
PyDispatcher                  2.0.5
pydocstyle                    6.3.0
pyerfa                        2.0.0
pyflakes                      3.0.1
Pygments                      2.15.1
PyJWT                         2.4.0
pylint                        2.16.2
pylint-venv                   2.3.0
pyls-spyder                   0.4.0
PyMuPDF                       1.21.1
PyMuPDFb                      1.23.3
PyNaCl                        1.5.0
pyodbc                        4.0.34
pyOpenSSL                     23.2.0
pypandoc                      1.11
pyparsing                     3.0.9
PyQt5                         5.15.7
PyQt5-sip                     12.11.0
PyQtWebEngine                 5.15.4
pyrsistent                    0.18.0
PySocks                       1.7.1
pytest                        7.4.0
python-dateutil               2.8.2
python-docx                   1.0.1
python-dotenv                 0.21.0
python-json-logger            2.0.7
python-lsp-black              1.2.1
python-lsp-jsonrpc            1.0.0
python-lsp-server             1.7.2
python-slugify                5.0.2
python-snappy                 0.6.1
pytoolconfig                  1.2.5
pytz                          2023.3.post1
pyviz-comms                   2.3.0
PyWavelets                    1.4.1
pywin32                       305.1
pywin32-ctypes                0.2.0
pywinpty                      2.0.10
PyYAML                        6.0
pyzmq                         23.2.0
QDarkStyle                    3.0.2
qstylizer                     0.2.2
QtAwesome                     1.2.2
qtconsole                     5.4.2
QtPy                          2.2.0
queuelib                      1.5.0
rapidfuzz                     3.4.0
rarfile                       4.1
regex                         2022.7.9
requests                      2.31.0
requests-file                 1.5.1
requests-toolbelt             1.0.0
responses                     0.13.3
rfc3339-validator             0.1.4
rfc3986-validator             0.1.1
rich                          13.6.0
rope                          1.7.0
Rtree                         1.0.1
ruamel.yaml                   0.17.21
ruamel-yaml-conda             0.17.21
s3fs                          2023.4.0
safetensors                   0.3.2
scikit-image                  0.20.0
scikit-learn                  1.3.0
scikit-learn-intelex          20230426.121932
scipy                         1.11.1
Scrapy                        2.8.0
seaborn                       0.12.2
Send2Trash                    1.8.0
sentencepiece                 0.1.99
seqeval                       1.2.2
service-identity              18.1.0
setuptools                    68.0.0
shapely                       2.0.2
sip                           6.6.2
six                           1.16.0
smart-open                    5.2.1
sniffio                       1.2.0
snowballstemmer               2.2.0
sortedcontainers              2.4.0
soupsieve                     2.4
Sphinx                        5.0.2
sphinxcontrib-applehelp       1.0.2
sphinxcontrib-devhelp         1.0.2
sphinxcontrib-htmlhelp        2.0.0
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.5
spyder                        5.4.3
spyder-kernels                2.4.4
SQLAlchemy                    1.4.39
stack-data                    0.2.0
starlette                     0.27.0
statsmodels                   0.14.0
sympy                         1.11.1
tables                        3.8.0
tabulate                      0.8.10
TBB                           0.2
tblib                         1.7.0
tenacity                      8.2.2
terminado                     0.17.1
text-unidecode                1.3
textdistance                  4.2.1
threadpoolctl                 2.2.0
three-merge                   0.1.1
tifffile                      2023.4.12
tinycss2                      1.2.1
tldextract                    3.2.0
tokenizers                    0.13.2
toml                          0.10.2
tomlkit                       0.11.1
toolz                         0.12.0
tornado                       6.3.2
tqdm                          4.65.0
traitlets                     5.7.1
transformers                  4.32.1
Twisted                       22.10.0
twisted-iocpsupport           1.0.2
typer                         0.9.0
typing_extensions             4.7.1
tzdata                        2023.3
uc-micro-py                   1.0.1
ujson                         5.4.0
Unidecode                     1.2.0
urllib3                       1.26.16
uvicorn                       0.23.2
visualdl                      2.5.3
w3lib                         1.21.0
watchdog                      2.1.6
wcwidth                       0.2.5
webencodings                  0.5.1
websocket-client              0.58.0
Werkzeug                      2.2.3
whatthepatch                  1.0.2
wheel                         0.38.4
widgetsnbextension            4.0.5
win-inet-pton                 1.1.0
wrapt                         1.14.1
xarray                        2023.6.0
xlwings                       0.29.1
xxhash                        2.0.2
xyzservices                   2022.9.0
y-py                          0.5.9
yacs                          0.1.8
yapf                          0.31.0
yarl                          1.8.1
ypy-websocket                 0.8.2
zict                          2.2.0
zipp                          3.11.0
zope.interface                5.4.0
zstandard                     0.19.0
```
我们提供了AceIssueSolver来帮助你解答问题,你是否想要它来解答(请填写yes/no)?/We provide AceIssueSolver to solve issues, do you want it? (Please write yes/no): Yes

我按 https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/ppstructure/kie/README_ch.md
里的文档操作运行,SER任务能正常运行,但是RE任务报错,我不清楚我搞错了什么,我可能需要一些帮助
amingze commented 1 year ago

解决了,paddlepaddle不要用最新的2.5.1的版本,可以用2.4.2的版本,并且降级paddlenlp的版本到2.5.0

pip uninstall paddlepaddle-gpu
python -m pip install paddlepaddle-gpu==2.4.1.post117 -f https://www.paddlepaddle.org.cn/whl/windows/mkl/avx/stable.html
pip uninstall paddlenlp
pip install paddlenlp==2.5.0  -i https://pypi.tuna.tsinghua.edu.cn/simple
amingze commented 1 year ago

以下是我的pip list

aiohttp               3.8.6
aiosignal             1.3.1
annotated-types       0.6.0
anyio                 3.7.1
astor                 0.8.1
async-timeout         4.0.3
attrdict              2.0.1
attrs                 23.1.0
Babel                 2.13.0
bce-python-sdk        0.8.90
beautifulsoup4        4.12.2
blinker               1.6.3
cachetools            5.3.1
certifi               2023.7.22
charset-normalizer    3.3.0
click                 8.1.7
colorama              0.4.6
colorlog              6.7.0
contourpy             1.1.1
cssselect             1.2.0
cssutils              2.9.0
cycler                0.12.1
Cython                3.0.3
datasets              2.14.5
decorator             5.1.1
dill                  0.3.4
et-xmlfile            1.1.0
exceptiongroup        1.1.3
fastapi               0.103.2
filelock              3.12.4
fire                  0.5.0
Flask                 3.0.0
flask-babel           4.0.0
fonttools             4.43.1
frozenlist            1.4.0
fsspec                2023.6.0
future                0.18.3
h11                   0.14.0
httpcore              0.18.0
httpx                 0.25.0
huggingface-hub       0.18.0
idna                  3.4
imageio               2.31.5
imgaug                0.4.0
importlib-metadata    6.8.0
importlib-resources   6.1.0
itsdangerous          2.1.2
jieba                 0.42.1
Jinja2                3.1.2
joblib                1.3.2
kiwisolver            1.4.5
lanms-neo             1.0.2
lazy_loader           0.3
lmdb                  1.4.1
lxml                  4.9.3
markdown-it-py        3.0.0
MarkupSafe            2.1.3
matplotlib            3.7.3
mdurl                 0.1.2
multidict             6.0.4
multiprocess          0.70.12.2
networkx              3.1
numpy                 1.24.4
onnx                  1.14.1
opencv-contrib-python 4.6.0.66
opencv-python         4.6.0.66
openpyxl              3.1.2
opt-einsum            3.3.0
packaging             23.2
paddle-bfloat         0.1.7
paddle2onnx           1.0.6
paddlefsl             1.1.0
paddlenlp             2.5.0
paddleocr             2.7.0.3
paddlepaddle-gpu      2.4.2.post117
pandas                2.0.3
pdf2docx              0.5.6
Pillow                10.0.1
pip                   23.2.1
Polygon3              3.0.9.1
premailer             3.10.0
protobuf              3.20.0
psutil                5.9.5
pyarrow               13.0.0
pyclipper             1.3.0.post5
pycryptodome          3.19.0
pydantic              2.4.2
pydantic_core         2.10.1
Pygments              2.16.1
PyMuPDF               1.20.2
pypandoc              1.11
pyparsing             3.1.1
python-dateutil       2.8.2
python-docx           1.0.1
pytz                  2023.3.post1
PyWavelets            1.4.1
PyYAML                6.0.1
rapidfuzz             3.4.0
rarfile               4.1
requests              2.31.0
rich                  13.6.0
safetensors           0.4.0
scikit-image          0.21.0
scikit-learn          1.3.1
scipy                 1.10.1
sentencepiece         0.1.99
seqeval               1.2.2
setuptools            56.0.0
shapely               2.0.2
six                   1.16.0
sniffio               1.3.0
soupsieve             2.5
starlette             0.27.0
tensorrt              8.6.1
termcolor             2.3.0
threadpoolctl         3.2.0
tifffile              2023.7.10
tqdm                  4.66.1
typer                 0.9.0
typing_extensions     4.8.0
tzdata                2023.3
urllib3               2.0.6
uvicorn               0.23.2
visualdl              2.5.3
Werkzeug              3.0.0
xxhash                3.4.1
yacs                  0.1.8
yarl                  1.9.2
zipp                  3.17.0
amingze commented 1 year ago

以下是aistudio里的pip list

aiohttp               3.8.6
aiosignal             1.3.1
annotated-types       0.6.0
anyio                 3.7.1
astor                 0.8.1
async-timeout         4.0.3
attrdict              2.0.1
attrs                 23.1.0
Babel                 2.13.0
bce-python-sdk        0.8.90
beautifulsoup4        4.12.2
blinker               1.6.3
cachetools            5.3.1
certifi               2023.7.22
charset-normalizer    3.3.0
click                 8.1.7
colorama              0.4.6
colorlog              6.7.0
contourpy             1.1.1
cssselect             1.2.0
cssutils              2.9.0
cycler                0.12.1
Cython                3.0.3
datasets              2.14.5
decorator             5.1.1
dill                  0.3.4
et-xmlfile            1.1.0
exceptiongroup        1.1.3
fastapi               0.103.2
filelock              3.12.4
fire                  0.5.0
Flask                 3.0.0
flask-babel           4.0.0
fonttools             4.43.1
frozenlist            1.4.0
fsspec                2023.6.0
future                0.18.3
h11                   0.14.0
httpcore              0.18.0
httpx                 0.25.0
huggingface-hub       0.18.0
idna                  3.4
imageio               2.31.5
imgaug                0.4.0
importlib-metadata    6.8.0
importlib-resources   6.1.0
itsdangerous          2.1.2
jieba                 0.42.1
Jinja2                3.1.2
joblib                1.3.2
kiwisolver            1.4.5
lanms-neo             1.0.2
lazy_loader           0.3
lmdb                  1.4.1
lxml                  4.9.3
markdown-it-py        3.0.0
MarkupSafe            2.1.3
matplotlib            3.7.3
mdurl                 0.1.2
multidict             6.0.4
multiprocess          0.70.12.2
networkx              3.1
numpy                 1.24.4
onnx                  1.14.1
opencv-contrib-python 4.6.0.66
opencv-python         4.6.0.66
openpyxl              3.1.2
opt-einsum            3.3.0
packaging             23.2
paddle-bfloat         0.1.7
paddle2onnx           1.0.6
paddlefsl             1.1.0
paddlenlp             2.5.0
paddleocr             2.7.0.3
paddlepaddle-gpu      2.4.2.post117
pandas                2.0.3
pdf2docx              0.5.6
Pillow                10.0.1
pip                   23.2.1
Polygon3              3.0.9.1
premailer             3.10.0
protobuf              3.20.0
psutil                5.9.5
pyarrow               13.0.0
pyclipper             1.3.0.post5
pycryptodome          3.19.0
pydantic              2.4.2
pydantic_core         2.10.1
Pygments              2.16.1
PyMuPDF               1.20.2
pypandoc              1.11
pyparsing             3.1.1
python-dateutil       2.8.2
python-docx           1.0.1
pytz                  2023.3.post1
PyWavelets            1.4.1
PyYAML                6.0.1
rapidfuzz             3.4.0
rarfile               4.1
requests              2.31.0
rich                  13.6.0
safetensors           0.4.0
scikit-image          0.21.0
scikit-learn          1.3.1
scipy                 1.10.1
sentencepiece         0.1.99
seqeval               1.2.2
setuptools            56.0.0
shapely               2.0.2
six                   1.16.0
sniffio               1.3.0
soupsieve             2.5
starlette             0.27.0
tensorrt              8.6.1
termcolor             2.3.0
threadpoolctl         3.2.0
tifffile              2023.7.10
tqdm                  4.66.1
typer                 0.9.0
typing_extensions     4.8.0
tzdata                2023.3
urllib3               2.0.6
uvicorn               0.23.2
visualdl              2.5.3
Werkzeug              3.0.0
xxhash                3.4.1
yacs                  0.1.8
yarl                  1.9.2
zipp                  3.17.0