Merge pull request #42 from rflynn/py3-friendlier-maxint

py3 removes sys.maxint, float(inf) works in py2/py3
This commit is contained in:
darrenl 2016-12-30 11:29:45 +08:00 committed by GitHub
commit d6b3ec8aa8

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]