跳转到主要内容
SDK Version: 2.5.0

Datasets

API reference for registered dataset classes in DX-ModelZoo, including constructors, return formats, and resources for supported datasets.

Module: dx_modelzoo.dataset

Overview​

All datasets inherit from DatasetBase and are registered via DATASET_REGISTRY. Each class is registered with @DATASET_REGISTRY.register — if no explicit key is provided, the class name is used as the registry key.

from dx_modelzoo.dataset import DATASET_REGISTRY

# Look up a dataset class by registry key
dataset_cls = DATASET_REGISTRY.get("ILSVRC2012")
dataset = dataset_cls(data_dir="/path/to/data")

See DataLoader for DatasetBase interface details.

Summary​

The following table lists all registered dataset classes:

Registry KeyClassTaskModule
AFLW20003DAFLW20003D3D Face Landmarkdx_modelzoo.dataset.aflw20003d
ADE20KADE20KSemantic Segmentationdx_modelzoo.dataset.ade20k
BDD100KBDD100KPanoptic Driving Perception / Vehicle Detectiondx_modelzoo.dataset.bdd100k
BSD100BSD100Super Resolutiondx_modelzoo.dataset.bsd
BSD68BSD68Image Denoisingdx_modelzoo.dataset.bsd
CBSD68CBSD68Image Denoisingdx_modelzoo.dataset.bsd
CamVidCamVidSemantic Segmentationdx_modelzoo.dataset.camvid
COCOCOCOInstance Segmentationdx_modelzoo.dataset.coco
COCOPoseCOCOPosePose Estimationdx_modelzoo.dataset.coco
COCOPoseTopDownCOCOPoseTopDownPose Estimation (Top-Down)dx_modelzoo.dataset.coco
COCOPersonSegCOCOPersonSegPerson Segmentationdx_modelzoo.dataset.coco
CelebACelebAFace Attributedx_modelzoo.dataset.celeba
CityscapesCityscapesSemantic Segmentationdx_modelzoo.dataset.cityscapes
DOTAv1DOTAv1Oriented Object Detectiondx_modelzoo.dataset.dotav1
Distinctions646Distinctions646Image Mattingdx_modelzoo.dataset.distinctions646
HandKeypointsHandKeypointsHand Landmarkdx_modelzoo.dataset.hand_keypoints
HandKeypointsDetectionHandKeypointsDetectionHand Detectiondx_modelzoo.dataset.hand_keypoints
HOPEHOPEObject Pose Estimationdx_modelzoo.dataset.hope
HPatchesHPatchesKeypoint Detectiondx_modelzoo.dataset.hpatches
ILSVRC2012ILSVRC2012Image Classificationdx_modelzoo.dataset.imagenet
ImageNetTextImageNetTextImage Retrievaldx_modelzoo.dataset.imagenet
KITTIKITTI3D Object Detectiondx_modelzoo.dataset.kitti
LFWLFWFace Recognitiondx_modelzoo.dataset.lfw
LOLLOLLow-Light Enhancementdx_modelzoo.dataset.lol
Market1501Market1501Person Re-IDdx_modelzoo.dataset.market1501
MVTecADMVTecADDatasetAnomaly Detectiondx_modelzoo.dataset.mvtec
NYUDepthv2NYUDepthv2Depth Estimationdx_modelzoo.dataset.nyu
ObjectronObjectron3D Object Detection / Posedx_modelzoo.dataset.objectron
OxfordIIITPetOxfordIIITPetSemantic Segmentationdx_modelzoo.dataset.oxford_iiit_pet
PETAPETAPedestrian Attributedx_modelzoo.dataset.peta
PascalVOC2007PascalVOC2007Object Detectiondx_modelzoo.dataset.voc
PascalVOC2012PascalVOC2012Semantic Segmentationdx_modelzoo.dataset.voc
WiderFaceWiderFaceFace Detectiondx_modelzoo.dataset.widerface

Classification​

ImageNet ILSVRC2012​

Module: dx_modelzoo.dataset.imagenet

Registry key: ILSVRC2012

Task: Image Classification

Constructor​

class ILSVRC2012(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]img
[1]label

Resources​

ImageNet Text Prompts​

Module: dx_modelzoo.dataset.imagenet

