Skip to content

ensure valid coordinates by intersection with parent…#48

Merged
vahidrezanezhad merged 1 commit intoqurator-spk:masterfrom
bertsky:fix-coords
Jan 7, 2021
Merged

ensure valid coordinates by intersection with parent…#48
vahidrezanezhad merged 1 commit intoqurator-spk:masterfrom
bertsky:fix-coords

Conversation

@bertsky
Copy link
Copy Markdown
Contributor

@bertsky bertsky commented Oct 30, 2020

  • Border: intersect with page frame
  • text regions: intersect with (new) Border
  • text lines: intersect with (new) text region
    (and back-transform at all)

This fixes the negative coordinates, and also the line-region inconsistency (line bboxes way beyond tight region outlines).

I'll fix removing the existing derived images with cropped in a PR to core, so this will be transparent and automatic here.

- Border: intersect with page frame
- text regions: intersect with (new) Border
- text lines: intersect with (new) text region
  (and back-transform at all)
@bertsky
Copy link
Copy Markdown
Contributor Author

bertsky commented Oct 30, 2020

Oh, and could you please try introducing some versioning (so users get to see what version produced their PAGE/METS annotations)?

@bertsky
Copy link
Copy Markdown
Contributor Author

bertsky commented Oct 31, 2020

I'll fix removing the existing derived images with cropped in a PR to core, so this will be transparent and automatic here.

OCR-D/core#639

@jbarth-ubhd
Copy link
Copy Markdown

jbarth-ubhd commented Nov 5, 2020

I've tried it again (with make NO_UPDATE=1 all after git remote add bertsky https://github.com/bertsky/sbb_textline_detection) , but get no text simple-layout pages.

Just to be sure I've grepped a string from master...bertsky:fix-coords :

(venv) [hd_xxxxx@login5 sbb_textline_detector]$ pwd
/beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/local/sub-venv/headless-tf1/lib/python3.7/site-packages/qurator/sbb_textline_detector
(venv) [hd_xxxxx@login5 sbb_textline_detector]$ grep -r 'new border would be empty, skipping' .
./ocrd_cli.py:                log.warning("new border would be empty, skipping")
Binary file ./__pycache__/ocrd_cli.cpython-37.pyc matches

So the my venv seems up to date(?)

@jbarth-ubhd
Copy link
Copy Markdown

@bertsky
Copy link
Copy Markdown
Contributor Author

bertsky commented Nov 5, 2020

with make NO_UPDATE=1 all

Did you git -C core pull origin before that? (You need an up-to-date core also in the sub-venv.)

but get no text simple-layout pages.

You get what?

@jbarth-ubhd
Copy link
Copy Markdown

jbarth-ubhd commented Nov 5, 2020 via email

@jbarth-ubhd
Copy link
Copy Markdown

hmmm...

[hd_xxx@login5 ocrd_all]$ ~/local/bin/git -C core pull origin
warning: Es wird davon abgeraten zu Pullen, ohne anzugeben, wie mit abweichenden
Branches umgegangen werden soll. Sie können diese Nachricht unterdrücken,
...
remote: Enumerating objects: 45, done.
remote: Counting objects: 100% (45/45), done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 45 (delta 24), reused 34 (delta 19), pack-reused 0
Entpacke Objekte: 100% (45/45), 129.57 KiB | 93.00 KiB/s, Fertig.
Von https://github.com/OCR-D/core
   c8136bf5..ffe4e545  master     -> origin/master
 * [neues Tag]         v2.20.0    -> v2.20.0
Im Moment auf keinem Branch.
Bitte geben Sie den Branch an, welchen Sie zusammenführen möchten.
Siehe git-pull(1) für weitere Details.

    git pull <Remote-Repository> <Branch>

[hd_xxx@login5 ocrd_all]$ make NO_UPDATE=1 all
make: Nothing to be done for `all'.

ok I'll wait till your changes are pulled into ocrd_all.

@jbarth-ubhd
Copy link
Copy Markdown

oops. ~/local/bin/git -C core pull origin master seems to help.

@bertsky
Copy link
Copy Markdown
Contributor Author

bertsky commented Dec 9, 2020

This fixes the negative coordinates, and also the line-region inconsistency (line bboxes way beyond tight region outlines).

I don't understand why this essential fix has not been merged yet.

@cneud
Copy link
Copy Markdown
Member

cneud commented Dec 9, 2020

Thank you for the contribution! For internal reasons, we have not had the time to properly review this yet. I will put it on the agenda for our next internal meeting.

@kba kba requested a review from vahidrezanezhad January 7, 2021 14:22
@vahidrezanezhad vahidrezanezhad merged commit c241830 into qurator-spk:master Jan 7, 2021
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.

5 participants