FewSOL-DataLoader
This repo hosts the PyTorch dataloader for FewSOL dataset.
Using package
First install the package using
pip install FewSOLDataLoader
Setup
Step-1. Download the FewSOL dataset from https://irvlutd.github.io/FewSOL/#data
- There are four splits of the FewSOL dataset:
real_objects: This is a real single object image split. Each object was captured from 9 anglesreal_clutter: This is a real clutter image split extracted from the OCIDsynthetic_objects: This is a synthetic single object image split made with 3D google objects. Each object was captured from 9 anglesgoogle_clutter: This is a synthetic clutter image split made with 3D google objects- Note: The
google_clutterdataloader may take ~60 seconds to instantiate
- Note: The
- Note: The synthetic portion of the dataset is created using Google 3D Scanned Objects dataset.
Step-2. Pass the extracted dataset directory path into the dataloader as shown in the following example
Usage
Example
import random
from FewSOLDataLoader import load_fewsol_dataloader
# Define the root directory
ROOT_DIR = os.getcwd()
# Define the dataset root directory using the join_path function
DATASET_ROOT_DIR = os.path.join(ROOT_DIR, 'FewSOL', 'data')
data = load_fewsol_dataloader(DATASET_ROOT_DIR, split="real_objects")
# Generate a random index within the range of the dataloader's length
rand_idx = random.randint(0, len(data) - 1)
# Retrieve data from the dataloader for the random index
image_data, mask_data, bbox_data, label, questionnaire, file_name, poses = data[rand_idx]
# Synthetic objects and Real objects split also has a depth functionality
if s in ['synthetic_objects','real_objects']:
depth = test.get_depth(rand_idx)
print("Depth shape:", depth.shape)
Loading Specfic Data in order to speed up the dataloader
# Retrieve data from the dataloader for the random index
# Default loads all data, Data not loaded will be None
image_data, mask_data, bbox_data, label, questionnaire, file_name, poses = data.get_idx(
rand_idx,
load_img=False,
load_mask=True,
load_bbox=True,
load_label=False,
load_que=False,
load_pose=False,
)
Getting indexs for a specfic class
# Gets the list of indexs for that contains a specific class
class_idxs = data.get_class_idx("bowl")
rand_class_idx = class_idxs[random.randint(0, len(class_idxs) - 1)]
Crop desired object using bbox data
# Functions supports 3D(color images) and 2D(no rgb axis)
from FewSOLDataLoader.helpers import crop_obj_using_bbox
rand_obj_idx = random.randint(0, len(label) - 1)
cropped_img = crop_obj_using_bbox(image_data[0], bbox_data[0, rand_obj_idx])
Data Formats
-
Image Data Shape
# n x c x w x h # n = Number of total images # c = Number of Channels (RGB) # w = Width of the Image # h = Height of the image -
Semantic Segmentation Shape
# n x m x w x h # n = Number of total images # m = Total number of objects in the current images # w = Width of the Image # h = Height of the image -
Detection Bounds Shape
# n x m x r # n = Number of total images # m = Total number of objects in the current images # r = 4 : x, y, width, height -
Pose Information
# n x m x 4 x 4 # n = Number of total images # m = Total number of objects in the current images -
Label Output/Description Shape
# m = Total number of objects in the images
Licenses
All files are licensed under the MIT license except for the below two inside FewSOL-DataLoader/src/FewSOLDataLoader/
SingleRealPose.py- licensed under the NVIDIA Source Code License - Non-commercial as found here.CocoFormatConverter.py- licensed under the CC BY 4.0 LEGAL CODE as found here.
Bibtex
Please cite FewSOL if it helps your research:
@INPROCEEDINGS{padalunkal2023fewsol,
title={FewSOL: A Dataset for Few-Shot Object Learning in Robotic Environments},
author={P, Jishnu Jaykumar and Chao, Yu-Wei and Xiang, Yu},
booktitle={2023 IEEE International Conference on Robotics and Automation (ICRA)},
doi={10.1109/ICRA48891.2023.10161143},
pages={9140-9146},
year={2023}
}
Metadata
Release files for FewSOLDataLoader 0.0.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| FewSOLDataLoader-0.0.14.tar.gz | 530.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| FewSOLDataLoader-0.0.14-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / FewSOLDataLoader-0.0.14.tar.gz
| Download URL | FewSOLDataLoader-0.0.14.tar.gz |
|---|---|
| Size | 530.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20e9bd97320a655304252d09e12970a80eb5b30c72ce668a85ac4d48b1e2b54a
|
|
BLAKE2b-256 checksum How to use checksums |
980c804887b60596ae7f47f0840d4343c5aa169f9dd1cd1d3ca7816716b01b4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / FewSOLDataLoader-0.0.14-py3-none-any.whl
| Download URL | FewSOLDataLoader-0.0.14-py3-none-any.whl |
|---|---|
| Size | 538.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eb8bc30dbf693c1c9fd402f8f0abc7d3958d99c5e533d5974a5a9fa6c35136c5
|
|
BLAKE2b-256 checksum How to use checksums |
158ac17ab34b54ccd349d0c822ac99b79371e0042cd4fe3079427d79e5059080
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for FewSOLDataLoader 0.0.14
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.