Skip to content

Add __repr__ for Dataset#750

Merged
sooahleex merged 5 commits intodevelopfrom
dataset_repr
Nov 1, 2022
Merged

Add __repr__ for Dataset#750
sooahleex merged 5 commits intodevelopfrom
dataset_repr

Conversation

@sooahleex
Copy link
Copy Markdown
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
Copy Markdown
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: []

Comment thread datumaro/components/dataset.py
Comment thread datumaro/components/dataset.py Outdated
Comment thread datumaro/components/dataset.py Outdated
Comment thread datumaro/components/dataset.py Outdated
Copy link
Copy Markdown
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