nbStr = "NoBall" if nb else "" ngStr = "NoGoal" if ng else "" nrStr = "NoRobot" if nr else "" nlStr = "NoLine" if nl else "" cameraString = "both" if tc == bc else ("top" if tc else "bottom") scale = 1 if noScale else 4 if nb and ng and nr and nl: print("You need to have at least one non-background class!") exit(-1) labSize = (480.0 / scale, 640.0 / scale) input_transform = Compose([ Scale(scale, Image.BILINEAR), ToYUV(), ToTensor(), Normalize([.5, 0, 0], [.5, .5, .5]), ]) target_transform = Compose([ Scale(scale, Image.NEAREST), ToTensor(), ToLabel(), ]) input_transform_tr = Compose([ Scale(scale, Image.BILINEAR), HorizontalFlip(), VerticalFlip(), ColorJitter(brightness=0.5, contrast=0.5, saturation=0.4, hue=0.3), ToYUV(),
parser.add_argument("--optFlow", help="Use optical flow", action="store_true") args = parser.parse_args() fineTune = args.finetuned pruned = args.pruned optflow = args.optFlow fineTuneStr = "Finetuned" if fineTune else "" pruneStr = "Pruned" if pruned else "" scale = 4 input_transform = Compose([ Scale(scale, Image.BILINEAR), ToYUV(), ToTensor(), Normalize([.5, .0, .0], [.5, .5, .5]), ]) target_transform = Compose([ Scale(scale, Image.NEAREST), ToTensor(), ToLabel(), ]) labSize = (480.0 / scale, 640.0 / scale) outSize = 1.0 / (labSize[0] * labSize[1]) batchSize = 1 root = "./data/LabelProp/Synthetic/"