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) | |