def map_crop_type(path): name = PublicSupport.extract_filename_by_path(path) crop_type = CropType.none if crop_by_dot in name.lower(): crop_type = CropType.dot elif crop_by_frame in name.lower(): crop_type = CropType.frame return name, crop_type
def load_images(image_collection): return { PublicSupport.extract_filename_by_path(img_path): img for img, img_path in zip(image_collection, image_collection.files) }