From 43395af812e434c98759d384a75973e0a95279d3 Mon Sep 17 00:00:00 2001 From: Andrey Zhavoronkov <41117609+azhavoro@users.noreply.github.com> Date: Fri, 22 May 2020 11:18:20 +0300 Subject: [PATCH] Fixed auto_segmentation app (#1562) * disabled tf eager execution for auto_segmentation * Update CHANGELOG.md --- CHANGELOG.md | 1 + cvat/apps/auto_segmentation/views.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4195b379..8877ab6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed an issue with large number of instances in instance mask (https://github.com/opencv/cvat/issues/1539) - Fixed full COCO dataset import error with conflicting labels in keypoints and detection (https://github.com/opencv/cvat/pull/1548) - Fixed COCO keypoints skeleton parsing and saving (https://github.com/opencv/cvat/issues/1539) +- `tf.placeholder() is not compatible with eager execution` exception for auto_segmentation (https://github.com/opencv/cvat/pull/1562) ### Security - diff --git a/cvat/apps/auto_segmentation/views.py b/cvat/apps/auto_segmentation/views.py index 1a9ce062..4b15b094 100644 --- a/cvat/apps/auto_segmentation/views.py +++ b/cvat/apps/auto_segmentation/views.py @@ -41,6 +41,11 @@ def run_tensorflow_auto_segmentation(frame_provider, labels_mapping, treshold): ## INITIALIZATION + # workarround for tf.placeholder() is not compatible with eager execution + # https://github.com/tensorflow/tensorflow/issues/18165 + import tensorflow as tf + tf.compat.v1.disable_eager_execution() + # Root directory of the project ROOT_DIR = os.environ.get('AUTO_SEGMENTATION_PATH') # Import Mask RCNN