diff --git a/mediapipe/python/solutions/drawing_utils.py b/mediapipe/python/solutions/drawing_utils.py index 1b8b173f7..ccad38a85 100644 --- a/mediapipe/python/solutions/drawing_utils.py +++ b/mediapipe/python/solutions/drawing_utils.py @@ -119,13 +119,16 @@ def draw_detection( def draw_landmarks( image: np.ndarray, landmark_list: landmark_pb2.NormalizedLandmarkList, - connections: Optional[List[Tuple[int, int]]] = None, - landmark_drawing_spec: Union[DrawingSpec, - Mapping[int, DrawingSpec]] = DrawingSpec( - color=RED_COLOR), - connection_drawing_spec: Union[DrawingSpec, - Mapping[Tuple[int, int], - DrawingSpec]] = DrawingSpec()): + connections: Optional[ + Union[frozenset[Tuple[int, int]], List[Tuple[int, int]]] + ] = None, + landmark_drawing_spec: Optional[Union[ + DrawingSpec, Mapping[int, DrawingSpec] + ]] = None, + connection_drawing_spec: Union[ + DrawingSpec, Mapping[Tuple[int, int], DrawingSpec] + ] = DrawingSpec(), +): """Draws the landmarks and the connections on the image. Args: