Skip to content

Commit

Permalink
Merge branch 'develop' into vsaltykovx/add_mmdetection_input_paramete…
Browse files Browse the repository at this point in the history
…rs_validation
  • Loading branch information
saltykox committed Feb 18, 2022
2 parents 5a34e7f + d99df37 commit 44a6c2b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion external/mmdetection
7 changes: 6 additions & 1 deletion ote_sdk/ote_sdk/entities/label.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ 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-arguments; Requires refactor
# pylint: disable=redefined-builtin, too-many-instance-attributes, too-many-arguments; Requires refactor
def __init__(
self,
name: str,
Expand All @@ -88,6 +90,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
Expand All @@ -100,6 +103,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):
Expand Down Expand Up @@ -184,6 +188,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

Expand Down
2 changes: 0 additions & 2 deletions ote_sdk/ote_sdk/utils/segmentation_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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]:
Expand Down
2 changes: 1 addition & 1 deletion ote_sdk/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
numpy>=1.16.4
scikit-learn==0.24.*
Shapely==1.8.*
Shapely>=1.7.1
networkx~=2.5
opencv-python==4.5.3.*
pymongo>=3.9
Expand Down

0 comments on commit 44a6c2b

Please sign in to comment.