|
|
@ -384,8 +384,8 @@ if __name__ == '__main__':
|
|
|
|
parser.add_argument('--single-cls', action='store_true', help='train as single-class dataset')
|
|
|
|
parser.add_argument('--single-cls', action='store_true', help='train as single-class dataset')
|
|
|
|
opt = parser.parse_args()
|
|
|
|
opt = parser.parse_args()
|
|
|
|
opt.weights = last if opt.resume else opt.weights
|
|
|
|
opt.weights = last if opt.resume else opt.weights
|
|
|
|
opt.cfg = glob.glob('./**/' + opt.cfg, recursive=True)[0] # find file
|
|
|
|
opt.cfg = check_file(opt.cfg) # check file
|
|
|
|
opt.data = glob.glob('./**/' + opt.data, recursive=True)[0] # find file
|
|
|
|
opt.data = check_file(opt.data) # check file
|
|
|
|
print(opt)
|
|
|
|
print(opt)
|
|
|
|
opt.img_size.extend([opt.img_size[-1]] * (2 - len(opt.img_size))) # extend to 2 sizes (train, test)
|
|
|
|
opt.img_size.extend([opt.img_size[-1]] * (2 - len(opt.img_size))) # extend to 2 sizes (train, test)
|
|
|
|
device = torch_utils.select_device(opt.device, apex=mixed_precision, batch_size=opt.batch_size)
|
|
|
|
device = torch_utils.select_device(opt.device, apex=mixed_precision, batch_size=opt.batch_size)
|
|
|
|