未验证 提交 4fd57a89 编写于 作者: B Boris Sekachev 提交者: GitHub

Fixed combined image and directory extractors (#3424)

* Fixed combined image and directory extractors

* Updated changelog

* Updated CHANGELOG
上级 0dbe0a57
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册