Dataset Preparation Guide

If you want to use prepared configs to run the Accuracy Checker tool and the Model Quantizer, you need to organize <DATASET_DIR> folder with validation datasets in a certain way. Instructions for preparing validation data are described in this document.

Each dataset description consists of the following sections:

  • instruction for downloading the dataset

  • structure of <DATASET_DIR> that matches the dataset definition in the existing global configuration file (<omz_dir>/data/dataset_definitions.yml)

  • examples of using and presenting the dataset in the global configuration file

More detailed information about using predefined configuration files you can find here.

How download dataset

To download images from ImageNet, you need to have an account and agree to the Terms of Access. Follow the steps below:

  1. Go to the ImageNet homepage

  2. If you have an account, click Login. Otherwise, click Signup in the right upper corner, provide your data, and wait for a confirmation email

  3. Log in after receiving the confirmation email and go to the Download tab

  4. Select Download Original Images

  5. You will be redirected to the Terms of Access page. If you agree to the Terms, continue by clicking Agree and Sign

  6. Click one of the links in the Download as one tar file section to select it

  7. Unpack archive

To download annotation files, you need to follow the steps below:

  • val.txt

    1. Download archive

    2. Unpack val.txt from the archive caffe_ilsvrc12.tar.gz

  • val15.txt

    1. Download annotation file

    2. Rename ILSVRC2017_val.txt to val15.txt

Files layout

To use this dataset with OMZ tools, make sure <DATASET_DIR> contains the following:

  • ILSVRC2012_img_val - directory containing the ILSVRC 2012 validation images

  • val.txt - annotation file used for ILSVRC 2012

  • val15.txt - annotation file used for ILSVRC 2015

Datasets in dataset_definitions.yml

  • imagenet_1000_classes used for evaluation models trained on ILSVRC 2012 dataset with 1000 classes. (model examples: :ref:``alexnet` <doxid-omz_models_model_alexnet>`, :ref:``vgg16` <doxid-omz_models_model_vgg16>`)

  • imagenet_1000_classes_2015 used for evaluation models trained on ILSVRC 2015 dataset with 1000 classes. (model examples: :ref:``se-resnet-152` <doxid-omz_models_model_se_resnet_152>`, :ref:``se-resnext-50` <doxid-omz_models_model_se_resnext_50>`)

  • imagenet_1001_classes used for evaluation models trained on ILSVRC 2012 dataset with 1001 classes (background label + original labels). (model examples: :ref:``googlenet-v2-tf` <doxid-omz_models_model_googlenet_v2_tf>`, :ref:``resnet-50-tf` <doxid-omz_models_model_resnet_50_tf>`)

How download dataset

To download COCO dataset, you need to follow the steps below:

  1. Download ` <http://images.cocodataset.org/zips/val2017.zip>`__ and ` <http://images.cocodataset.org/annotations/annotations_trainval2017.zip>`__

  2. Unpack archives

Files layout

To use this dataset with OMZ tools, make sure <DATASET_DIR> contains the following:

  • val2017 - directory containing the COCO 2017 validation images

  • instances_val2017.json - annotation file which used for object detection and instance segmentation tasks

  • person_keypoints_val2017.json - annotation file which used for human pose estimation tasks

Datasets in dataset_definitions.yml

  • ms_coco_mask_rcnn used for evaluation models trained on COCO dataset for object detection and instance segmentation tasks. Background label + label map with 80 public available object categories are used. Annotations are saved in order of ascending image ID.

  • ms_coco_detection_91_classes used for evaluation models trained on COCO dataset for object detection tasks. Background label + label map with 80 public available object categories are used (original indexing to 91 categories is preserved. You can find more information about object categories labels here). Annotations are saved in order of ascending image ID. (model examples: :ref:``faster_rcnn_resnet50_coco` <doxid-omz_models_model_faster_rcnn_resnet50_coco>`, :ref:``ssd_resnet50_v1_fpn_coco` <doxid-omz_models_model_ssd_resnet50_v1_fpn_coco>`)

  • ms_coco_detection_80_class_with_background used for evaluation models trained on COCO dataset for object detection tasks. Background label + label map with 80 public available object categories are used. Annotations are saved in order of ascending image ID. (model examples: :ref:``faster-rcnn-resnet101-coco-sparse-60-0001` <doxid-omz_models_model_faster_rcnn_resnet101_coco_sparse_60_0001>`, :ref:``ssd-resnet34-1200-onnx` <doxid-omz_models_model_ssd_resnet34_1200_onnx>`)

  • ms_coco_detection_80_class_without_background used for evaluation models trained on COCO dataset for object detection tasks. Label map with 80 public available object categories is used. Annotations are saved in order of ascending image ID. (model examples: :ref:``ctdet_coco_dlav0_384` <doxid-omz_models_model_ctdet_coco_dlav0_384>`, :ref:``yolo-v3-tf` <doxid-omz_models_model_yolo_v3_tf>`)

  • ms_coco_keypoints used for evaluation models trained on COCO dataset for human pose estimation tasks. Each annotation stores multiple keypoints for one image. (model examples: :ref:``human-pose-estimation-0001` <doxid-omz_models_model_human_pose_estimation_0001>`)

  • ms_coco_single_keypoints used for evaluation models trained on COCO dataset for human pose estimation tasks. Each annotation stores single keypoints for image, so several annotation can be associated to one image. (model examples: :ref:``single-human-pose-estimation-0001` <doxid-omz_models_model_single_human_pose_estimation_0001>`)

