diff --git a/libs/labelFile.py b/libs/labelFile.py index 6b12e460..590e52f9 100644 --- a/libs/labelFile.py +++ b/libs/labelFile.py @@ -45,8 +45,10 @@ class LabelFile(object): for shape in shapes: points = shape['points'] label = shape['label'] + # Add Chris + difficult = int(shape['difficult']) 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) return