To install requirements:
pip install -r requirements.txt
The data/ folder should look like this:
data
├── refcoco
| ├── anns
| | ├── refcoco
| | ├── refcoco+
| | ├── refcocog
│ ├── images
| │ ├── train2014 # images from train 2014
│ ├── masks
| | ├── refcoco
| | ├── ...
-
Download MSCOCO and link the
train2014
folder todata/refcoco/images/train2014
. -
Download refcoco/masks and link it to
data/refcoco/masks
-
Download refcoco/anns and put it under
data/refcoco/
- Run the following script to process RefCOCO dataset. It generates new annotation files under
data/refcoco/anns_spatial
python datasets/build_spatial_anno.py
- New dataloader (under development):
datasets/SpatialReasoningDataset.py
Run datasets/refer_segmentation.py
at root directory to dive into the dataloader and visualize annotations.