How download dataset

To download WIDER Face dataset, you need to follow the steps below:

  1. Go to the WIDER FACE website

  2. Go to the Download section

  3. Select WIDER Face Validation images and download them from Google Drive or Tencent Drive

  4. Select and download Face annotations

  5. Unpack archives

Files layout

To use this dataset with OMZ tools, make sure <DATASET_DIR> contains the following:

  • WIDER_val - directory containing images directory

    • images - directory containing the WIDER Face validation images

  • wider_face_split - directory with annotation file

    • wider_face_val_bbx_gt.txt - annotation file

Datasets in dataset_definitions.yml

  • wider used for evaluation models on WIDER Face dataset where the face is the first class. (model example: :ref:``mtcnn` <doxid-omz_models_model_mtcnn>`)

  • wider_without_bkgr used for evaluation models on WIDER Face dataset where the face is class zero. (model examples: :ref:``mobilefacedet-v1-mxnet` <doxid-omz_models_model_mobilefacedet_v1_mxnet>`)

How download dataset

To download VOC2012 dataset, you need to follow the steps below:

  1. Go to the VOC2012 website

  2. Go to the ` <http://host.robots.ox.ac.uk/pascal/VOC/voc2012/#devkit>`__ section

  3. Select ` <http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar>`__ and download archive

  4. Unpack archive

Files layout

To use this dataset with OMZ tools, make sure <DATASET_DIR> contains the following:

  • VOCdevkit/VOC2012 - directory containing annotations, images, segmentation masks and image sets files directories

    • Annotations - directory containing the VOC2012 annotation files

    • JPEGImages - directory containing the VOC2012 validation images

    • ImageSets - directory containing the VOC2012 text files specifying lists of images for different tasks

      • Main/val.txt - image sets file for detection tasks

      • Segmentation/val.txt - image sets file for segmentation tasks

    • SegmentationClass - directory containing the VOC2012 segmentation masks

Datasets in dataset_definitions.yml

  • VOC2012 used for evaluation models on VOC2012 dataset for object detection task. Background label + label map with 20 object categories are used.

  • VOC2012_without_background used for evaluation models on VOC2012 dataset for object detection tasks. Label map with 20 object categories is used.(model examples: :ref:``yolo-v2-ava-0001` <doxid-omz_models_model_yolo_v2_ava_0001>`, :ref:``yolo-v2-tiny-ava-0001` <doxid-omz_models_model_yolo_v2_tiny_ava_0001>`)

  • VOC2012_Segmentation used for evaluation models on VOC2012 dataset for segmentation tasks. Background label + label map with 20 object categories are used.(model examples: :ref:``deeplabv3` <doxid-omz_models_model_deeplabv3>`)

How download dataset

To download VOC2007 dataset, you need to follow the steps below:

  1. Go to the VOC2007 website

  2. Go to the ` <http://host.robots.ox.ac.uk/pascal/VOC/voc2007/#devkit>`__ section

  3. Select ` <http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtrainval_06-Nov-2007.tar>`__ and download archive

  4. Unpack archive

Files layout

To use this dataset with OMZ tools, make sure <DATASET_DIR> contains the following:

  • VOCdevkit/VOC2007 - directory containing annotations, images and image sets files directories

    • Annotations - directory containing the VOC2007 annotation files

    • JPEGImages - directory containing the VOC2007 images

    • ImageSets - directory containing the VOC2007 text files specifying lists of images for different tasks

      • Main/test.txt - image sets file for detection tasks

