py3 removes sys.maxint, float(inf) works in py2/py3

This commit is contained in:
Ryan Flynn 2016-12-29 21:25:23 -05:00
parent 37d968d6b6
commit e7eddf02ab

View File

@ -53,10 +53,10 @@ class LabelFile(object):
@staticmethod @staticmethod
def convertPoints2BndBox(points): def convertPoints2BndBox(points):
xmin = sys.maxint xmin = float('inf')
ymin = sys.maxint ymin = float('inf')
xmax = -sys.maxint xmax = float('-inf')
ymax = -sys.maxint ymax = float('-inf')
for p in points: for p in points:
x = p[0] x = p[0]
y = p[1] y = p[1]