Closed xvolks closed 7 years ago
The JSON format is the simplified version of COCO.
box = [x, y, width, height]
http://mscoco.org/dataset/#download
The xml format is based on the PASCAL VOC format.
box = [xmin, ymin, xmax, ymax]
http://host.robots.ox.ac.uk/pascal/VOC/voc2007/devkit_doc_07-Jun-2007.pdf
Why do you want to use [x1, y1, x2, y2] in the JSON format?
I use this project, for training and I did not manage do make PascalVOC import read the output of Rectlabel. So I wrote a parser/loader for JSON files of Rectlabel. I trained resnet50 with this and its predictions were random because of a mismatch between x,y,w,h and x1,x2,y1,y2. So I fixed the bug in my code, and to share my issue I've reported here, thinking that it could be useful for some users.
Actually, I do not need this feature, it was just an idea of enhancement.
Thanks for letting us know about the detailed situation.
The problem of our xml format was there were no default "difficult" value.
<difficult>0</difficult>
We checked with the data and code below.
https://github.com/ryouchinsa/Rectlabel-support/tree/master/VOC2007_test
https://github.com/yhenon/keras-frcnn/blob/master/keras_frcnn/pascal_voc_parser.py
data_paths = [os.path.join(input_path, s) for s in ['VOC2007_test']]
annot_path = os.path.join(data_path, 'JPEGImages/annotations')
data_path, 'ImageSets', 'Main', 'val.txt')
In the next update, RectLabel saves the xml file with these default values.
<pose>Unspecified</pose>
<truncated>0</truncated>
<difficult>0</difficult>
We submitted the new update to Apple. When the new update is released, we will let you know. Thank you.
The new update was released. RectLabel 1.31 Saves the PASCAL VOC format file with a default value for "pose", "truncated", and "difficult".
In the JSON file the boxes are saved in
x, y, w, h
format. An option to save the boxes asx1, y1, x2, y2
may help for some usages.