Spaces:
Paused
Paused
Download mapper/data/kitti/data_module.py from mapitanywhere/testme: direct link, hf CLI and curl.
- Browser
- Download file 808 Bytes
-
https://huggingface.co/spaces/mapitanywhere/testme/resolve/main/mapper/data/kitti/data_module.py
- Command line
-
hf download hf://spaces/mapitanywhere/testme/mapper/data/kitti/data_module.py
-
curl -L -o data_module.py https://huggingface.co/spaces/mapitanywhere/testme/resolve/main/mapper/data/kitti/data_module.py
808 Bytes
| from ..base import DataBase | |
| from .dataset import BEVKitti360Dataset | |
| from ..schema import KITTIDataConfiguration | |
| class BEVKitti360Data(DataBase): | |
| def __init__(self, cfg: KITTIDataConfiguration) -> None: | |
| self.cfg = cfg | |
| self._dataset = {} | |
| def prepare_data(self) -> None: | |
| return | |
| def setup(self, stage: str) -> None: | |
| split = { | |
| 'fit': 'train', | |
| 'val': 'val', | |
| 'validate': 'val', | |
| 'test': 'val', | |
| "train": "train" | |
| }[stage] | |
| self._dataset[stage] = BEVKitti360Dataset( | |
| cfg=self.cfg, | |
| split_name=split | |
| ) | |
| def dataset(self, stage: str): | |
| if self._dataset.get(stage) is None: | |
| self.setup(stage) | |
| return self._dataset[stage] | |