o
    _{j�  ã                   @   s4   d dl mZ d dlmZ e ¡ G dd„ deƒƒZdS )é   )ÚDATASETS)ÚVideoDatasetc                       s    e Zd ZdZ‡ fdd„Z‡  ZS )ÚImageDataseta5  Image dataset for action recognition, used in the Project OmniSource.

    The dataset loads image list and apply specified transforms to return a
    dict containing the image tensors and other information. For the
    ImageDataset

    The ann_file is a text file with multiple lines, and each line indicates
    the image path and the image label, which are split with a whitespace.
    Example of a annotation file:

    .. code-block:: txt

        path/to/image1.jpg 1
        path/to/image2.jpg 1
        path/to/image3.jpg 2
        path/to/image4.jpg 2
        path/to/image5.jpg 3
        path/to/image6.jpg 3

    Example of a multi-class annotation file:

    .. code-block:: txt

        path/to/image1.jpg 1 3 5
        path/to/image2.jpg 1 2
        path/to/image3.jpg 2
        path/to/image4.jpg 2 4 6 8
        path/to/image5.jpg 3
        path/to/image6.jpg 3

    Args:
        ann_file (str): Path to the annotation file.
        pipeline (list[dict | callable]): A sequence of data transforms.
        **kwargs: Keyword arguments for ``BaseDataset``.
    c                    s   t ƒ j||fdd i|¤Ž d S )NÚstart_index)ÚsuperÚ__init__)ÚselfÚann_fileÚpipelineÚkwargs©Ú	__class__© ú5/root/disk_3tb/HAC/mmaction/datasets/image_dataset.pyr   +   s   zImageDataset.__init__)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ú__classcell__r   r   r   r   r      s    $r   N)Úregistryr   Úvideo_datasetr   Úregister_moduler   r   r   r   r   Ú<module>   s    