Vision: Pascal VOC dataset

Created on 10 Nov 2016  路  9Comments  路  Source: pytorch/vision

FYI, I started writing a simple Pascal VOC dataset class.
https://github.com/fmassa/vision/tree/voc_dataset

Most helpful comment

All 9 comments

@fmassa don't think you need that, coco is already there and supports VOC json

@szagoruyko in this case, we should provide a converter from VOC format to COCO format. But this might be better than writing a new (almost reduntant) class.
Also, I was updating the code, and we could use a TargetTransformer to convert between different formats.

@fmassa Is it completed now?

@szagoruyko How to get the VOC json? I download PASCAL VOC 2007 trainval dataset and only fint their xml. Thank you!

hey! @fmassa ,
I am using pascal voc 2007 det dataset.
and there is an error occuring when i am using to load them in batches.
i found that error occurs when i am trying to merge dicts of annotations of different size.

do you know how to handle it?
for dataset i am using official implementation (from ver 1.0.1)
and i am using usual dataloader

@MrPositron you need to have a custom collate_fn in the DataLoader that pads the image before merging, so that the images have the same size. Check how it's done in maskrcnn-benchmark: here is the collate_fn, and the padding happens in here.

the problem is that all images by default are resized to 224*224, and the problem is that it (dataloader from torch.utils) merges dictionaries from targets in a batch. so i don't know exactly how to avoid that problem. since the images contain different # of objects, and merging fails

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zsef123 picture zsef123  路  23Comments

Finniu picture Finniu  路  24Comments

ppwwyyxx picture ppwwyyxx  路  33Comments

soldierofhell picture soldierofhell  路  36Comments

rbrigden picture rbrigden  路  59Comments