Skip to content

Commit

Permalink
Avoid saving masks in voc when segmentation is not required (cvat-ai#184
Browse files Browse the repository at this point in the history
)

* Avoid saving masks in voc when segmentation is not required
  • Loading branch information
Maxim Zhiltsov authored Mar 24, 2021
1 parent 7a66b5e commit 6ca7f24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Image reading and saving in ICDAR formats (<https://github.com/openvinotoolkit/datumaro/pull/174>)
- Unnecessary image loading on dataset saving (<https://github.com/openvinotoolkit/datumaro/pull/176>)
- Allowed spaces in ICDAR captions (<https://github.com/openvinotoolkit/datumaro/pull/182>)
- Saving of masks in VOC when masks are not requested (<https://github.com/openvinotoolkit/datumaro/pull/184>)

### Security
-
Expand Down
2 changes: 1 addition & 1 deletion datumaro/plugins/voc_format/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def save_subsets(self):

clsdet_list[item.id] = True

if masks:
if masks and VocTask.segmentation in self._tasks:
compiled_mask = CompiledMask.from_instance_masks(masks,
instance_labels=[self._label_id_mapping(m.label)
for m in masks])
Expand Down

0 comments on commit 6ca7f24

Please sign in to comment.