-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Checklist:
- 查找历史相关issue寻求解答
- 翻阅FAQ
- 翻阅PaddleX 文档
- 确认bug是否在新版本里还未修复
描述问题
复现
-
您是否已经正常运行我们提供的教程?
是 -
您是否在教程的基础上修改代码内容?还请您提供运行的代码
是,代码就一行
output = pipeline.predict( input=np_image)
另外,这个是我这边用的PP-StructureV3.yaml
- 您使用的数据集是?
- 有2张没有标题的医学检测报告可以触发,此时是原始报告;
- 但我尝试过jpg和png互转,其中一张转成jpg后不会重现,但另一张2个格式都会稳定重现失败;
- 我又将失败图片中的一些信息进行了涂抹,然后重新保存成图片,此时却不报错了
因为图片涉及用户敏感信息,我简单涂抹了一些
- 请提供您出现的报错信息及相关log
E0708 12:36:46.416849 47598 helper.h:129] 7: [shapeMachine.cpp::executeContinuation::864] Error Code 7: Internal Error (36_pd_op.slice->slice_layer(input_0xcedbc130, 33, 35): ISliceLayer has out of bounds access on axis 1 Condition '<' violated: 501 >= 501. Instruction: CHECK_LESS 501 501.)
E0708 12:36:46.431427 47598 helper.h:129] 7: [shapeMachine.cpp::executeContinuation::864] Error Code 7: Internal Error (36_pd_op.slice->slice_layer(input_0xcedbc130, 33, 35): ISliceLayer has out of bounds access on axis 1 Condition '<' violated: 501 >= 501. Instruction: CHECK_LESS 501 501.)
E0708 12:36:46.446383 47598 helper.h:129] 7: [shapeMachine.cpp::executeContinuation::864] Error Code 7: Internal Error (36_pd_op.slice->slice_layer(input_0xcedbc130, 33, 35): ISliceLayer has out of bounds access on axis 1 Condition '<' violated: 501 >= 501. Instruction: CHECK_LESS 501 501.)
E0708 12:36:46.461650 47598 helper.h:129] 7: [shapeMachine.cpp::executeContinuation::864] Error Code 7: Internal Error (36_pd_op.slice->slice_layer(input_0xcedbc130, 33, 35): ISliceLayer has out of bounds access on axis 1 Condition '<' violated: 501 >= 501. Instruction: CHECK_LESS 501 501.)
E0708 12:36:46.479291 47598 helper.h:129] 7: [shapeMachine.cpp::executeContinuation::864] Error Code 7: Internal Error (36_pd_op.slice->slice_layer(input_0xcedbc130, 33, 35): ISliceLayer has out of bounds access on axis 1 Condition '<' violated: 501 >= 501. Instruction: CHECK_LESS 501 501.)
E0708 12:36:46.494511 47598 helper.h:129] 7: [shapeMachine.cpp::executeContinuation::864] Error Code 7: Internal Error (36_pd_op.slice->slice_layer(input_0xcedbc130, 33, 35): ISliceLayer has out of bounds access on axis 1 Condition '<' violated: 501 >= 501. Instruction: CHECK_LESS 501 501.)
E0708 12:36:46.509732 47598 helper.h:129] 7: [shapeMachine.cpp::executeContinuation::864] Error Code 7: Internal Error (36_pd_op.slice->slice_layer(input_0xcedbc130, 33, 35): ISliceLayer has out of bounds access on axis 1 Condition '<' violated: 501 >= 501. Instruction: CHECK_LESS 501 501.)
[2025-07-08 12:36:46 +0000] [12812] [ERROR] Exception in ASGI application
+ Exception Group Traceback (most recent call last):
| File "/usr/local/lib/python3.10/dist-packages/starlette/_utils.py", line 76, in collapse_excgroups
| yield
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 186, in __call__
| async with anyio.create_task_group() as task_group:
| File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 772, in __aexit__
| raise BaseExceptionGroup(
| exceptiongroup.ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
+-+---------------- 1 ----------------
| Traceback (most recent call last):
| File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi
| result = await app( # type: ignore[func-returns-value]
| File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
| return await self.app(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 1054, in __call__
| await super().__call__(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 113, in __call__
| await self.middleware_stack(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 187, in __call__
| raise exc
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 165, in __call__
| await self.app(scope, receive, _send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 185, in __call__
| with collapse_excgroups():
| File "/usr/lib/python3.10/contextlib.py", line 153, in __exit__
| self.gen.throw(typ, value, traceback)
| File "/usr/local/lib/python3.10/dist-packages/starlette/_utils.py", line 82, in collapse_excgroups
| raise exc
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 187, in __call__
| response = await self.dispatch_func(request, call_next)
| File "/root/yiya-ai-ocr/target/yiya-ai-ocr/aop/context.py", line 12, in dispatch
| response = await call_next(request)
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 163, in call_next
| raise app_exc
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 149, in coro
| await self.app(scope, receive_or_disconnect, send_no_error)
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py", line 85, in __call__
| await self.app(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 62, in __call__
| await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
| raise exc
| File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 42, in wrapped_app
| await app(scope, receive, sender)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 715, in __call__
| await self.middleware_stack(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 735, in app
| await route.handle(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 288, in handle
| await self.app(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 76, in app
| await wrap_app_handling_exceptions(app, request)(scope, receive, send)
| File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
| raise exc
| File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 42, in wrapped_app
| await app(scope, receive, sender)
| File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 73, in app
| response = await f(request)
| File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 301, in app
| raw_response = await run_endpoint_function(
| File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 214, in run_endpoint_function
| return await run_in_threadpool(dependant.call, **values)
| File "/usr/local/lib/python3.10/dist-packages/starlette/concurrency.py", line 39, in run_in_threadpool
| return await anyio.to_thread.run_sync(func, *args)
| File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 56, in run_sync
| return await get_async_backend().run_sync_in_worker_thread(
| File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread
| return await future
| File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 967, in run
| result = context.run(func, *args)
| File "/root/yiya-ai-ocr/target/yiya-ai-ocr/api/ocr_api.py", line 16, in mask_sensitive
| data = paddle_ocr.analysis(file_key=file_key, source_name=file_name)
| File "/root/yiya-ai-ocr/target/yiya-ai-ocr/servers/paddle_ocr.py", line 171, in analysis
| for res in output:
| File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/pipelines/_parallel.py", line 129, in predict
| yield from self._pipeline.predict(
| File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/pipelines/layout_parsing/pipeline_v2.py", line 1135, in predict
| table_res_all = list(
| File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/pipelines/_parallel.py", line 129, in predict
| yield from self._pipeline.predict(
| File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/pipelines/table_recognition/pipeline_v2.py", line 1343, in predict
| self.predict_single_table_recognition_res(
| File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/pipelines/table_recognition/pipeline_v2.py", line 1003, in predict_single_table_recognition_res
| table_structure_pred = next(self.wireless_table_rec_model(image_array))
| File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/models/base/predictor/base_predictor.py", line 211, in __call__
| yield from self.apply(input, **kwargs)
| File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/models/base/predictor/base_predictor.py", line 267, in apply
| prediction = self.process(batch_data, **kwargs)
| File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/models/table_structure_recognition/predictor.py", line 94, in process
| table_result = self.postprocessors(
| File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/models/table_structure_recognition/processors.py", line 126, in __call__
| bbox_preds = np.array([list(pred[0][0])])
| IndexError: too many indices for array: array is 0-dimensional, but 1 were indexed
+------------------------------------
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 113, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 187, in __call__
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 165, in __call__
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 185, in __call__
with collapse_excgroups():
File "/usr/lib/python3.10/contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.10/dist-packages/starlette/_utils.py", line 82, in collapse_excgroups
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 187, in __call__
response = await self.dispatch_func(request, call_next)
File "/root/yiya-ai-ocr/target/yiya-ai-ocr/aop/context.py", line 12, in dispatch
response = await call_next(request)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 163, in call_next
raise app_exc
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 149, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py", line 85, in __call__
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 62, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 715, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 735, in app
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 288, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 73, in app
response = await f(request)
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 301, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 214, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/usr/local/lib/python3.10/dist-packages/starlette/concurrency.py", line 39, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 967, in run
result = context.run(func, *args)
(此处为我们自己的调用文件路径,省略)
File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/pipelines/_parallel.py", line 129, in predict
yield from self._pipeline.predict(
File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/pipelines/layout_parsing/pipeline_v2.py", line 1135, in predict
table_res_all = list(
File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/pipelines/_parallel.py", line 129, in predict
yield from self._pipeline.predict(
File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/pipelines/table_recognition/pipeline_v2.py", line 1343, in predict
self.predict_single_table_recognition_res(
File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/pipelines/table_recognition/pipeline_v2.py", line 1003, in predict_single_table_recognition_res
table_structure_pred = next(self.wireless_table_rec_model(image_array))
File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/models/base/predictor/base_predictor.py", line 211, in __call__
yield from self.apply(input, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/models/base/predictor/base_predictor.py", line 267, in apply
prediction = self.process(batch_data, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/models/table_structure_recognition/predictor.py", line 94, in process
table_result = self.postprocessors(
File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/models/table_structure_recognition/processors.py", line 126, in __call__
bbox_preds = np.array([list(pred[0][0])])
IndexError: too many indices for array: array is 0-dimensional, but 1 were indexed
环境
- 请提供您使用的PaddlePaddle和PaddleX的版本号
我们是基于下面的docker镜像安装的高性能推理版本:
docker run --gpus all --name paddlex -v $PWD:/paddle --shm-size=8g --network=host -it ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/paddlex:paddlex3.0.1-paddlepaddle3.0.0-gpu-cuda11.8-cudnn8.9-trt8.6 /bin/bash
- 请问您使用的CUDA/cuDNN的版本号是?
- cuda11.8
- cudnn8.9
- trt8.6
Metadata
Metadata
Assignees
Labels
No labels