OCR4all / LAREX

A semi-automatic open-source tool for Layout Analysis and Region EXtraction on early printed books.
MIT License
179 stars 33 forks source link

Manual Segmention on Page 2+ #231

Closed b2m closed 3 years ago

b2m commented 3 years ago

I am in the Ground Truth Production step in OCR4All and open page 2 in the Segmentation mode.

Example steps to reproduce (reduced to minimum):

  1. Load Project
  2. Perform Preprocessing
  3. Go to Ground Truth Production
  4. Open page 2
  5. Try to manually add a segment

Expectation: I would expect to be able to manually segment the page.

Note: The segmentation is working on page 1. The automatic segmentation is also only performed on page 1.

Version: Larex was used via docker and the current ls6uniwue/ocr4all:nightly with Larex 0.5-RC3.

JavaScript Console:

Uncaught Error: Edit Mode is left while still creating a Rectangle
    onMouseDrag http://localhost:8080/Larex/resources/js/viewer/editor.js:97
    onMouseDrag http://localhost:8080/Larex/resources/js/viewer/viewer.js:96
    onMouseDrag http://localhost:8080/Larex/resources/js/viewer/viewer.js:94
    emit http://localhost:8080/Larex/resources/js/paper.js:652
    emit http://localhost:8080/Larex/resources/js/paper.js:12848
    _handleMouseEvent http://localhost:8080/Larex/resources/js/paper.js:12861
    _handleMouseEvent http://localhost:8080/Larex/resources/js/paper.js:12314
    handleMouseMove http://localhost:8080/Larex/resources/js/paper.js:12065
    mouseout http://localhost:8080/Larex/resources/js/paper.js:12099
editor.js:97:14
    onMouseDrag http://localhost:8080/Larex/resources/js/viewer/editor.js:97
    onMouseDrag http://localhost:8080/Larex/resources/js/viewer/viewer.js:96
    forEach self-hosted:206
    onMouseDrag http://localhost:8080/Larex/resources/js/viewer/viewer.js:94
    emit http://localhost:8080/Larex/resources/js/paper.js:652
    emit http://localhost:8080/Larex/resources/js/paper.js:12848
    _handleMouseEvent http://localhost:8080/Larex/resources/js/paper.js:12861
    _handleMouseEvent http://localhost:8080/Larex/resources/js/paper.js:12314
    handleMouseMove http://localhost:8080/Larex/resources/js/paper.js:12065
    mouseout http://localhost:8080/Larex/resources/js/paper.js:12099

Browser

Related (maybe):

maxnth commented 3 years ago

LAREX wasn't setting any segmentation result for pages with an empty annotation (e.g. when not running Segment or loading from an existing XML annotation) in the "segmentation-map" and therefore threw an error when a user tried to add any kind of segment to an undefined annotation. This should be fixed by 2889c8048d4eca6e4131d3278337426a68febb4b.

The fix will be available in the upcoming nightly (and stable) release.

b2m commented 3 years ago

Confirmed, the reported problem no longer occurs.

Thank you =)

Leaving this issue open to not disrupt your workflow.

maxnth commented 3 years ago

Thanks for testing.