strip string of detection values

This commit is contained in:
stephi 2020-06-08 19:13:54 +02:00 committed by darrenl
parent 7532f1ed87
commit 7cc5241664

View File

@ -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.