Skip to content

Commit

Permalink
Clarify PASCAL VOC dir structure and annotation format assumptions
Browse files Browse the repository at this point in the history
Reviewed By: rbgirshick

Differential Revision: D6793159

fbshipit-source-id: 8d8f12915809238d3dcf8066a94446e0feb4cc46
  • Loading branch information
ir413 authored and facebook-github-bot committed Jan 24, 2018
1 parent c941633 commit 286b9f4
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions lib/datasets/data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,33 @@ Similarly, the union of `valminusminival` and the 2014 `train` is exactly equiva

## Creating Symlinks for PASCAL VOC

Symlink the PASCAL VOC dataset:
We assume that your symlinked `lib/datasets/data/VOC<year>` directory has the following structure:

```
# VOC 2007
mkdir -p $DETECTRON/lib/datasets/data/VOC2007
ln -s /path/to/VOC2007/JPEG/images $DETECTRON/lib/datasets/data/VOC2007/JPEGImages
ln -s /path/to/VOC2007/json/annotations $DETECTRON/lib/datasets/annotations
ln -s /path/to/VOC2007/devkit $DETECTRON/lib/datasets/VOCdevkit2007
# VOC 2012
mkdir -p $DETECTRON/lib/datasets/data/VOC2012
ln -s /path/to/VOC2012/JPEG/images $DETECTRON/lib/datasets/data/VOC2012/JPEGImages
ln -s /path/to/VOC2012/json/annotations $DETECTRON/lib/datasets/annotations
ln -s /path/to/VOC2012/devkit $DETECTRON/lib/datasets/VOCdevkit2012
VOC<year>
|_ JPEGImages
| |_ <im-1-name>.jpg
| |_ ...
| |_ <im-N-name>.jpg
|_ annotations
| |_ voc_<year>_trainval.json
| |_ ...
|_ VOCdevkit<year>
```

Create symlinks for `VOC<year>`:

```
mkdir -p $DETECTRON/lib/datasets/data/VOC<year>
ln -s /path/to/VOC<year>/JPEGImages $DETECTRON/lib/datasets/data/VOC<year>/JPEGImages
ln -s /path/to/VOC<year>/json/annotations $DETECTRON/lib/datasets/data/VOC<year>annotations
ln -s /path/to/VOC<year>/devkit $DETECTRON/lib/datasets/VOC<year>/VOCdevkit<year>
```

### PASCAL VOC Annotations in COCO Format

We expect PASCAL VOC annotations converted to COCO json format, which are available for download [here](https://storage.googleapis.com/coco-dataset/external/PASCAL_VOC.zip ).

## Creating Symlinks for Cityscapes:

Symlink the Cityscapes dataset:
Expand Down

0 comments on commit 286b9f4

Please sign in to comment.