Registry key: ImageNetText

Task: Image Retrieval

Notes: Converts ImageNet class prompts into CLIP text-transformer inputs used as text queries against a precomputed image-embedding gallery.

Object Detection​

DOTA v1​

Module: dx_modelzoo.dataset.dotav1

Registry key: DOTAv1

Task: Oriented Object Detection

Constructor​

class DOTAv1(DatasetBase):
def __init__(self, data_dir: str, split: str = 'val')
ParameterTypeDefault
data_dirstr(required)
splitstr'val'

__getitem__ Return Format​

IndexElement
[0]img
[1]origin_img.shape
[2]self.ids[idx]

Resources​

  • Download: DOTA v1
  • License: Research use only

PascalVOC2007​

Module: dx_modelzoo.dataset.voc

Registry key: PascalVOC2007

Task: Object Detection

Constructor​

class PascalVOC2007(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]self.preprocessing(image)
[1]image.shape
[2]idx

Dependencies​

  • faster_coco_eval

Resources​

BDD100K​

Module: dx_modelzoo.dataset.bdd100k

Registry key: BDD100K

Task: Panoptic Driving Perception / Vehicle Detection

Notes: Provides aligned validation samples for YOLOPv2-style evaluation: vehicle boxes plus drivable-area and lane masks.

KITTI​

Module: dx_modelzoo.dataset.kitti

Registry key: KITTI

Task: 3D Object Detection

Notes: Converts LiDAR point clouds into a Bird's-Eye-View (BEV) map for SFA3D-style evaluation. Ground-truth 3D boxes are read from label_2 and projected into LiDAR coordinates.

Constructor​

class KITTI(DatasetBase):
def __init__(self, data_dir: str, split: str = "val")
ParameterTypeDefault
data_dirstr(required)
splitstr"val"

__getitem__ Return Format​

IndexElement
[0]self.preprocessing(bev)
[1]bev.shape
[2]sample_id

Resources​

Segmentation​

COCO 2017​

Module: dx_modelzoo.dataset.coco

Registry key: COCO

Task: Instance Segmentation

Constructor​

class COCO(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]img
[1]origin_shape
[2]int(self.ids[idx])

Dependencies​

  • faster_coco_eval

Resources​

Cityscapes​

Module: dx_modelzoo.dataset.cityscapes

Registry key: Cityscapes

Task: Semantic Segmentation

Constructor​

class Cityscapes(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]img
[1]label

Class Constants​

  • num_class = 19

Resources​

  • Download: Cityscapes
  • License: Academic/Research use only

ADE20K​

Module: dx_modelzoo.dataset.ade20k

Registry key: ADE20K

Task: Semantic Segmentation

Notes: SceneParse150 / ADEChallengeData2016 dataset with num_class = 150. Validation labels are remapped from dataset IDs to model indices.

Oxford-IIIT Pet​

Module: dx_modelzoo.dataset.oxford_iiit_pet

Registry key: OxfordIIITPet

Task: Semantic Segmentation

Constructor​

class OxfordIIITPet(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]img
[1]label

Class Constants​

  • num_class = 3

Resources​

  • Download: Oxford-IIIT Pet
  • License: CC BY-SA 4.0 (free for research and commercial use)

PascalVOC2012​

Module: dx_modelzoo.dataset.voc

Registry key: PascalVOC2012

Task: Semantic Segmentation

Constructor​

class PascalVOC2012(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]img
[1]label

Class Constants​

  • num_class = 21

Dependencies​

  • faster_coco_eval

Resources​

CamVid​

Module: dx_modelzoo.dataset.camvid

Registry key: CamVid

Task: Semantic Segmentation

Constructor​

class CamVid(DatasetBase):
def __init__(self, data_dir: str, split: str = "val")
ParameterTypeDefault
data_dirstr(required)
splitstr"val"

__getitem__ Return Format​

IndexElement
[0]self.preprocessing(image)
[1]label

Class Constants​

  • num_class = 11

Resources​

  • Download: CamVid
  • License: Research/non-commercial use only

Pose / Landmark​

AFLW2000-3D​

Module: dx_modelzoo.dataset.aflw20003d

Registry key: AFLW20003D

Task: 3D Face Landmark

Constructor​

