imantics icon indicating copy to clipboard operation
imantics copied to clipboard

Errors running example xml to coco

Open qianjiangcn opened this issue 5 years ago • 1 comments

I am running issues when using the example jupyter notebook:

TypeError Traceback (most recent call last) in ----> 1 dataset = Dataset.from_xml(Path("data/xml_example"))

~/anaconda3/lib/python3.6/site-packages/imantics/dataset.py in from_xml(cls, xml_folder, name) 27 xml = bf.data(fromstring(open(imgp.with_suffix(".xml"),"r").read())) 28 for ann in xml["annotation"]["object"]: ---> 29 cat = ann["name"]["$"] 30 categories.append(cat) 31 categories = list(set(categories))

TypeError: string indices must be integers

qianjiangcn avatar Jan 20 '20 19:01 qianjiangcn

@qianjiangcn Please upload xml file and basic code to reproduce the issue.

saurabheights avatar Apr 24 '20 11:04 saurabheights