check_img_size() update
This commit is contained in:
parent
034609414e
commit
a557b7d924
|
|
@ -47,9 +47,10 @@ def check_git_status():
|
||||||
|
|
||||||
def check_img_size(img_size, s=32):
|
def check_img_size(img_size, s=32):
|
||||||
# Verify img_size is a multiple of stride s
|
# Verify img_size is a multiple of stride s
|
||||||
if img_size % s != 0:
|
new_size = make_divisible(img_size, s) # ceil gs-multiple
|
||||||
print('WARNING: --img-size %g must be multiple of max stride %g' % (img_size, s))
|
if new_size != img_size:
|
||||||
return make_divisible(img_size, s) # nearest gs-multiple
|
print('WARNING: --img-size %g must be multiple of max stride %g, updating to %g' % (img_size, s, new_size))
|
||||||
|
return new_size
|
||||||
|
|
||||||
|
|
||||||
def check_anchors(dataset, model, thr=4.0, imgsz=640):
|
def check_anchors(dataset, model, thr=4.0, imgsz=640):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue