From ca022d732d4b4c25ff126a1be9256759c9f5c38e Mon Sep 17 00:00:00 2001 From: Andrey Zhavoronkov <41117609+azhavoro@users.noreply.github.com> Date: Thu, 16 Apr 2020 18:03:56 +0300 Subject: [PATCH] Fixed auto annotation, tf annotation and auto segmentation apps (#1409) * fixed code that uses FrameProvider, as the interface has changed * Update CHANGELOG.md --- CHANGELOG.md | 2 +- cvat/apps/auto_annotation/image_loader.py | 2 +- cvat/apps/auto_segmentation/views.py | 2 +- cvat/apps/tf_annotation/views.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5089e86b..9b6a09a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - ### Fixed -- +- Auto annotation, TF annotation and Auto segmentation apps (https://github.com/opencv/cvat/pull/1409) ### Security - diff --git a/cvat/apps/auto_annotation/image_loader.py b/cvat/apps/auto_annotation/image_loader.py index a3fddfb1..17335beb 100644 --- a/cvat/apps/auto_annotation/image_loader.py +++ b/cvat/apps/auto_annotation/image_loader.py @@ -11,7 +11,7 @@ class ImageLoader(): self._frame_provider = frame_provider def __iter__(self): - for frame in self._frame_provider.get_frames(self._frame_provider.Quality.ORIGINAL): + for frame, _ in self._frame_provider.get_frames(self._frame_provider.Quality.ORIGINAL): yield self._load_image(frame) def __len__(self): diff --git a/cvat/apps/auto_segmentation/views.py b/cvat/apps/auto_segmentation/views.py index baf16944..e6ff7025 100644 --- a/cvat/apps/auto_segmentation/views.py +++ b/cvat/apps/auto_segmentation/views.py @@ -82,7 +82,7 @@ def run_tensorflow_auto_segmentation(frame_provider, labels_mapping, treshold): ## RUN OBJECT DETECTION result = {} frames = frame_provider.get_frames(frame_provider.Quality.ORIGINAL) - for image_num, image_bytes in enumerate(frames): + for image_num, (image_bytes, _) in enumerate(frames): job.refresh() if 'cancel' in job.meta: del job.meta['cancel'] diff --git a/cvat/apps/tf_annotation/views.py b/cvat/apps/tf_annotation/views.py index 9ef2ce4d..bac1cc60 100644 --- a/cvat/apps/tf_annotation/views.py +++ b/cvat/apps/tf_annotation/views.py @@ -117,7 +117,7 @@ def run_tensorflow_annotation(frame_provider, labels_mapping, treshold): config.gpu_options.allow_growth=True sess = tf.Session(graph=detection_graph, config=config) frames = frame_provider.get_frames(frame_provider.Quality.ORIGINAL) - for image_num, image in enumerate(frames): + for image_num, (image, _) in enumerate(frames): job.refresh() if 'cancel' in job.meta: