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

Fixes in ICDAR and Market-1501 dataset formats #114

Merged
merged 4 commits into from
Feb 26, 2021
Merged

Conversation

yasakova-anastasia
Copy link

@yasakova-anastasia yasakova-anastasia commented Feb 25, 2021

Summary

ICDAR:

  • id replaced with index attribute
  • made the color and center attributes to strings
  • added checks

Market-1501:

  • added saving the file with the names of the images, if save_images = False
  • added checks

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) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

{ i: colormap[i] for i in range(len(colormap)) })
mask = merge_masks(masks)
mask = paint_mask(mask,
{ i: colormap[i] for i in range(len(colormap)) })
Copy link
Contributor

Choose a reason for hiding this comment

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

This can easily consume lots of memory (for instance - imagine an uncompressed 4k video), try not to store masks.

datumaro/plugins/market1501_format.py Outdated Show resolved Hide resolved
datumaro/plugins/market1501_format.py Outdated Show resolved Hide resolved
raise Exception("Item %s: mask must have "
"a three-digit color attribute" % item.id)
if 'center' in ann.attributes:
annotation += ' %s' % ann.attributes['center']
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if we need to store color and center information as text.

@zhiltsov-max zhiltsov-max merged commit 7e7adf6 into develop Feb 26, 2021
@zhiltsov-max zhiltsov-max deleted the ay/little-fixes branch February 26, 2021 17:59
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