Skip to content

Commit

Permalink
Fixes in CIFAR dataset format (cvat-ai#243)
Browse files Browse the repository at this point in the history
* Add folder creation

* Update changelog
  • Loading branch information
yasakova-anastasia authored May 17, 2021
1 parent 5412c84 commit 8c7bbc5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Support for escaping in attribiute values in LabelMe format (<https://github.com/openvinotoolkit/datumaro/issues/49>)
- Support for Segmentation Splitting (<https://github.com/openvinotoolkit/datumaro/pull/223>)
- Support for CIFAR-10/100 dataset format (<https://github.com/openvinotoolkit/datumaro/pull/225>)
- Support for CIFAR-10/100 dataset format (<https://github.com/openvinotoolkit/datumaro/pull/225>, <https://github.com/openvinotoolkit/datumaro/pull/243>)
- Support COCO panoptic and stuff format (<https://github.com/openvinotoolkit/datumaro/pull/210>)
- Documentation file and integration tests for Pascal VOC format (<https://github.com/openvinotoolkit/datumaro/pull/228>)
- Support for MNIST and MNIST in CSV dataset formats (<https://github.com/openvinotoolkit/datumaro/pull/234>)
Expand Down
4 changes: 3 additions & 1 deletion datumaro/plugins/cifar_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: MIT

import os
import os.path as osp
import pickle

Expand Down Expand Up @@ -117,8 +118,9 @@ class CifarConverter(Converter):
DEFAULT_IMAGE_EXT = '.png'

def apply(self):
label_categories = self._extractor.categories()[AnnotationType.label]
os.makedirs(self._save_dir, exist_ok=True)

label_categories = self._extractor.categories()[AnnotationType.label]
label_names = []
for label in label_categories:
label_names.append(label.name)
Expand Down

0 comments on commit 8c7bbc5

Please sign in to comment.