Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add __repr__ for Dataset #750

Merged
merged 5 commits into from
Nov 1, 2022
Merged

Add __repr__ for Dataset #750

merged 5 commits into from
Nov 1, 2022

Conversation

sooahleex
Copy link
Contributor

Summary

Added repr for Dataset.

  • Dataset size
  • source_path
  • media_type
  • annotated_count
  • subset_count
  • categories_count

How to test

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2021 Intel Corporation
#
# SPDX-License-Identifier: MIT

@sooahleex
Copy link
Contributor Author

sooahleex commented Oct 26, 2022

It worked for

dm.Dataset.import_from('./tests/assets/voc_dataset/voc_dataset1', format='voc')

as

Dataset
	size=2
	source_path=./tests/assets/voc_dataset/voc_dataset1
	media_type=<class 'datumaro.components.media.Image'>
	annotated_count=1
subsets
	test: # of items=1, # of annotations=0, annotation types=[]
	train: # of items=1, # of annotations=1, annotation types=['mask', 'bbox', 'label']
categories
	label: ['background', 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor', 'ignored', 'head', 'hand', 'foot']
	mask: []

datumaro/components/dataset.py Show resolved Hide resolved
datumaro/components/dataset.py Outdated Show resolved Hide resolved
datumaro/components/dataset.py Outdated Show resolved Hide resolved
datumaro/components/dataset.py Outdated Show resolved Hide resolved
Copy link
Contributor

@vinnamkim vinnamkim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@sooahleex sooahleex merged commit 9c46c8f into develop Nov 1, 2022
@sooahleex sooahleex deleted the dataset_repr branch November 1, 2022 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants