change crop-size to crop-margin, to add more context for crop infer

This commit is contained in:
Sanster
2022-03-24 09:08:49 +08:00
parent 1207b6e291
commit d3f1ea2474
4 changed files with 14 additions and 14 deletions

View File

@@ -318,8 +318,10 @@ class LDM:
cx = box_x + box_w // 2
cy = box_y + box_h // 2
w = max(512, box_w)
h = max(512, box_h)
# w = max(512, box_w)
# h = max(512, box_h)
w = box_w + 512
h = box_h + 512
left = max(cx - w // 2, 0)
top = max(cy - h // 2, 0)