|
|
@@ -224,6 +224,7 @@ def train(hyp, opt, device, tb_writer=None): |
|
|
|
hyp['box'] *= 3. / nl # scale to layers |
|
|
|
hyp['cls'] *= nc / 80. * 3. / nl # scale to classes and layers |
|
|
|
hyp['obj'] *= (imgsz / 640) ** 2 * 3. / nl # scale to image size and layers |
|
|
|
hyp['label_smoothing'] = opt.label_smoothing |
|
|
|
model.nc = nc # attach number of classes to model |
|
|
|
model.hyp = hyp # attach hyperparameters to model |
|
|
|
model.gr = 1.0 # iou loss ratio (obj_loss = 1.0 or iou) |
|
|
@@ -481,6 +482,7 @@ if __name__ == '__main__': |
|
|
|
parser.add_argument('--exist-ok', action='store_true', help='existing project/name ok, do not increment') |
|
|
|
parser.add_argument('--quad', action='store_true', help='quad dataloader') |
|
|
|
parser.add_argument('--linear-lr', action='store_true', help='linear LR') |
|
|
|
parser.add_argument('--label-smoothing', type=float, default=0.0, help='Label smoothing epsilon') |
|
|
|
parser.add_argument('--upload_dataset', action='store_true', help='Upload dataset as W&B artifact table') |
|
|
|
parser.add_argument('--bbox_interval', type=int, default=-1, help='Set bounding-box image logging interval for W&B') |
|
|
|
parser.add_argument('--save_period', type=int, default=-1, help='Log model after every "save_period" epoch') |