PascalVOC label scripts are updated

This commit is contained in:
AlexeyAB
2018-07-18 15:08:34 +03:00
parent 0ae1cd81d2
commit dfbec7ea2b
3 changed files with 23 additions and 20 deletions

View File

@ -10,10 +10,10 @@ classes = ["aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat"
def convert(size, box):
dw = 1./size[0]
dh = 1./size[1]
x = (box[0] + box[1])/2.0
y = (box[2] + box[3])/2.0
dw = 1./(size[0])
dh = 1./(size[1])
x = (box[0] + box[1])/2.0 - 1
y = (box[2] + box[3])/2.0 - 1
w = box[1] - box[0]
h = box[3] - box[2]
x = x*dw