Code Monkey home page Code Monkey logo

Comments (5)

thqby avatar thqby commented on September 14, 2024 1

After applying this commit RapidAI/RapidOcrOnnx@83886d1, on my computer, the number of threads is set to 2 or 3 for the fastest recognition.

from ahk2_lib.

thqby avatar thqby commented on September 14, 2024

The current version supports only CPUs. I have tested the directml version on my computer, but no performance advantage.

from ahk2_lib.

Qriist avatar Qriist commented on September 14, 2024

The current version supports only CPUs. I have tested the directml version on my computer, but no performance advantage.

Ah that's unfortunate. Thanks for checking it out for me.

In that same vein, are you sure that you compiled the the dll with multithreading enabled?

I ran the following code with a variety of threads values:

#Requires AutoHotkey v2.0
#Include <RapidOcr>

image := "1.bmp"
threads := 999

param := RapidOcr.OcrParam()
param.doAngle := false

ocr := RapidOcr({ models: A_ScriptDir "\models", numThread: threads },A_ScriptDir "\RapidOcrOnnx.dll")

num := 100
loop num{
    ToolTip(Round((a_index / num)*100,2) "%")
    ocr.ocr_from_file(image, param?)
}

I've tried 1,2,4,6,8, and 999 threads, but all of them gave extremely similar (within milliseconds) results. The time varies a little bit per image, but never per thread value per given image. That suggests that the DLL isn't actually running multithreaded. Am I doing something wrong?

from ahk2_lib.

Qriist avatar Qriist commented on September 14, 2024

I appreciate you looking into that!

from ahk2_lib.

thqby avatar thqby commented on September 14, 2024

RapidOcrOnnx.zip

Requires onnxruntime-gpu v1.18.0, cuda 12.x, cudnn 8.x

from ahk2_lib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.