Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多线程场景下rapidOcr+DirectML程序崩溃,单线程正常。 #303

Open
zqg0 opened this issue Dec 24, 2024 · 0 comments
Open

多线程场景下rapidOcr+DirectML程序崩溃,单线程正常。 #303

zqg0 opened this issue Dec 24, 2024 · 0 comments
Assignees

Comments

@zqg0
Copy link

zqg0 commented Dec 24, 2024

问题描述 / Problem Description

多线程场景下rapidOcr+DirectML程序崩溃,单线程正常。
崩溃时提示 进程已结束,退出代码为 -1073741819 (0xC0000005)

运行环境 / Runtime Environment

python3.10
rapidOcr-onnxruntime==1.3.24
onnxruntime-directML==1.20.1

复现代码 / Reproduction Code

class MyThread(threading.Thread):

    def run(self):
        rapidOcr = RapidOCR(use_cls=False, width_height_ratio=-1, det_use_dml=True, cls_use_dml=True,
                                 rec_use_dml=True)
        img = cv_imread("C:\workspace\\test\pic\\test9.png")

        for i in range(30):
            rapidOcr(img)


if __name__ == '__main__':
    t = MyThread()
    t2 = MyThread()
    t.start()
    t2.start()
    t.join()
    t2.join()

可能解决方案 / Possible solutions

@SWHL SWHL self-assigned this Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants