Skip to main content

PyTorch dataset loader for IRVLUTD Door Handle dataset

Project description

IRVLUTD Door Handle Dataset Loader 📦

This Python package provides a PyTorch dataset loader for the IRVLUTD Door Handle dataset, which includes:

  • 🖼️ Images
  • 🌐 Depth maps
  • 🏷️ YOLO-style labels

This package simplifies loading and using the dataset in machine learning workflows. It is a part of the iTeach project.

Area Covered 🌍

Installation ⚙️

pip install IRVLUTDDoorHandleDataset

Usage 📖

Once installed, you can use the IRVLUTDDoorHandleDataset class to load dataset in a PyTorch-compatible format:

from IRVLUTDDoorHandleDataset import IRVLUTDDoorHandleDataset

# Path to the dataset root directory
root_dir = '/path/to/the/data'

# Initialize the dataset
dataset = IRVLUTDDoorHandleDataset(root_dir=root_dir) # by default, only images and label dir are read
dataset = IRVLUTDDoorHandleDataset(root_dir=root_dir, use_depth=True) # to use depth dir as well

# Access the first sample in the dataset
sample = dataset[0]

# Access different components of the sample
image = sample['image']
depth = sample['depth']
labels = sample['labels']  # Bounding boxes in YOLO format (cx, cy, w, h)
class_labels = sample['class_labels']  # Class ID and name for each object

print(f"Image Shape: {image.size}")
print(f"Depth Shape: {depth.size}")
print(f"Labels: {labels}")
print(f"Class Labels: {class_labels}")

Dataset Structure 📂

Download dataset from here.

The dataset should follow this structure:

data/
├── images/ (filename.png)
├── labels/ (filename.txt)
├── depth/ (filename_with_depth.png)
└── obj.names  # Contains class names (e.g., Door, Handle)

Each sample in the dataset shares the same filename (excluding the extension) in both the images and labels directories. The iTeach system assumes that all messages received simultaneously belong to the same set and will assign them the same name as required by YOLO. Due to this assumption, please be aware that there may be inconsistencies when using depth data alongside the color samples.

  • Images: RGB images (e.g., image.png)
  • Depth: Depth images (e.g., depth.png)
  • Labels: YOLO format labels (e.g., label.txt) (Dataloader normalized the coordinates in [0-1] range)
  • obj.names: Class names (e.g., Door, Handle)

Note: This dataloader will work with any detection dataset following the above mentioned file structure and having normalized YOLO bbox labels stored in txt files.

License 📜

This project is licensed under the MIT License.

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

irvlutddoorhandledataset-0.0.2.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file irvlutddoorhandledataset-0.0.2.tar.gz.

File metadata

  • Download URL: irvlutddoorhandledataset-0.0.2.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for irvlutddoorhandledataset-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5cf049682321904d4c3429452d23b157fa7b72d1ceb0aeee260a639b07028bab
MD5 d1b209c4fc701837a077833977581185
BLAKE2b-256 7815be5e1677c2e78455ea3f7e92431253bbf173aa5555f823133f569167e657

See more details on using hashes here.

File details

Details for the file IRVLUTDDoorHandleDataset-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: IRVLUTDDoorHandleDataset-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for IRVLUTDDoorHandleDataset-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 06f01c0d5d48e4086de815c177068cd754566294e1190bf6a82d400c8acd593d
MD5 a86da9880681d8d35df11931815b4c80
BLAKE2b-256 42d6470754df732d2f286478efc0922c276df1134c8f1c4c0c368ec1a8d9230d

See more details on using hashes here.

Supported by

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