def from_detected_object(dobj):
    """Creates a :class:`fiftyone.core.labels.Detection` from an
    ``eta.core.objects.DetectedObject``.

    Args:
        dobj: a ``eta.core.objects.DetectedObject``

    Returns:
        a :class:`fiftyone.core.labels.Detection`
    """
    xtl, ytl, xbr, ybr = dobj.bounding_box.to_coords()
    bounding_box = [xtl, ytl, (xbr - xtl), (ybr - ytl)]

    attributes = _from_eta_attributes(dobj.attrs)

    return fol.Detection(
        label=dobj.label,
        bounding_box=bounding_box,
        confidence=dobj.confidence,
        index=dobj.index,
        mask=dobj.mask,
        tags=dobj.tags,
        **attributes,
    )
Creates a :class:`fiftyone.core.labels.Detection` from an
    ``eta.core.objects.DetectedObject``.

    Args:
        dobj: a ``eta.core.objects.DetectedObject``

    Returns:
        a :class:`fiftyone.core.labels.Detection`
    
fiftyone/utils/eta.py