Skip to content

stabilized auto recognition + adding the keyboard shortcut info + navigation through keyboard - #271

Open
BaraaFatimaZohraLALAGUI wants to merge 1 commit into
PFCCLab:mainfrom
BaraaFatimaZohraLALAGUI:main
Open

BaraaFatimaZohraLALAGUI wants to merge 1 commit into
PFCCLab:mainfrom
BaraaFatimaZohraLALAGUI:main

Conversation

@BaraaFatimaZohraLALAGUI

Copy link
Copy Markdown

Stabilized Auto Recognition, added keyboard navigation between boxes, and made shortcuts discoverable from the Recognition result panel.


Stability Fixes

  • Added requirements.txt with the project dependencies.
  • Disabled oneDNN/MKLDNN in both PPStructureV3 instances to avoid the Paddle 3.4.0 ConvertPirAttribute2RuntimeAttribute crash.
  • Fixed Auto Recognition closing the app: the new autoRecognitionNotice string was missing from the compiled Qt resources.

Auto Recognition Threading

  • OCR work now runs in the worker thread, but UI updates and saveFile(mode="Auto") run in the GUI thread via a new resultReady signal.
  • Removed the worker's self.exec() call so the thread can finish normally.
  • Made cancellation non-blocking: uses requestInterruption(), a _cancelled flag, and no busy-wait loop.
  • Keeps references to running workers so they aren't garbage-collected if the dialog closes early.
  • Added a progress/notice label and window title to the Auto Recognition dialog.
  • Worker exceptions are logged and reported instead of silently killing the app.

Keyboard Navigation

Shortcut Action
Tab / Shift+Tab Next / previous detection box
F2 or Enter Edit the selected box text inline
Esc / Enter Confirm the edit and return to navigation

Implemented in:

  • libs/editinlist.py — new navigateRequested / editRequested signals, inline editor handling, event filter, and focusNextPrevChild.
  • libs/canvas.py — new navigation/edit signals and Tab/F2/Enter handling.
  • PPOCRLabel.py — navigateShapes(), editCurrentLabelInline(), signal connections, and tooltips.
  • libs/utils.py — shortcut hints added to tooltips and keysInfo().

Shortcut Discoverability

  • Added an i circle button next to the "Recognition result" dock title.
  • Hovering it shows the important shortcuts, clicking it opens the full shortcut list dialog.
  • The status bar also shows a short shortcut tip on startup.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant