Compare commits

..

6 commits
v0.9.0 ... main

Author SHA1 Message Date
kba
15ddb7750e 📦 v0.9.2 2026-07-28 15:40:46 +02:00
kba
027d6aaa26 📝 changelog 2026-07-28 13:59:53 +02:00
Sai Asish Y
42d383920d return_deskew_slop: pass refined angles, not sigma_des, on landscape main page
Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
2026-07-26 18:29:07 -07:00
kba
88ca39dedb 📦 v0.9.1 2026-07-20 20:08:51 +02:00
kba
b10fb9927d 📝 changelog 2026-07-20 20:07:41 +02:00
kba
17028a2193 require core v3.13.2 for ONNX base image 2026-07-20 19:57:56 +02:00
5 changed files with 30 additions and 3 deletions

View file

@ -5,6 +5,18 @@ Versioned according to [Semantic Versioning](http://semver.org/).
## Unreleased ## Unreleased
## [0.9.2] - 2026-07-28
Fixed:
* `return_deskew_slop`: typo caused silent exit for landscape pages, #223, #224, ht @lazyants @SAY-5
## [0.9.1] - 2026-07-20
Fixed:
- Base image version must be >= core 3.13.2 for ONNX base image, OCR-D/core#1365
## [0.9.0] - 2026-07-20 ## [0.9.0] - 2026-07-20
Fixed: Fixed:
@ -429,6 +441,9 @@ Fixed:
Initial release Initial release
<!-- link-labels --> <!-- link-labels -->
[0.9.2]: ../../compare/v0.9.2...v0.9.1
[0.9.1]: ../../compare/v0.9.1...v0.9.0
[0.9.0]: ../../compare/v0.9.0...v0.8.0
[0.8.0]: ../../compare/v0.8.0...v0.7.0 [0.8.0]: ../../compare/v0.8.0...v0.7.0
[0.7.0]: ../../compare/v0.7.0...v0.6.0 [0.7.0]: ../../compare/v0.7.0...v0.6.0
[0.6.0]: ../../compare/v0.6.0...v0.6.0rc2 [0.6.0]: ../../compare/v0.6.0...v0.6.0rc2

View file

@ -2,7 +2,7 @@ PYTHON ?= python3
PIP ?= pip3 PIP ?= pip3
EXTRAS ?= EXTRAS ?=
DOCKER_BASE_IMAGE ?= docker.io/ocrd/core-cuda-onnx:v3.13.1 DOCKER_BASE_IMAGE ?= docker.io/ocrd/core-cuda-onnx:v3.13.2
DOCKER_TAG ?= ocrd/eynollah DOCKER_TAG ?= ocrd/eynollah
DOCKER ?= docker DOCKER ?= docker
WGET = wget -O WGET = wget -O

View file

@ -1,5 +1,5 @@
{ {
"version": "0.9.0", "version": "0.9.2",
"git_url": "https://github.com/qurator-spk/eynollah", "git_url": "https://github.com/qurator-spk/eynollah",
"dockerhub": "ocrd/eynollah", "dockerhub": "ocrd/eynollah",
"tools": { "tools": {

View file

@ -1451,7 +1451,7 @@ def return_deskew_slop(img,
angle, _ = best_angle(angles) angle, _ = best_angle(angles)
angles = np.linspace(angle - 22.5, angle + 22.5, n_tot_angles) angles = np.linspace(angle - 22.5, angle + 22.5, n_tot_angles)
angle, _ = best_angle(sigma_des) angle, _ = best_angle(angles)
elif main_page: elif main_page:
#angles = np.linspace(-12, 12, n_tot_angles)#np.array([0 , 45 , 90 , -45]) #angles = np.linspace(-12, 12, n_tot_angles)#np.array([0 , 45 , 90 , -45])
angles = np.concatenate((np.linspace(-12, -7, n_tot_angles // 4), angles = np.concatenate((np.linspace(-12, -7, n_tot_angles // 4),

12
tests/test_deskew.py Normal file
View file

@ -0,0 +1,12 @@
import numpy as np
from eynollah.utils.separate_lines import return_deskew_slop
def test_deskew_landscape_main_page():
# landscape page (width > height) used to crash with
# "TypeError: 'int' object is not iterable" (#223)
img = np.zeros((80, 160))
for y in (20, 40, 60):
img[y:y + 3, 10:150] = 1
angle = return_deskew_slop(img, 2, n_tot_angles=10, main_page=True)
assert np.isfinite(angle)