license:mit region:us
---
license: mit
---
Load PACO dataset from local directory. Currently only support paco-lvis.

Usage:
```python
from datasets import load_dataset
name = "paco-lvis"  # choose from ["paco-lvis", "paco-ego4d", "paco"]
DATA_DIR = "/path/to/PACO"
split = "val"  # choose from ["train", "val", "test"]
ds = load_dataset("yiqun/paco", name=name, data_dir=DATA_DIR, split=split)
```

Structure of DATA_DIR:

```
|_ annotations
  |_ paco_ego4d_v1_test.json
  |_ paco_ego4d_v1_train.json
  |_ paco_ego4d_v1_val.json
  |_ paco_lvis_v1_test.json
  |_ paco_lvis_v1_train.json
  |_ paco_lvis_v1_val.json
|_ images
  |_ train2017
    |_ # images
  |_ val2017
    |_ # images
```
