- Update PaddleOCR.dll to 2.3.
- Update detection model to ch_PP-OCRv2_det.
- Update ImagePut.ahk to 1.2 beta.
- Load configs no longer requires temporary file.
- Rename dict file and model directories
i don't have this problem, maybe you can try version 2021.10.03 ?viv wrote: ↑03 Oct 2021, 06:44Thanks for sharing
Why can't I copy content to the clipboard?
Even when I press CTRL +C on the msgbox, it causes it to disappearCode: Select all
o := PaddleOCR(ClipboardAll) MsgBox, % o Clipboard := o
Copying such a msgbox will get its contents and will not cause it to disappearCode: Select all
o := "my text" MsgBox, % o
look 0.note.ahkleosouza85 wrote: ↑03 Oct 2021, 17:31I'm using ocr clipboard
printscreen and the script, but its does not ocr everything on the screen, why?
look 6.Get all information.ahkleosouza85 wrote: ↑03 Oct 2021, 19:14It is possible to use this script to find a word and then click it?
Thank you so much!tuzi wrote: ↑03 Oct 2021, 19:43look 6.Get all information.ahkleosouza85 wrote: ↑03 Oct 2021, 19:14It is possible to use this script to find a word and then click it?
use the pos of str. then click it.
leosouza85 wrote: ↑05 Oct 2021, 18:52Thank you so much!tuzi wrote: ↑03 Oct 2021, 19:43look 6.Get all information.ahkleosouza85 wrote: ↑03 Oct 2021, 19:14It is possible to use this script to find a word and then click it?
use the pos of str. then click it.
Yes, I know this tool, but I'm looking for new and flexible approaches, any tips to increase the accuracy on PaddleOCR?tuzi wrote: ↑06 Oct 2021, 01:13leosouza85 wrote: ↑05 Oct 2021, 18:52Thank you so much!tuzi wrote: ↑03 Oct 2021, 19:43look 6.Get all information.ahkleosouza85 wrote: ↑03 Oct 2021, 19:14It is possible to use this script to find a word and then click it?
use the pos of str. then click it.
this tool FindText maybe better for you.
Answering myself but in hope that will help others, I've changed the PaddleOCR.ahk parameter max_side_len, from 960 to 1920 that is my horizontal resolution, and now it OCR the whole screen.leosouza85 wrote: ↑03 Oct 2021, 17:31I'm using ocr clipboard
printscreen and the script, but its does not ocr everything on the screen, why?
1. https://github.com/PaddlePaddle/PaddleOCRnewcod3r wrote: ↑11 Apr 2022, 03:58Thank you for this.
1. May I know how to train the model to get better? it is still quite inaccurate based on this screenshot:
image.png
2. How do I get ahk to select the region first before it inputs the coordinates into the function? A sample will be appreciated. Thanks!
Code: Select all
arr := select_range()
; MsgBox, % PaddleOCR(arr)
select_range()
{
KeyWait, LButton
For k,v in StrSplit("LButton,Left,Right,Up,Down", ",")
Hotkey, % v, GetRange_KeyOff, On
if (0)
{
GetRange_KeyOff:
return
}
Gui, GetRange: Destroy
Gui, % "GetRange: +AlwaysOnTop -Caption +ToolWindow"
. " +Hwndid -DPIScale +E0x08000000"
ok:=0
CoordMode, Mouse, Screen
While !GetKeyState("Ctrl","P")
{
Sleep, 50
if (ok!=2)
btt("drag to select a range",,, 2, {FontSize:14})
MouseGetPos, x2, y2, win
if (ok=0)
{
if GetKeyState("LButton","P")
ok:=1, x1:=x2, y1:=y2, outWin:=win
}
else if (ok=1)
{
GetKeyState("Left","P") && x1--
GetKeyState("Right","P") && x1++
GetKeyState("Up","P") && y1--
GetKeyState("Down","P") && y1++
w:=Floor(Abs(x1-x2)), h:=Floor(Abs(y1-y2))
x:=Floor(Min(x1,x2)), y:=Floor(Min(y1,y2))
d:=2, x-=d, y-=d, w+=2*d, h+=2*d, i:=w-d, j:=h-d
s:="0-0 " (w "-0 ") (w "-" h) (" 0-" h) " 0-0 "
. (d "-" d) " " (i "-" d) " " (i "-" j) " " (d "-" j) " " (d "-" d)
WinSet, Region, %s%, ahk_id %id%
Gui, GetRange: Color, % (A_MSec<500 ? "Red":"Blue")
Gui, GetRange: Show, NA x%x% y%y% w%w% h%h%
if !GetKeyState("LButton","P")
ok:=2
}
else if (ok=2)
{
btt("arrow keys to fine-tune the position`nclick the left button to confirm",,, 2, {FontSize:14})
GetKeyState("Left","P") && x--
GetKeyState("Right","P") && x++
GetKeyState("Up","P") && y--
GetKeyState("Down","P") && y++
Gui, GetRange: Color, % (A_MSec<500 ? "Red":"Blue")
Gui, GetRange: Show, NA x%x% y%y%
if GetKeyState("LButton","P")
Break
}
}
x1:=x+d, y1:=y+d, x2:=x+w-1-d, y2:=y+h-1-d
Gui, GetRange: Destroy
btt(,,, 2)
KeyWait, LButton
For k,v in StrSplit("LButton,Left,Right,Up,Down", ",")
Hotkey, % v, Off
return [x1, y1, Abs(x2-x1), Abs(y2-y1), outWin]
}
Return to “Scripts and Functions (v1)”
Users browsing this forum: No registered users and 106 guests