class AFLW20003D(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]face_crop
[1]gt_landmarks
[2]bbox_size
[3]yaw_deg
[4]idx

Class Constants​

  • NUM_KEYPOINTS = 68

Dependencies​

  • scipy

Resources​

COCOPose​

Module: dx_modelzoo.dataset.coco

Registry key: COCOPose

Task: Pose Estimation

Constructor​

class COCOPose(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]img
[1]origin_shape
[2]int(self.ids[idx])

Dependencies​

  • faster_coco_eval

Resources​

COCOPoseTopDown​

Module: dx_modelzoo.dataset.coco

Registry key: COCOPoseTopDown

Task: Pose Estimation (Top-Down)

Notes: Each sample is a single-person crop from a COCO validation image, using GT bounding boxes with 25% padding. Keypoints are transformed into crop coordinates.

Constructor​

class COCOPoseTopDown(DatasetBase):
def __init__(
self,
data_dir: str,
bbox_pad_ratio: float = 0.25,
square_crop: bool = False,
model_input_w: int = 192,
model_input_h: int = 256,
)
ParameterTypeDefault
data_dirstr(required)
bbox_pad_ratiofloat0.25
square_cropboolFalse
model_input_wint192
model_input_hint256

__getitem__ Return Format​

IndexElement
[0]crop (preprocessed)
[1]gt_bbox
[2]crop_params
[3]kpts_crop
[4]visibility
[5]img_id
[6]ann_id

Dependencies​

  • faster_coco_eval

Resources​

HOPE​

Module: dx_modelzoo.dataset.hope

Registry key: HOPE

Task: Object Pose Estimation

Notes: HOPE-Image validation dataset for single-object 6-DoF pose evaluation. Supports DOPE-style projected cuboid keypoints and object geometry.

Objectron​

Module: dx_modelzoo.dataset.objectron

Registry key: Objectron

Task: 3D Object Detection / Object Pose Estimation

Notes: Reads native TFRecord test shards directly and returns 9-point 2D keypoints for cuboid-based evaluation.

HPatches​

Module: dx_modelzoo.dataset.hpatches

Registry key: HPatches

Task: Keypoint Detection

Notes: Sequence dataset with reference/target image pairs and homographies for repeatability and matching evaluation.

Hand Keypoints​

Module: dx_modelzoo.dataset.hand_keypoints

Registry key: HandKeypoints

Task: Hand Landmark

Constructor​

class HandKeypoints(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]crop
[1]gt_kpts.astype(np.float32)
[2]idx

Class Constants​

  • NUM_KEYPOINTS = 21

Resources​

  • License: Custom dataset

Hand Keypoints Detection​

Module: dx_modelzoo.dataset.hand_keypoints

Registry key: HandKeypointsDetection

Task: Hand Detection

Notes: Whole-image hand detection view of the hand-keypoints dataset — returns the full preprocessed image with all hand bounding boxes for AP evaluation (unlike HandKeypoints, which crops a single rotated hand).

Constructor​

class HandKeypointsDetection(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]image (preprocessed)
[1]boxes (normalized xyxy)
[2](h, w)
[3]img_path

Resources​

  • License: Custom dataset

Face​

CelebA​

Module: dx_modelzoo.dataset.celeba

Registry key: CelebA

Task: Face Attribute

Constructor​

class CelebA(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]img
[1]labels
[2]idx

Class Constants​

  • NUM_ATTRIBUTES = 40

Resources​

  • Download: CelebA
  • License: Non-commercial research only

LFW (Labeled Faces in the Wild)​

Module: dx_modelzoo.dataset.lfw

Registry key: LFW

Task: Face Recognition

Constructor​

class LFW(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]img1
[1]img2
[2]label

Resources​

WiderFace​

Module: dx_modelzoo.dataset.widerface

Registry key: WiderFace

Task: Face Detection

Constructor​

class WiderFace(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]self.preprocessing(img)
[1]img.shape
[2]file_path

Dependencies​

  • scipy

Resources​

  • Download: WiderFace
  • License: Non-commercial research only

Person​

PETA (PEdesTrian Attribute)​

Module: dx_modelzoo.dataset.peta

Registry key: PETA

Task: Pedestrian Attribute

Constructor​

class PETA(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]img
[1]labels
[2]idx

