mirror of
https://github.com/samsonjs/immich.git
synced 2026-04-27 15:07:45 +00:00
parent
a3f281caa3
commit
6249996cdb
1 changed files with 1 additions and 0 deletions
|
|
@ -82,6 +82,7 @@ class TextDetector(InferenceModel):
|
||||||
ratio = float(self.max_resolution) / img.height
|
ratio = float(self.max_resolution) / img.height
|
||||||
else:
|
else:
|
||||||
ratio = float(self.max_resolution) / img.width
|
ratio = float(self.max_resolution) / img.width
|
||||||
|
ratio = min(ratio, 1.0)
|
||||||
|
|
||||||
resize_h = int(img.height * ratio)
|
resize_h = int(img.height * ratio)
|
||||||
resize_w = int(img.width * ratio)
|
resize_w = int(img.width * ratio)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue