-
Notifications
You must be signed in to change notification settings - Fork 31
new attempt at #173 (valid polygons, faster deskewing, various fixes) #192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…), ensure validity
…ing dtype during np.append
…ope_first (always 0)
…iginal instead of resampled contours
…ontours_textline_version → dilate_textline_contours
…also handle heterogeneous geometries
…are resulting (maximum) variances instead of blindly assuming the new range is better
This reverts commit 5db3e9f.
- np.delete in index array instead of contour lists - yield actual resulting indices
- `get_textregion_contours_in_org_image_light`: no more need to also return unchanged contours here (see 41cc38c); therefore - `txt_con_org`: no more need for this (now mere alias to `contours_only_text_parent`); also - `index_by_text_par_con`: no more need for this (see prev. commit), so do not pass/return - `get_slopes_and_deskew_*`: do not pass `contours_only_text` (where not used) - `get_slopes_and_deskew_*`: do not return unchanged contours, boxes - `do_work_of_slopes_*`: adapt respectively
- simplify serialization of coordinates - re-use `serialize_lines_in_region` (drop `*_in_dropcapital` and `*_in_marginal`) - re-use `calculate_polygon_coords`
- `build_pagexml_no_full_layout`: delegate to `build_pagexml_full_layout` (removing redundant code)
(not sure if these models really need that, though)
…ctored refactoring for 192: speedup and improvements
…oky-with-shm-for-175-rebuilt
- simplify definition of (defaults for) model versions - unify loading of loadable models (depending on mode) - use `self.models` dict instead of `self.model_*` attributes - add `model_versions` kwarg / `--model_version` CLI option
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After #173 had been merged into #175, but then reverted, I put everything into vahidrezanezhad#2, which ultimately was not merged either.
Rebasing was a nightmare, so I had to re-do everything via cherry-picking. (The merge was still painful.)
Still testing right now, hence draft.