File size: 434 Bytes
e970115 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import argparse
import torch
from ultralytics import YOLO
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('model', type=str, help='Model path for validation.')
parser.add_argument('--imgsz', default=928, type=int, help='Image size to validate.')
args = parser.parse_args()
model = YOLO(args.model, task='detect')
model.val(data="VisDrone.yaml", imgsz=args.imgsz, batch=1)
|