From e52ff96adf89f2206f1d4bd7a70921000d0959ed Mon Sep 17 00:00:00 2001 From: Savan Visalpara Date: Wed, 2 Sep 2020 14:05:25 -0500 Subject: [PATCH] fix: discard polygons with length of 4 or less (#2100) * discard polygons with length of 4 or less * updated minimum length of polygons * added line in CHANGELOG Co-authored-by: Nikita Manovich --- CHANGELOG.md | 3 +-- .../tensorflow/matterport/mask_rcnn/nuclio/model_loader.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 968e5f04..a033a92e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - ### Fixed -- +- Fixed multiple errors which arises when polygon is of length 5 or less () ### Security - @@ -48,7 +48,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed error with creating task with labels with the same name () - Django RQ dashboard view () - Object's details menu settings () -- ## [1.1.0-beta] - 2020-08-03 ### Added diff --git a/serverless/tensorflow/matterport/mask_rcnn/nuclio/model_loader.py b/serverless/tensorflow/matterport/mask_rcnn/nuclio/model_loader.py index b210338a..1e56b6e6 100644 --- a/serverless/tensorflow/matterport/mask_rcnn/nuclio/model_loader.py +++ b/serverless/tensorflow/matterport/mask_rcnn/nuclio/model_loader.py @@ -63,7 +63,7 @@ class ModelLoader: contour = np.flip(contour, axis=1) # Approximate the contour and reduce the number of points contour = approximate_polygon(contour, tolerance=2.5) - if len(contour) < 3: + if len(contour) < 6: continue label = self.labels[class_id]