def get_transform(train, args): if train: return presets.DetectionPresetTrain(args.data_augmentation) elif not args.weights: return presets.DetectionPresetEval() else: weights = PM.get_weight(args.weights) return weights.transforms()
def get_transform(train, args): if train: return presets.DetectionPresetTrain(data_augmentation=args.data_augmentation) elif args.weights and args.test_only: weights = torchvision.models.get_weight(args.weights) trans = weights.transforms() return lambda img, target: (trans(img), target) else: return presets.DetectionPresetEval()
def get_transform(train, args): if train: return presets.DetectionPresetTrain(args.data_augmentation) elif not args.prototype: return presets.DetectionPresetEval() else: if args.weights: weights = prototype.models.get_weight(args.weights) return weights.transforms() else: return prototype.transforms.CocoEval()
def get_transform(train): return presets.DetectionPresetTrain( ) if train else presets.DetectionPresetEval()
def get_transform(train, data_augmentation): return presets.DetectionPresetTrain( data_augmentation) if train else presets.DetectionPresetEval()