Merge pull request #42 from rflynn/py3-friendlier-maxint
py3 removes sys.maxint, float(inf) works in py2/py3
This commit is contained in:
commit
d6b3ec8aa8
@ -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]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user