From 6d81528a9d252d75aa6eed8991ca2b677bf11623 Mon Sep 17 00:00:00 2001 From: Andrey Zhavoronkov <andrey.zhavoronkov@intel.com> Date: Tue, 16 Mar 2021 18:31:07 +0300 Subject: [PATCH 1/2] fixed image quality for images --- cvat/apps/engine/media_extractors.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cvat/apps/engine/media_extractors.py b/cvat/apps/engine/media_extractors.py index 0383341b528f..20b2d2d16a35 100644 --- a/cvat/apps/engine/media_extractors.py +++ b/cvat/apps/engine/media_extractors.py @@ -313,8 +313,7 @@ def get_image_size(self, i): class IChunkWriter(ABC): def __init__(self, quality, dimension=DimensionType.DIM_2D): - # translate inversed range [1:100] to [0:51] - self._image_quality = round(51 * (100 - quality) / 99) + self._image_quality = quality self._dimension = dimension @staticmethod @@ -375,6 +374,8 @@ def save_as_chunk(self, images, chunk_path): class Mpeg4ChunkWriter(IChunkWriter): def __init__(self, quality=67): + # translate inversed range [1:100] to [0:51] + quality = round(51 * (100 - quality) / 99) super().__init__(quality) self._output_fps = 25 try: From b79effe7da62ab52ca96ae50f0d424ed375d0a6d Mon Sep 17 00:00:00 2001 From: Andrey Zhavoronkov <andrey.zhavoronkov@intel.com> Date: Tue, 16 Mar 2021 18:48:31 +0300 Subject: [PATCH 2/2] updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e351167ea542..5f5fbd5b0dbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,6 +66,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - An error about track shapes outside of the task frames during export (<https://github.com/openvinotoolkit/cvat/pull/2890>) - Fixed project search field updating (<https://github.com/openvinotoolkit/cvat/pull/2901>) - Fixed export error when invalid polygons are present in overlapping frames (<https://github.com/openvinotoolkit/cvat/pull/2852>) +- Fixed image quality option for tasks created from images (<https://github.com/openvinotoolkit/cvat/pull/2963>) ### Security