o
    .wi	                     @   s   d dl mZ d dlmZ d dlmZmZ d dlmZ 	ddededee	 d	ee	 d
e
defddZ	ddededee	 d	ee	 d
e
defddZdS )    )
Collection)Tensor)modified_panoptic_qualitypanoptic_quality)_deprecated_root_import_funcFpredstargetthingsstuffsallow_unknown_preds_categoryreturnc                 C      t dd t| ||||dS )a[  Wrapper for deprecated import.

    >>> from torch import tensor
    >>> preds = tensor([[[0, 0], [0, 1], [6, 0], [7, 0], [0, 2], [1, 0]]])
    >>> target = tensor([[[0, 1], [0, 0], [6, 0], [7, 0], [6, 0], [255, 0]]])
    >>> _modified_panoptic_quality(preds, target, things = {0, 1}, stuffs = {6, 7})
    tensor(0.7667, dtype=torch.float64)

    r   	detectionr   r   r	   r
   r   )r   r   r    r   j/home/ubuntu/sommelier/.venv/lib/python3.10/site-packages/torchmetrics/functional/detection/_deprecated.py_modified_panoptic_quality	   s   
r   c                 C   r   )a  Wrapper for deprecated import.

    >>> from torch import tensor
    >>> preds = tensor([[[[6, 0], [0, 0], [6, 0], [6, 0]],
    ...                  [[0, 0], [0, 0], [6, 0], [0, 1]],
    ...                  [[0, 0], [0, 0], [6, 0], [0, 1]],
    ...                  [[0, 0], [7, 0], [6, 0], [1, 0]],
    ...                  [[0, 0], [7, 0], [7, 0], [7, 0]]]])
    >>> target = tensor([[[[6, 0], [0, 1], [6, 0], [0, 1]],
    ...                   [[0, 1], [0, 1], [6, 0], [0, 1]],
    ...                   [[0, 1], [0, 1], [6, 0], [1, 0]],
    ...                   [[0, 1], [7, 0], [1, 0], [1, 0]],
    ...                   [[0, 1], [7, 0], [7, 0], [7, 0]]]])
    >>> _panoptic_quality(preds, target, things = {0, 1}, stuffs = {6, 7})
    tensor(0.5463, dtype=torch.float64)

    r   r   r   )r   r   r   r   r   r   _panoptic_quality#   s   
r   N)F)collections.abcr   torchr   4torchmetrics.functional.detection.panoptic_qualitiesr   r   torchmetrics.utilities.printsr   intboolr   r   r   r   r   r   <module>   s@    
