fix(ml): do not upscale preview (#24322)

do not upscale
pull/24091/head
Mert 2025-12-01 21:26:01 +07:00 committed by GitHub
parent a3f281caa3
commit 6249996cdb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

@ -82,6 +82,7 @@ class TextDetector(InferenceModel):
ratio = float(self.max_resolution) / img.height
else:
ratio = float(self.max_resolution) / img.width
ratio = min(ratio, 1.0)
resize_h = int(img.height * ratio)
resize_w = int(img.width * ratio)