Dependencies​

  • scipy

Resources​

COCOPersonSeg​

Module: dx_modelzoo.dataset.coco

Registry key: COCOPersonSeg

Task: Person Segmentation

Notes: Builds a binary person-vs-background mask (0=bg, 1=person) by rasterizing the union of all COCO person instance segmentations.

Constructor​

class COCOPersonSeg(DatasetBase):
def __init__(
self,
data_dir: str,
inputs=None,
ann_file: str | None = None,
person_only: bool = True,
**kwargs,
)
ParameterTypeDefault
data_dirstr(required)
inputslist[dict] | NoneNone
ann_filestr | NoneNone
person_onlyboolTrue

__getitem__ Return Format​

IndexElement
[0]image (preprocessed)
[1]label (binary mask)

Class Constants​

  • num_class = 2

Dependencies​

  • faster_coco_eval

Resources​

Image Restoration​

BSD100​

Module: dx_modelzoo.dataset.bsd

Registry key: BSD100

Task: Super Resolution

Constructor​

class BSD100(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]lr_image
[1]hr_image

Resources​

  • Download: BSD100
  • License: BSD license (free for research and commercial use)

BSD68​

Module: dx_modelzoo.dataset.bsd

Registry key: BSD68

Task: Image Denoising

Constructor​

class BSD68(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]self.preprocessing(origin_img)
[1]origin_img

Resources​

  • Download: BSD68
  • License: BSD license (free for research and commercial use)

CBSD68​

Module: dx_modelzoo.dataset.bsd

Registry key: CBSD68

Task: Image Denoising

Constructor​

class CBSD68(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]self.preprocessing(origin_img)
[1]origin_img

Resources​

  • Download: CBSD68
  • License: BSD license (free for research and commercial use)

LOL (Low-Light)​

Module: dx_modelzoo.dataset.lol

Registry key: LOL

Task: Low-Light Enhancement

Constructor​

class LOL(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]low_img
[1]high_img

Resources​

Depth​

NYU Depth v2​

Module: dx_modelzoo.dataset.nyu

Registry key: NYUDepthv2

Task: Depth Estimation

Constructor​

class NYUDepthv2(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]self.preprocessing(rgb)
[1]self.label_preprocessing(depth)

Dependencies​

  • h5py

Resources​

Other​

Market-1501​

Module: dx_modelzoo.dataset.market1501

Registry key: Market1501

Task: Other

Constructor​

class Market1501(DatasetBase):
def __init__(self, data_dir: str)
ParameterTypeDefault
data_dirstr(required)

__getitem__ Return Format​

IndexElement
[0]img
[1]idx

Resources​

Distinctions-646​

Module: dx_modelzoo.dataset.distinctions646

Registry key: Distinctions646

Task: Image Matting

Notes: Composites foreground/alpha pairs onto PASCAL VOC 2012 backgrounds in memory; no derived val/ directory is required.

Constructor​

class Distinctions646(DatasetBase):
def __init__(
self,
data_dir: str,
split: str = "val",
background_dir: str | None = None,
)
ParameterTypeDefault
data_dirstr(required)
splitstr"val"
background_dirstr | NoneNone (resolves to the sibling PascalVOC dataset under data_dir)

__getitem__ Return Format​

IndexElement
[0]self.preprocessing(composite)
[1]alpha (float32, normalized [0, 1])

Resources​

MVTec AD​

Module: dx_modelzoo.dataset.mvtec

Registry key: MVTecAD

Task: Anomaly Detection

Notes: Yields one test image per index with its image-level label (0=good, 1=anomalous), category name, and ground-truth mask path. Also exposes train_files() for building a PatchCore memory bank / EfficientAD statistics.

Constructor​

class MVTecADDataset(DatasetBase):
def __init__(
self,
data_dir: str,
category: Optional[Union[str, List[str]]] = None,
max_train_images: int = 0,
)
ParameterTypeDefault
data_dirstr(required)
categorystr | list[str] | NoneNone (all categories)
max_train_imagesint0 (use all)

__getitem__ Return Format​

IndexElement
[0]img (preprocessed)
[1]label (0=good, 1=anomalous)
[2]category
[3]mask_path

Resources​

  • Download: MVTec AD
  • License: Non-commercial research/education use only