:py:mod:`tonic.datasets.dsec`
=============================

.. py:module:: tonic.datasets.dsec


Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

   tonic.datasets.dsec.DSEC




.. py:class:: DSEC(save_to: str, split: str | list[str], data_selection: str | list[str], target_selection: str | list[str] | None = None, transform: collections.abc.Callable | None = None, target_transform: collections.abc.Callable | None = None, transforms: collections.abc.Callable | None = None)


   Bases: :py:obj:`tonic.dataset.Dataset`

   `DSEC <https://dsec.ifi.uzh.ch/>`_

   This is a fairly large dataset, so in order to save some disk space, event and image zips
   are deleted after extraction. If your download gets interrupted and you are left with a
   corrupted file on disk, Tonic will not be able to detect that and just proceed to download
   files that are not yet on disk. If you experience issues loading a particular recording,
   delete that folder manually and Tonic will re-download it the next time.
   Optical flow targets are not available for every recording, so if you select optical flow targets,
   only a subset of 18 training recordings will be selected.

   .. note:: To be able to read this dataset, you will need `hdf5plugin`, `PIL` and `imageio` packages installed.

   :param save_to: Location to save files to on disk.
   :type save_to: str
   :param split: Can be 'train', 'test' or a selection of individual recordings such as 'interlaken_00_c'
                 or ['thun_00_a', 'zurich_city_00_a']. Cannot mix across train/test.
   :type split: str
   :param data_selection: Select which data to load per sample. Can be 'events_left', 'events_right',
                          'images_rectified_left', 'images_rectified_right', 'image_timestamps' or
                          any combination thereof in a list.
   :type data_selection: str
   :param target_selection: Select which targets to load per sample. Can be 'disparity_events',
                            'disparity_images', 'disparity_timestamps',
                            'optical_flow_forward_event', 'optical_flow_forward_timestamps',
                            'optical_flow_backward_event', 'optical_flow_backward_timestamps'
                            or a combination thereof in a list. Note that optical flow targets
                            are not available for every recording.
   :type target_selection: str, optional
   :param transform: A callable of transforms to apply to the data.
   :type transform: callable, optional
   :param target_transform: A callable of transforms to apply to the targets/labels.
   :type target_transform: callable, optional
   :param transforms: A callable of transforms that is applied to both data and
                      labels at the same time.
   :type transforms: callable, optional

   .. py:attribute:: base_url
      :value: 'https://download.ifi.uzh.ch/rpg/DSEC/'

      

   .. py:attribute:: recordings

      

   .. py:attribute:: data_names

      

   .. py:attribute:: target_names

      

   .. py:attribute:: sensor_size
      :value: (640, 480, 2)

      

   .. py:attribute:: dtype

      

   .. py:attribute:: ordering

      

   .. py:method:: __getitem__(index)

      :returns: a tuple of (data, target) where data is another tuple of data_selction and target
                a tuple of target_selection if train=True.


   .. py:method:: __len__()



