Add difficult in writer
This commit is contained in:
parent
0bace8fe2b
commit
04a5e8e7e4
@ -45,8 +45,10 @@ class LabelFile(object):
|
|||||||
for shape in shapes:
|
for shape in shapes:
|
||||||
points = shape['points']
|
points = shape['points']
|
||||||
label = shape['label']
|
label = shape['label']
|
||||||
|
# Add Chris
|
||||||
|
difficult = int(shape['difficult'])
|
||||||
bndbox = LabelFile.convertPoints2BndBox(points)
|
bndbox = LabelFile.convertPoints2BndBox(points)
|
||||||
writer.addBndBox(bndbox[0], bndbox[1], bndbox[2], bndbox[3], label)
|
writer.addBndBox(bndbox[0], bndbox[1], bndbox[2], bndbox[3], label, difficult)
|
||||||
|
|
||||||
writer.save(targetFile=filename)
|
writer.save(targetFile=filename)
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user