Fixed combined image and directory extractors (#3424)

* Fixed combined image and directory extractors

* Updated changelog

* Updated CHANGELOG
main
Boris Sekachev 5 years ago committed by GitHub
parent 0dbe0a579f
commit 4fd57a8950
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -47,6 +47,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
(<https://github.com/openvinotoolkit/cvat/pull/3379>)
- Fixed issue when save filtered object in AAM (<https://github.com/openvinotoolkit/cvat/pull/3401>)
- Context image disappears after undo/redo (<https://github.com/openvinotoolkit/cvat/pull/3416>)
- Using combined data sources (directory and image) when create a task (<https://github.com/openvinotoolkit/cvat/pull/3424>)
### Security

@ -266,6 +266,18 @@ def _create_thread(tid, data, isImport=False):
extractor = None
manifest_index = _get_manifest_frame_indexer()
# If upload from server_files image and directories
# need to update images list by all found images in directories
if (data['server_files']) and len(media['directory']) and len(media['image']):
media['image'].extend(
[os.path.relpath(image, upload_dir) for image in
MEDIA_TYPES['directory']['extractor'](
source_path=[os.path.join(upload_dir, f) for f in media['directory']],
).absolute_source_paths
]
)
media['directory'] = []
for media_type, media_files in media.items():
if media_files:
if extractor is not None:

Loading…
Cancel
Save