def from_yolo_label(
        cls, x_center: float, y_center: float, w: float, h: float
    ) -> BoundingBox:
        """Creates a BoundingBox from YOLO label format.

        Args:
            x_center:
                x coordinate of the center relative to image width.
            y_center:
                y coordinate of the center relative to image height.
            w:
                Width of the bounding box relative to image width.
            h:
                Height of the bounding box relative to image height.

        Returns:
            BoundingBox: A BoundingBox instance.

        Examples:
            >>> bbox = BoundingBox.from_yolo_label(0.5, 0.4, 0.2, 0.3)

        """
        return cls(
            x_center - w / 2,
            y_center - h / 2,
            x_center + w / 2,
            y_center + h / 2,
            clip_values=True,
        )
Creates a BoundingBox from YOLO label format.

        Args:
            x_center:
                x coordinate of the center relative to image width.
            y_center:
                y coordinate of the center relative to image height.
            w:
                Width of the bounding box relative to image width.
            h:
                Height of the bounding box relative to image height.

        Returns:
            BoundingBox: A BoundingBox instance.

        Examples:
            >>> bbox = BoundingBox.from_yolo_label(0.5, 0.4, 0.2, 0.3)

        
lightly/utils/bounding_box.py