Commit
·
a557b7d
1
Parent(s):
0346094
check_img_size() update
Browse files- utils/utils.py +4 -3
utils/utils.py
CHANGED
@@ -47,9 +47,10 @@ def check_git_status():
|
|
47 |
|
48 |
def check_img_size(img_size, s=32):
|
49 |
# Verify img_size is a multiple of stride s
|
50 |
-
|
51 |
-
|
52 |
-
|
|
|
53 |
|
54 |
|
55 |
def check_anchors(dataset, model, thr=4.0, imgsz=640):
|
|
|
47 |
|
48 |
def check_img_size(img_size, s=32):
|
49 |
# Verify img_size is a multiple of stride s
|
50 |
+
new_size = make_divisible(img_size, s) # ceil gs-multiple
|
51 |
+
if new_size != img_size:
|
52 |
+
print('WARNING: --img-size %g must be multiple of max stride %g, updating to %g' % (img_size, s, new_size))
|
53 |
+
return new_size
|
54 |
|
55 |
|
56 |
def check_anchors(dataset, model, thr=4.0, imgsz=640):
|