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 byte images #27

Merged
merged 7 commits into from
Oct 1, 2020
Merged

Add byte images #27

merged 7 commits into from
Oct 1, 2020

Conversation

zhiltsov-max
Copy link
Contributor

@zhiltsov-max zhiltsov-max commented Sep 25, 2020

Summary

An optimization for images to avoid their decoding and encoding when it is unnecessary, but the data comes not from files on disk, e.g. video frames or downloaded data. In case of jpeg this allows to keep source quality.

Needed to implement raw data copying in CVAT (cvat-ai/cvat#2229)

  • Added ByteImage class to represent encoded images
  • Added image data checks in tests, by default enabled when data is available
  • Fixed wrong indentation in VOC format converter, which led to extra disk writes for each image
  • Removed image/depth field support in VOC converter to avoid unnecessary image reading
  • Fixed image extension comparison when extensions in different cases

How to test

Unit tests

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

@zhiltsov-max zhiltsov-max changed the title [WIP] Add byte images Add byte images Sep 29, 2020
@zhiltsov-max zhiltsov-max merged commit dfdde5a into develop Oct 1, 2020
@zhiltsov-max zhiltsov-max deleted the zm/byteimage branch October 1, 2020 14:41
This was referenced Oct 5, 2020
zhiltsov-max pushed a commit that referenced this pull request Oct 5, 2020
Added:
- `ByteImage` class to represent encoded images in memory and avoid recoding on save (<#27>)

Changed:
- Implementation of format plugins simplified (<#22>)
- `default` is now a default subset name, instead of `None`. The values are interchangeable. (<#22>)
- Improved performance of transforms (<#22>)

Removed:
- `image/depth` value from VOC export (<#27>)

Fixed:
- Zero division errors in dataset statistics (<#31>)
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.

1 participant