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
def convertPoints2BndBox(points):
xmin = sys.maxint
ymin = sys.maxint
xmax = -sys.maxint
ymax = -sys.maxint
xmin = float('inf')
ymin = float('inf')
xmax = float('-inf')
ymax = float('-inf')
for p in points:
x = p[0]
y = p[1]