COCO8 and COCO8-seg Pytest and CI updates (#307)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: RangiLyu <lyuchqi@gmail.com>
This commit is contained in:
parent
2bc36d97ce
commit
70427579b8
13 changed files with 254 additions and 59 deletions
|
|
@ -37,18 +37,18 @@ def test_predict_dir():
|
|||
|
||||
def test_val():
|
||||
model = YOLO(MODEL)
|
||||
model.val(data="coco128.yaml", imgsz=32)
|
||||
model.val(data="coco8.yaml", imgsz=32)
|
||||
|
||||
|
||||
def test_train_scratch():
|
||||
model = YOLO(CFG)
|
||||
model.train(data="coco128.yaml", epochs=1, imgsz=32)
|
||||
model.train(data="coco8.yaml", epochs=1, imgsz=32)
|
||||
model(SOURCE)
|
||||
|
||||
|
||||
def test_train_pretrained():
|
||||
model = YOLO(MODEL)
|
||||
model.train(data="coco128.yaml", epochs=1, imgsz=32)
|
||||
model.train(data="coco8.yaml", epochs=1, imgsz=32)
|
||||
model(SOURCE)
|
||||
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ def test_all_model_yamls():
|
|||
|
||||
def test_workflow():
|
||||
model = YOLO(MODEL)
|
||||
model.train(data="coco128.yaml", epochs=1, imgsz=32)
|
||||
model.train(data="coco8.yaml", epochs=1, imgsz=32)
|
||||
model.val()
|
||||
model.predict(SOURCE)
|
||||
model.export(format="onnx", opset=12) # export a model to ONNX format
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue