def to_label(self, label, attributes, width, height):
        """Convert this shape to a FiftyOne label.

        Args:
            label: the class label for this shape
            attributes: a dictionary of attributes for this shape
            width: the width of the frame in pixels
            height: the height of the frame in pixels

        Return:
            an :class:`fiftyone.core.labels.Detection`
        """
        num_coords = len(self.coords)
        if num_coords != 4:
            raise ValueError(
                "Expected bounding box to have 4 coordinates, found %d"
                % num_coords
            )

        cx, cy, w, h = self.coords
        x = cx - (w / 2)
        y = cy - (h / 2)
        bounding_box = [x / width, y / height, w / width, h / height]

        _attrs = deepcopy(attributes)
        _attrs.update(self.attributes)

        return fol.Detection(
            label=label,
            bounding_box=bounding_box,
            **_attrs,
        )
Convert this shape to a FiftyOne label.

        Args:
            label: the class label for this shape
            attributes: a dictionary of attributes for this shape
            width: the width of the frame in pixels
            height: the height of the frame in pixels

        Return:
            an :class:`fiftyone.core.labels.Detection`
        
fiftyone/utils/openlabel.py