From e74f9cc99171a65bf7e6eae951247047460dc791 Mon Sep 17 00:00:00 2001 From: Andrey Zhavoronkov Date: Thu, 26 Mar 2020 09:30:27 +0300 Subject: [PATCH] fixed comment --- cvat-core/webpack.config.js | 22 +++++++++++++++++++++- cvat/apps/engine/task.py | 11 +---------- datumaro/datumaro/util/tf_util.py | 2 +- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/cvat-core/webpack.config.js b/cvat-core/webpack.config.js index 5333a315a5ac..6e16f46a20cd 100644 --- a/cvat-core/webpack.config.js +++ b/cvat-core/webpack.config.js @@ -52,7 +52,27 @@ const webConfig = { sourceType: 'unambiguous', }, }, - }], + }, { + test: /3rdparty\/.*\.worker\.js$/, + use: { + loader: 'worker-loader', + options: { + publicPath: '/static/engine/js/3rdparty/', + name: '[name].js', + }, + }, + }, { + test: /\.worker\.js$/, + exclude: /3rdparty/, + use: { + loader: 'worker-loader', + options: { + publicPath: '/static/engine/js/', + name: '[name].js', + }, + }, + }, + ], }, }; diff --git a/cvat/apps/engine/task.py b/cvat/apps/engine/task.py index 99adf4097a64..aba87f5c5631 100644 --- a/cvat/apps/engine/task.py +++ b/cvat/apps/engine/task.py @@ -258,16 +258,7 @@ def update_progress(progress): if isinstance(compressed_chunk_writer, ZipCompressedChunkWriter): w, h = extractor.get_image_size() area = h * w - if area <= 1920 * 1080: - db_data.chunk_size = 36 - elif area <= 2560 * 1440: - db_data.chunk_size = 18 - elif area <= 3840 * 2160: - db_data.chunk_size = 9 - elif area <= 5120 * 2880: - db_data.chunk_size = 4 - else: - db_data.chunk_size = 2 + db_data.chunk_size = max(2, min(72, 36 * 1920 * 1080 // area)) else: db_data.chunk_size = 36 diff --git a/datumaro/datumaro/util/tf_util.py b/datumaro/datumaro/util/tf_util.py index beaa4fc74e4c..00bf834a0f0d 100644 --- a/datumaro/datumaro/util/tf_util.py +++ b/datumaro/datumaro/util/tf_util.py @@ -38,4 +38,4 @@ def import_tf(): except AttributeError: pass - return tf \ No newline at end of file + return tf