def to_classifications(results, confidence_thresh=None, store_logits=False):
    """Converts ``ultralytics.YOLO`` classifications to FiftyOne format.

    Args:
        results: a single or list of ``ultralytics.engine.results.Results``
        confidence_thresh (None): a confidence threshold to filter clasifications

    Returns:
        a single or list of :class:`fiftyone.core.labels.Classification`
    """
    single = not isinstance(results, list)
    if single:
        results = [results]

    batch = [
        _to_classifications(
            r, confidence_thresh=confidence_thresh, store_logits=store_logits
        )
        for r in results
    ]

    if single:
        return batch[0]

    return batch
Converts ``ultralytics.YOLO`` classifications to FiftyOne format.

    Args:
        results: a single or list of ``ultralytics.engine.results.Results``
        confidence_thresh (None): a confidence threshold to filter clasifications

    Returns:
        a single or list of :class:`fiftyone.core.labels.Classification`
    
fiftyone/utils/ultralytics.py