|
|
|
|
|
|
|
|
iou_thres=0.6, # NMS IoU threshold |
|
|
iou_thres=0.6, # NMS IoU threshold |
|
|
task='val', # train, val, test, speed or study |
|
|
task='val', # train, val, test, speed or study |
|
|
device='', # cuda device, i.e. 0 or 0,1,2,3 or cpu |
|
|
device='', # cuda device, i.e. 0 or 0,1,2,3 or cpu |
|
|
|
|
|
workers=8, # max dataloader workers (per RANK in DDP mode) |
|
|
single_cls=False, # treat as single-class dataset |
|
|
single_cls=False, # treat as single-class dataset |
|
|
augment=False, # augmented inference |
|
|
augment=False, # augmented inference |
|
|
verbose=False, # verbose output |
|
|
verbose=False, # verbose output |
|
|
|
|
|
|
|
|
pad = 0.0 if task == 'speed' else 0.5 |
|
|
pad = 0.0 if task == 'speed' else 0.5 |
|
|
task = task if task in ('train', 'val', 'test') else 'val' # path to train/val/test images |
|
|
task = task if task in ('train', 'val', 'test') else 'val' # path to train/val/test images |
|
|
dataloader = create_dataloader(data[task], imgsz, batch_size, stride, single_cls, pad=pad, rect=pt, |
|
|
dataloader = create_dataloader(data[task], imgsz, batch_size, stride, single_cls, pad=pad, rect=pt, |
|
|
prefix=colorstr(f'{task}: '))[0] |
|
|
|
|
|
|
|
|
workers=workers, prefix=colorstr(f'{task}: '))[0] |
|
|
|
|
|
|
|
|
seen = 0 |
|
|
seen = 0 |
|
|
confusion_matrix = ConfusionMatrix(nc=nc) |
|
|
confusion_matrix = ConfusionMatrix(nc=nc) |
|
|
|
|
|
|
|
|
parser.add_argument('--iou-thres', type=float, default=0.6, help='NMS IoU threshold') |
|
|
parser.add_argument('--iou-thres', type=float, default=0.6, help='NMS IoU threshold') |
|
|
parser.add_argument('--task', default='val', help='train, val, test, speed or study') |
|
|
parser.add_argument('--task', default='val', help='train, val, test, speed or study') |
|
|
parser.add_argument('--device', default='', help='cuda device, i.e. 0 or 0,1,2,3 or cpu') |
|
|
parser.add_argument('--device', default='', help='cuda device, i.e. 0 or 0,1,2,3 or cpu') |
|
|
|
|
|
parser.add_argument('--workers', type=int, default=8, help='max dataloader workers (per RANK in DDP mode)') |
|
|
parser.add_argument('--single-cls', action='store_true', help='treat as single-class dataset') |
|
|
parser.add_argument('--single-cls', action='store_true', help='treat as single-class dataset') |
|
|
parser.add_argument('--augment', action='store_true', help='augmented inference') |
|
|
parser.add_argument('--augment', action='store_true', help='augmented inference') |
|
|
parser.add_argument('--verbose', action='store_true', help='report mAP by class') |
|
|
parser.add_argument('--verbose', action='store_true', help='report mAP by class') |