From 1e297ecbfabb9872592ca3366c9b7474b797d9ec Mon Sep 17 00:00:00 2001 From: Alexander Dokuchaev Date: Mon, 14 Feb 2022 17:02:03 +0300 Subject: [PATCH 1/8] remove timeit --- ote_sdk/ote_sdk/utils/segmentation_utils.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ote_sdk/ote_sdk/utils/segmentation_utils.py b/ote_sdk/ote_sdk/utils/segmentation_utils.py index 48faa7acbc1..3e1c1111fe5 100644 --- a/ote_sdk/ote_sdk/utils/segmentation_utils.py +++ b/ote_sdk/ote_sdk/utils/segmentation_utils.py @@ -21,7 +21,6 @@ from ote_sdk.entities.scored_label import ScoredLabel from ote_sdk.entities.shapes.polygon import Point, Polygon from ote_sdk.utils.shape_factory import ShapeFactory -from ote_sdk.utils.time_utils import timeit def mask_from_dataset_item( @@ -178,7 +177,6 @@ def find_loops(points: ContourInternal) -> List[Sequence[int]]: return subcontours -@timeit def create_annotation_from_segmentation_map( hard_prediction: np.ndarray, soft_prediction: np.ndarray, label_map: dict ) -> List[Annotation]: From 4483172b5ea096c5c651f2fdb7630b070e0c687e Mon Sep 17 00:00:00 2001 From: Harmjan Date: Thu, 17 Feb 2022 09:49:14 +0100 Subject: [PATCH 2/8] add is_anomalous flag to OTE label --- ote_sdk/ote_sdk/entities/label.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ote_sdk/ote_sdk/entities/label.py b/ote_sdk/ote_sdk/entities/label.py index c7051d80b0d..b5424996230 100644 --- a/ote_sdk/ote_sdk/entities/label.py +++ b/ote_sdk/ote_sdk/entities/label.py @@ -88,6 +88,7 @@ def __init__( creation_date: Optional[datetime.datetime] = None, is_empty: bool = False, id: Optional[ID] = None, + is_anomalous: bool = False, ): id = ID() if id is None else id color = Color.random() if color is None else color @@ -100,6 +101,7 @@ def __init__( self._is_empty = is_empty self._creation_date = creation_date self._id = id + self.is_anomalous = is_anomalous @property def name(self): @@ -184,6 +186,7 @@ def __eq__(self, other): and self.color == other.color and self.hotkey == other.hotkey and self.domain == other.domain + and self.is_anomalous == other.is_anomalous ) return False From 2a23d08b32724cb119594edcf5a374ef507747c4 Mon Sep 17 00:00:00 2001 From: Ilya Krylov Date: Thu, 17 Feb 2022 13:15:42 +0300 Subject: [PATCH 3/8] Revert "[OTE_SDK] Updates Shapely version" --- external/mmdetection | 2 +- ote_sdk/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/external/mmdetection b/external/mmdetection index 76813654ab6..29bf5426c1a 160000 --- a/external/mmdetection +++ b/external/mmdetection @@ -1 +1 @@ -Subproject commit 76813654ab67ba6a16d8cbcda1fd72809ff943a7 +Subproject commit 29bf5426c1a42a3ed547947a6cad0580dacee98f diff --git a/ote_sdk/requirements.txt b/ote_sdk/requirements.txt index 49497787d5c..09de7c59ca1 100644 --- a/ote_sdk/requirements.txt +++ b/ote_sdk/requirements.txt @@ -1,6 +1,6 @@ numpy>=1.16.4 scikit-learn==0.24.* -Shapely==1.8.* +Shapely==1.7.* networkx~=2.5 opencv-python==4.5.3.* pymongo>=3.9 From 1d7769f31ea397aa3e2adfcc3b240cfab49d5fae Mon Sep 17 00:00:00 2001 From: Evgeny Izutov Date: Thu, 17 Feb 2022 14:17:40 +0300 Subject: [PATCH 4/8] Updated OTEDet --- external/mmdetection | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/mmdetection b/external/mmdetection index 29bf5426c1a..83de64efcaf 160000 --- a/external/mmdetection +++ b/external/mmdetection @@ -1 +1 @@ -Subproject commit 29bf5426c1a42a3ed547947a6cad0580dacee98f +Subproject commit 83de64efcaf676ce1cebcfa1e4022bbce8f918a8 From 10165a526428f21e9ac0e93a2343e6da6e53dfdd Mon Sep 17 00:00:00 2001 From: Evgeny Izutov Date: Thu, 17 Feb 2022 14:18:42 +0300 Subject: [PATCH 5/8] Updated Shapely in OTE_SDK --- ote_sdk/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ote_sdk/requirements.txt b/ote_sdk/requirements.txt index 09de7c59ca1..63eefbcc303 100644 --- a/ote_sdk/requirements.txt +++ b/ote_sdk/requirements.txt @@ -1,6 +1,6 @@ numpy>=1.16.4 scikit-learn==0.24.* -Shapely==1.7.* +Shapely>=1.7.1 networkx~=2.5 opencv-python==4.5.3.* pymongo>=3.9 From b343c8d0e57d9c695570421fe58fb64be62d52d7 Mon Sep 17 00:00:00 2001 From: Harmjan Date: Thu, 17 Feb 2022 14:24:47 +0100 Subject: [PATCH 6/8] pylint --- ote_sdk/ote_sdk/entities/label.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ote_sdk/ote_sdk/entities/label.py b/ote_sdk/ote_sdk/entities/label.py index b5424996230..e5ab82175cb 100644 --- a/ote_sdk/ote_sdk/entities/label.py +++ b/ote_sdk/ote_sdk/entities/label.py @@ -78,7 +78,7 @@ class LabelEntity: will be assigned upon saving. If the argument is None, it will be set to ID() """ - # pylint: disable=redefined-builtin, too-many-arguments; Requires refactor + # pylint: disable=redefined-builtin, too-many-instance-attributes, too-many-arguments; Requires refactor def __init__( self, name: str, From 011bcba91b012451c6ea1cff8ab110037f3fb3fd Mon Sep 17 00:00:00 2001 From: Harmjan Date: Thu, 17 Feb 2022 15:01:36 +0100 Subject: [PATCH 7/8] update docstring --- ote_sdk/ote_sdk/entities/label.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ote_sdk/ote_sdk/entities/label.py b/ote_sdk/ote_sdk/entities/label.py index e5ab82175cb..287737f7302 100644 --- a/ote_sdk/ote_sdk/entities/label.py +++ b/ote_sdk/ote_sdk/entities/label.py @@ -76,6 +76,8 @@ class LabelEntity: :param is_empty: set to True if the label is an empty label. :param id: the ID of the label. Set to ID() so that a new unique ID will be assigned upon saving. If the argument is None, it will be set to ID() + :param is_anomalous: boolean that indicates whether the label is the Anomalous label. Always set to False for non- + anomaly projects. """ # pylint: disable=redefined-builtin, too-many-instance-attributes, too-many-arguments; Requires refactor From a823c5ed14ec56829ba895517985bd9c382f40c8 Mon Sep 17 00:00:00 2001 From: Evgeny Izutov Date: Thu, 17 Feb 2022 18:52:10 +0300 Subject: [PATCH 8/8] Updated OTEDet --- external/mmdetection | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/mmdetection b/external/mmdetection index 83de64efcaf..ad922124f7a 160000 --- a/external/mmdetection +++ b/external/mmdetection @@ -1 +1 @@ -Subproject commit 83de64efcaf676ce1cebcfa1e4022bbce8f918a8 +Subproject commit ad922124f7a727553c75b83f5a98e201e96f905c