mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
PascalVOC label scripts are updated
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user