Skip to main content

Nvidia Dataset Utilities

Project description

Nvidia Dataset Utilities (NVDU)

This project is a collection of Python scripts to help work with datasets for deep learning. For example, visualizing annotation data associated with captured sensor images generated by NVIDIA Deep learning Dataset Synthesizer (NDDS) https://github.com/NVIDIA/Dataset_Synthesizer.

This module depends on OpenCV-python which currently doesn't work with Python 3.7.

Example of a dataset frame visualized using NVDU, showing axes and 3D cuboids for annotated objects.

Table of Contents

Install

Install from pip:

pip install nvdu

Install from source code git repo:

Clone the repo

Using ssh path:

git clone ssh://git@github.com:12051/NVIDIA/Dataset_Utilities.git

Using https path:

git clone https://github.com/NVIDIA/Dataset_Utilities.git

Go inside the cloned repo's directory

cd Dataset_Utilities

Install locally

pip install -e .

nvdu_ycb

nvdu_ycb command help download, extract and align the YCB 3d models (which are used in the FAT dataset: http://research.nvidia.com/publication/2018-06_Falling-Things).

Usage

usage: nvdu_ycb [-h] [-s] [-l] [ycb_object_name]

NVDU YCB models Support

positional arguments:
  ycb_object_name  Name of the YCB object to check.

optional arguments:
  -h, --help       show this help message and exit
  -s, --setup      Setup the YCB models for the FAT dataset
  -l, --list       List all the supported YCB objects

NOTE: If you don't run the nvdu_ycb --setup before trying to use nvdu_viz, the visualizer will not be able to find the 3d models of the YCB object to overlay.

nvdu_viz

nvdu_viz command visualizes the annotated datasets using the NDDS format.

Usage

nvdu_viz [-h] [-a DATA_ANNOT_DIR] [-s SIZE SIZE]
                [-o OBJECT_SETTINGS_PATH] [-c CAMERA_SETTINGS_PATH]
                [-m MODEL_DIR] [-n [NAME_FILTERS [NAME_FILTERS ...]]]
                [--fps FPS] [--auto_change] [-e EXPORT_DIR] [--auto_export]
                [--ignore_fixed_transform]
                [dataset_dir]

NVDU Data Visualiser

positional arguments:
  dataset_dir           Dataset directory. This is where all the images
                        (required) and annotation info (optional) are.
                        Defaults to the current directory.

optional arguments:
  -h, --help            show this help message and exit.
  -a DATA_ANNOT_DIR, --data_annot_dir DATA_ANNOT_DIR
                        Directory path - where to find the annotation data.
                        Defaults to be the same directory as the dataset
                        directory.
  -s SIZE SIZE, --size SIZE SIZE
                        Window's size: [width, height]. If not specified then
                        the window is sized to fit the resolution of the camera.
  -o OBJECT_SETTINGS_PATH, --object_settings_path OBJECT_SETTINGS_PATH
                        Object settings file path.
  -c CAMERA_SETTINGS_PATH, --camera_settings_path CAMERA_SETTINGS_PATH
                        Camera settings file path.
  -n [NAME_FILTERS [NAME_FILTERS ...]], --name_filters [NAME_FILTERS [NAME_FILTERS ...]]
                        The name filter of each frame. e.g: *.png.
  --fps FPS             How fast to automatically change frame.
  --auto_change         When using this flag, the visualizer will automatically
                        change the frame.
  -e EXPORT_DIR, --export_dir EXPORT_DIR
                        Directory path - where to store the visualized images.
                        If this is set, the script will automatically export
                        the visualized image to the export directory.
  --auto_export         When using this flag, the visualizer will automatically
                        export the visualized frame to an image file in the
                        `export_dir` directory.
  --ignore_fixed_transform
                        When using this flag, the visualizer will not use the
                        fixed transform matrix for the 3d model.

NOTE: The nvdu_viz script can work from any directory

Examples

Visualize a dataset generated by NDDS:

  1. Visualize the current directory:
nvdu_viz
  1. Visualize a relative path:
nvdu_viz ../a_dataset
  1. Visualize an absolute path:
nvdu_viz ~/data/dataset
  1. Visualize different aspect of a frame using a filter:
nvdu_viz dataset_path --name_filters *.left.png *.right.png

Visualize a set of images using different annotation data:

  1. The camera and object settings files are in the image directory:
nvdu_viz image_directory_here -a annotation_directory_here
  1. The camera and object settings files are NOT in the image directory:
nvdu_viz image_directory_here -a annotation_directory_here -c camera_setting_path_here -o object_setting_path_here

Controls

Visualization options:

F3 - Toggle the 2d cuboid
F4 - Toggle the 3d cuboid
F5 - Toggle the 3d models
F6 - Toggle the axes
F7 - Toggle the overlay frame name
1 - Render the 3d models normally
2 - Render the 3d models using only the edge lines
3 - Render the 3d models as point clouds

Other:

ESC - Quit the visualizer
Right - Go to the next frame
Left - Go to the previous frame
Up - Go to the next 100 frame
Down - Go to the previous 100 frame
Space - Toggle frame auto-changing
F12 - Toggle exporting the visualized frame to file

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nvdu-1.0.0.0.tar.gz (28.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nvdu-1.0.0.0-py2.py3-none-any.whl (46.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file nvdu-1.0.0.0.tar.gz.

File metadata

  • Download URL: nvdu-1.0.0.0.tar.gz
  • Upload date:
  • Size: 28.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.3

File hashes

Hashes for nvdu-1.0.0.0.tar.gz
Algorithm Hash digest
SHA256 8fec5784a5acf3eb45c4f4b297cafb54a43855534d65edf0c24467faae80f7be
MD5 9b09731299073d49bb22be9e28dd63ad
BLAKE2b-256 83a06d0c1017faf750a3c14bce2b3d5fe42950f397f5c26102c2717a21606d8b

See more details on using hashes here.

File details

Details for the file nvdu-1.0.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: nvdu-1.0.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 46.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.3

File hashes

Hashes for nvdu-1.0.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 afbf0ab34a5a55f5fbe20d0c0edc42a392570c3f397e02f8cae2951b9c9a47bd
MD5 bf825695379bd3aae27b9035e1830981
BLAKE2b-256 7dc0d5b08d4268afbe1507b94b3ea9f913c16bb8821c097e834941a0d38648be

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page