cvhciKIT / sloth

Sloth is a tool for labeling image and video data for computer vision research.
Other
608 stars 198 forks source link

How can I make the file translate to the xml file that I need? #115

Closed mu001999 closed 7 years ago

mu001999 commented 7 years ago

It will be like the content of the yaml file when I save as xml file. Please help me. @neingeist @mika-fischer @wassname

nilsonholger commented 7 years ago

Uhmmm...I'm not sure I correctly understand your question, but afaik sloth does NOT support saving to XMS files. Google for "YAML to XML converter" or similar and you will most likely find something that suits your needs!

tgehrig commented 7 years ago

You have to implement a container interface which writes the annotations as xml. As far as I know, sloth does not have a container which writes out xml out of the box. Just have a look at sloth/annotations/container.py there are multiple container implementations use one as a basis and reimplement the serializeToFile() function to output the xml file.

mu001999 commented 7 years ago

@tgehrig @nilsonholger Thanks you two. I have solved this problem by another way. Uhmmm...Actually, I just implement a parser for the json to load the file in my machine learning model. Thanks very much.