def normalize_coords(self, image_size: ImageSize): if self.normalized_coords: return self.center = convert_coord_to_normalized( self.center, image_size.height, image_size.width ) self.radiuses = convert_coord_to_normalized( self.radiuses, image_size.height, image_size.width ) self.normalized_coords = True
def normalize_coords(self, image_size: ImageSize): if self.normalized_coords: return self.corner1 = convert_coord_to_normalized( self.corner1, image_size.height, image_size.width ) self.corner2 = convert_coord_to_normalized( self.corner2, image_size.height, image_size.width ) self.normalized_coords = True
def normalize_coords(self, image_size: ImageSize): if self.normalized_coords: return self.coordinates = [ convert_coord_to_normalized(coords, image_size.height, image_size.width) for coords in self.coordinates ] self.normalized_coords = True