Use source label map for voc export (#1276)

* Use source label map for voc export

* Add line to changelog
main
zhiltsov-max 6 years ago committed by GitHub
parent 4ab3c1af82
commit 55677e0397
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -9,7 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- -
### Changed ### Changed
- - VOC task export now does not use official label map by default, but takes one
from the source task to avoid primary-class and class part name
clashing ([#1275](https://github.com/opencv/cvat/issues/1275))
### Deprecated ### Deprecated
- -

@ -74,7 +74,7 @@ def dump(file_object, annotations):
extractor = CvatAnnotationsExtractor('', annotations) extractor = CvatAnnotationsExtractor('', annotations)
extractor = extractor.transform(id_from_image) extractor = extractor.transform(id_from_image)
extractor = Dataset.from_extractors(extractor) # apply lazy transforms extractor = Dataset.from_extractors(extractor) # apply lazy transforms
converter = env.make_converter('voc') converter = env.make_converter('voc', label_map='source')
with TemporaryDirectory() as temp_dir: with TemporaryDirectory() as temp_dir:
converter(extractor, save_dir=temp_dir) converter(extractor, save_dir=temp_dir)
make_zip_archive(temp_dir, file_object) make_zip_archive(temp_dir, file_object)
Loading…
Cancel
Save