diff options
author | Billy Cao <aliencaocao@gmail.com> | 2022-11-06 16:33:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-06 16:33:08 +0800 |
commit | c13e234444e98d112e9fe99d518c834edeb79471 (patch) | |
tree | 8dfa10582dccb75685b4dd3ee28d1d48c0a6f595 /modules/masking.py | |
parent | 55ca04095845b41bf66333b3b7343e3ea0babed1 (diff) | |
parent | 5302e2cdd4c8f039a68e900d739285d15d99d200 (diff) |
Merge branch 'master' into enable-override-hypernet
Diffstat (limited to 'modules/masking.py')
-rw-r--r-- | modules/masking.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/masking.py b/modules/masking.py index fd8d9241..a5c4d2da 100644 --- a/modules/masking.py +++ b/modules/masking.py @@ -49,7 +49,7 @@ def expand_crop_region(crop_region, processing_width, processing_height, image_w ratio_processing = processing_width / processing_height
if ratio_crop_region > ratio_processing:
- desired_height = (x2 - x1) * ratio_processing
+ desired_height = (x2 - x1) / ratio_processing
desired_height_diff = int(desired_height - (y2-y1))
y1 -= desired_height_diff//2
y2 += desired_height_diff - desired_height_diff//2
|