YOLOv8 architecture updates from R&D branch (#88)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher
2022-12-24 18:10:44 +01:00
committed by GitHub
parent 5fbea25f0b
commit ebd3cfb2fd
23 changed files with 720 additions and 570 deletions

View File

@ -5,7 +5,7 @@ from ultralytics.yolo import YOLO
def test_model_forward():
model = YOLO()
model.new("yolov5n-seg.yaml")
model.new("yolov8n-seg.yaml")
img = torch.rand(512 * 512 * 3).view(1, 3, 512, 512)
model.forward(img)
model(img)
@ -13,7 +13,7 @@ def test_model_forward():
def test_model_info():
model = YOLO()
model.new("yolov5n.yaml")
model.new("yolov8n.yaml")
model.info()
model.load("balloon-detect.pt")
model.info(verbose=True)
@ -21,7 +21,7 @@ def test_model_info():
def test_model_fuse():
model = YOLO()
model.new("yolov5n.yaml")
model.new("yolov8n.yaml")
model.fuse()
model.load("balloon-detect.pt")
model.fuse()
@ -41,7 +41,7 @@ def test_val():
def test_model_resume():
model = YOLO()
model.new("yolov5n-seg.yaml")
model.new("yolov8n-seg.yaml")
model.train(epochs=1, imgsz=32, data="coco128-seg.yaml")
try:
model.resume(task="segment")
@ -53,7 +53,7 @@ def test_model_train_pretrained():
model = YOLO()
model.load("balloon-detect.pt")
model.train(data="coco128.yaml", epochs=1, imgsz=32)
model.new("yolov5n.yaml")
model.new("yolov8n.yaml")
model.train(data="coco128.yaml", epochs=1, imgsz=32)
img = torch.rand(512 * 512 * 3).view(1, 3, 512, 512)
model(img)