Datasets in dataset_definitions.yml

  • VOC2007_detection used for evaluation models on VOC2007 dataset for object detection task. Background label + label map with 20 object categories are used. (model examples: :ref:``mobilenet-ssd` <doxid-omz_models_model_mobilenet_ssd>`, :ref:``ssd300` <doxid-omz_models_model_ssd300>`)

  • VOC2007_detection_no_bkgr used for evaluation models on VOC2007 dataset for object detection tasks. Label map with 20 object categories is used.(model examples: :ref:``yolo-v1-tiny-tf` <doxid-omz_models_model_yolo_v1_tiny_tf>`)

How download dataset

To download PASCAL-S dataset, you need to follow the steps below:

  1. Download archive from the The Secrets of Salient Object Segmentation website

  2. Unpack archive

Files layout

To use this dataset with OMZ tools, make sure <DATASET_DIR> contains the following:

  • PASCAL-S - directory containing images and salient region masks subdirectories

    • image - directory containing the PASCAL-S images from the directory datasets/imgs/pascal in the unpacked archive

    • mask - directory containing the PASCAL-S salient region masks from the directory datasets/masks/pascal in the unpacked archive

Datasets in dataset_definitions.yml

  • PASCAL-S used for evaluation models on PASCAL-S dataset for salient object detection task. (model examples: :ref:``f3net` <doxid-omz_models_model_f3net>`)

How download dataset

To download CoNLL2003 dataset, you need to follow the steps below:

  1. Download archive from the CoNLL 2003 (English) Dataset page in the DeepAI Datasets website

  2. Unpack archive

Files layout

To use this dataset with OMZ tools, make sure <DATASET_DIR> contains the following:

  • CONLL-2003 - directory containing annotation files

    • valid.txt - annotation file for CoNLL2003 validation set

Datasets in dataset_definitions.yml

  • CONLL2003_bert_cased used for evaluation models on CoNLL2003 dataset for named entity recognition task. (model examples: :ref:``bert-base-ner` <doxid-omz_models_model_bert_base_ner>`)

How download dataset

To download MRL Eye dataset, you need to follow the steps below:

  1. Download archive from the MRL Eye Dataset website

  2. Unpack archive

Files layout

To use this dataset with OMZ tools, make sure <DATASET_DIR> contains the following:

  • mrlEyes_2018_01 - directory containing subdirectories with dataset images

Datasets in dataset_definitions.yml

  • mrlEyes_2018_01 used for evaluation models on MRL Eye dataset for recognition of eye state. (model examples: :ref:``open-closed-eye-0001` <doxid-omz_models_model_open_closed_eye_0001>`)

How download dataset

To download LFW dataset, you need to follow the steps below:

  1. Go to the Labeled Faces in the Wild website

  2. Go to the Download the database section

  3. Select All images as gzipped tar file and download archive

  4. Unpack archive

  5. Go to the Training, Validation, and Testing section

  6. Select pairs.txt and download pairs file

  7. Download ` <https://raw.githubusercontent.com/clcarwin/sphereface_pytorch/master/data/lfw_landmark.txt>`__ file

Files layout

To use this dataset with OMZ tools, make sure <DATASET_DIR> contains the following:

  • LFW - directory containing images directories, pairs and landmarks files

    • lfw - directory containing the LFW images

    • annotation - directory containing pairs and landmarks files

      • pairs.txt - file with annotation positive and negative pairs for LFW dataset

      • lfw_landmark.txt - file with facial landmarks coordinates for annotation images of LFW dataset

Datasets in dataset_definitions.yml

  • lfw used for evaluation models on LFW dataset for face recognition task. (model examples: :ref:``Sphereface` <doxid-omz_models_model__sphereface>`)

How download dataset

To download NYU Depth Dataset V2 preprocessed data stored in HDF5 format, you need to follow the steps below:

  1. Download archive from the website

  2. Unpack archive

Files layout

To use this dataset with OMZ tools, make sure <DATASET_DIR> contains the following:

  • nyudepthv2/val - directory with dataset official data and converted images and depth map

    • official - directory with data stored in original hdf5 format

    • converted - directory with converted data

      • images - directory with converted images

      • depth - directory with depth maps

Note: If dataset is used in the first time, please set allow_convert_data: True in annotation conversion parameters for this dataset in dataset_definitions.yml or use <omz_dir>/tools/accuracy_checker/accuracy_checker/annotation_converters/convert.py and following command line to get converted data .

convert_annotation nyu_depth_v2 --data_dir <DATASET_DIR>/nyudepthv2/val/official --allow_convert_data True

Datasets in dataset_definitions.yml

  • NYU_Depth_V2 used for evaluation models on NYU Depth Dataset V2 for monocular depth estimation task. (model examples: :ref:``fcrn-dp-nyu-depth-v2-tf` <doxid-omz_models_model_fcrn_dp_nyu_depth_v2_tf>`)