From 77b23b0602d712601ade1044708020b1d3a51ada Mon Sep 17 00:00:00 2001 From: Kentaro Wada Date: Thu, 10 May 2018 12:15:58 +0900 Subject: [PATCH] Skip closing polygon if polygon points <= 2 --- labelme/shape.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/labelme/shape.py b/labelme/shape.py index 3fba542..349bbaa 100644 --- a/labelme/shape.py +++ b/labelme/shape.py @@ -56,7 +56,8 @@ class Shape(object): def close(self): if len(self.points) <= 2: - logger.warn('Polygon should be created with points >2') + logger.error('Polygon should be created with points >2') + return self._closed = True def addPoint(self, point): -- GitLab