Rename img_size to imgsz (#86)

This commit is contained in:
Glenn Jocher
2022-12-24 00:39:09 +01:00
committed by GitHub
parent ae2443c210
commit 6432afc5f9
25 changed files with 98 additions and 98 deletions

View File

@ -70,7 +70,7 @@ with open("ultralytics/tests/data/dataloader/hyp_test.yaml") as f:
def test(augment, rect):
dataloader, _ = build_dataloader(
img_path="/d/dataset/COCO/images/val2017",
img_size=640,
imgsz=640,
label_path=None,
cache=False,
hyp=hyp,

View File

@ -36,13 +36,13 @@ def test_visualize_preds():
def test_val():
model = YOLO()
model.load("balloon-segment.pt")
model.val(data="coco128-seg.yaml", img_size=32)
model.val(data="coco128-seg.yaml", imgsz=32)
def test_model_resume():
model = YOLO()
model.new("yolov5n-seg.yaml")
model.train(epochs=1, img_size=32, data="coco128-seg.yaml")
model.train(epochs=1, imgsz=32, data="coco128-seg.yaml")
try:
model.resume(task="segment")
except AssertionError:
@ -52,9 +52,9 @@ def test_model_resume():
def test_model_train_pretrained():
model = YOLO()
model.load("balloon-detect.pt")
model.train(data="coco128.yaml", epochs=1, img_size=32)
model.train(data="coco128.yaml", epochs=1, imgsz=32)
model.new("yolov5n.yaml")
model.train(data="coco128.yaml", epochs=1, img_size=32)
model.train(data="coco128.yaml", epochs=1, imgsz=32)
img = torch.rand(512 * 512 * 3).view(1, 3, 512, 512)
model(img)