From 6ff762c73a65d3bcd4fb85a6ffd8f65e1400d736 Mon Sep 17 00:00:00 2001 From: sungmanc Date: Wed, 19 Jul 2023 15:19:18 +0900 Subject: [PATCH 1/2] Fix missing link for docs and removing centercrop for classification data pipeline --- .../algorithms/segmentation/semantic_segmentation.rst | 4 ++-- .../classification/configs/base/data/data_pipeline.py | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/source/guide/explanation/algorithms/segmentation/semantic_segmentation.rst b/docs/source/guide/explanation/algorithms/segmentation/semantic_segmentation.rst index 07dd08df58c..80c04464f41 100644 --- a/docs/source/guide/explanation/algorithms/segmentation/semantic_segmentation.rst +++ b/docs/source/guide/explanation/algorithms/segmentation/semantic_segmentation.rst @@ -42,7 +42,7 @@ Dataset Format For the dataset handling inside OpenVINO™ Training Extensions, we use `Dataset Management Framework (Datumaro) `_. -At this end we support `Common Semantic Segmentation `_ data format. +At this end we support `Common Semantic Segmentation `_ data format. If you organized supported dataset format, starting training will be very simple. We just need to pass a path to the root folder and desired model template to start training: .. code-block:: @@ -278,4 +278,4 @@ It can be launched only with supervised (incremental) training type. .. Incremental Learning .. ******************** -.. To be added soon \ No newline at end of file +.. To be added soon diff --git a/src/otx/algorithms/classification/configs/base/data/data_pipeline.py b/src/otx/algorithms/classification/configs/base/data/data_pipeline.py index 1cfebc32c5f..2ac44214b01 100644 --- a/src/otx/algorithms/classification/configs/base/data/data_pipeline.py +++ b/src/otx/algorithms/classification/configs/base/data/data_pipeline.py @@ -20,7 +20,7 @@ __resize_target_size = 224 __train_pipeline = [ - dict(type="RandomResizedCrop", size=224, efficientnet_style=True), + dict(type="RandomResizedCrop", size=__resize_target_size, efficientnet_style=True), dict(type="RandomFlip", flip_prob=0.5, direction="horizontal"), dict(type="Normalize", **__img_norm_cfg), dict(type="ImageToTensor", keys=["img"]), @@ -29,8 +29,7 @@ ] __test_pipeline = [ - dict(type="Resize", size=(256, -1)), - dict(type="CenterCrop", crop_size=224), + dict(type="Resize", size=__resize_target_size), dict(type="Normalize", **__img_norm_cfg), dict(type="ImageToTensor", keys=["img"]), dict(type="Collect", keys=["img"]), From 6c4422072513ba5162fe27443abc1aa903a4e69d Mon Sep 17 00:00:00 2001 From: sungmanc Date: Wed, 19 Jul 2023 16:56:19 +0900 Subject: [PATCH 2/2] Revert the test threshold --- tests/e2e/cli/classification/test_classification.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/e2e/cli/classification/test_classification.py b/tests/e2e/cli/classification/test_classification.py index 3560a7bb68e..15c6018057e 100644 --- a/tests/e2e/cli/classification/test_classification.py +++ b/tests/e2e/cli/classification/test_classification.py @@ -180,8 +180,7 @@ def test_otx_explain_openvino(self, template, tmp_dir_path): @pytest.mark.parametrize("half_precision", [True, False]) def test_otx_eval_openvino(self, template, tmp_dir_path, half_precision): tmp_dir_path = tmp_dir_path / "multi_class_cls" - # FIXME [Jaeguk] Revert threshold to 0.2 when model api supports resize and centercrop. - otx_eval_openvino_testing(template, tmp_dir_path, otx_dir, args, threshold=0.5, half_precision=half_precision) + otx_eval_openvino_testing(template, tmp_dir_path, otx_dir, args, threshold=0.2, half_precision=half_precision) @e2e_pytest_component @pytest.mark.skipif(TT_STABILITY_TESTS, reason="This is TT_STABILITY_TESTS")