捷徑

Kitti

class torchvision.datasets.Kitti(root: Union[str, Path], train: bool = True, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, transforms: Optional[Callable] = None, download: bool = False)[source]

KITTI 資料集。

它對應於用於物件偵測的「物件的左側彩色圖像」資料集。

參數:
  • root (str 或 pathlib.Path) –

    圖像下載到的根目錄。 如果 download=False,則期望以下資料夾結構

    <root>
        └── Kitti
            └─ raw
                ├── training
                |   ├── image_2
                |   └── label_2
                └── testing
                    └── image_2
    

  • train (bool, optional) – 如果為 true,則使用 train 分割,否則使用 test 分割。 預設為 train

  • transform (callable, optional) – 一個函數/轉換,它接收一個 PIL 圖像並返回一個轉換後的版本。 例如, transforms.PILToTensor

  • target_transform (callable, optional) – 一個函數/轉換,它接收目標並轉換它。

  • transforms (callable, optional) – 一個函數/轉換,它將輸入樣本及其目標作為條目,並返回一個轉換後的版本。

  • download (bool, optional) – 如果為 true,則從網路下載資料集並將其放入根目錄中。 如果資料集已經下載,則不會再次下載。

特殊成員:

__getitem__(index: int) Tuple[Any, Any][source]

在給定的索引處獲取項目。

參數:

index (int) – 索引

回傳:

(image, target),其中 target 是一個字典列表,具有以下鍵

  • type: str

  • truncated: float

  • occluded: int

  • alpha: float

  • bbox: float[4]

  • dimensions: float[3]

  • locations: float[3]

  • rotation_y: float

回傳型別:

tuple

文件

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources