From 7cc5241664b26b767f2e284ee8882faa03126c25 Mon Sep 17 00:00:00 2001 From: stephi Date: Mon, 8 Jun 2020 19:13:54 +0200 Subject: [PATCH] strip string of detection values --- libs/yolo_io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/yolo_io.py b/libs/yolo_io.py index d4944852..216fba38 100644 --- a/libs/yolo_io.py +++ b/libs/yolo_io.py @@ -139,7 +139,7 @@ class YoloReader: def parseYoloFormat(self): bndBoxFile = open(self.filepath, 'r') for bndBox in bndBoxFile: - classIndex, xcen, ycen, w, h = bndBox.split(' ') + classIndex, xcen, ycen, w, h = bndBox.strip().split(' ') label, xmin, ymin, xmax, ymax = self.yoloLine2Shape(classIndex, xcen, ycen, w, h) # Caveat: difficult flag is discarded when saved as yolo format.