
Usage:
```python
from dataclasses import dataclass
import datasets

# load and path setting
ds_visdial = datasets.load_dataset('jxu124/visdial')
path_map = {
    "coco/train2014": f"/datasets/coco/train2014",
    "coco/val2014": f"/datasets/coco/val2014",
    "visdial/VisualDialog_test2018": f"/datasets/visdial/VisualDialog_test2018",
    "visdial/VisualDialog_val2018": f"/datasets/visdial/VisualDialog_val2018"
}

# apply to your datasets
@dataclass
class ReplaceImagePath():
    path_map: {}
    def __call__(self, features):
        for k, v in self.path_map.items():
            features['image'] = features['image'].replace(k, v)
        return features
ds_visdial = ds_visdial.map(ReplaceImagePath(path_map=path_map)).cast_column("image", datasets.Image())
```
license:cc-by-4.0 region:us
{"license": "cc-by-4.0", "dataset_info": {"features": [{"name": "caption", "dtype": "string"}, {"name": "dialog", "sequence": {"sequence": "string"}}, {"name": "image_path", "dtype": "string"}, {"name": "global_image_id", "dtype": "string"}, {"name": "anns_id", "dtype": "string"}], "splits": [{"name": "train", "num_bytes": 77657548, "num_examples": 123287}, {"name": "test", "num_bytes": 3495490, "num_examples": 8000}, {"name": "validation", "num_bytes": 1408883, "num_examples": 2064}], "download_size": 34814702, "dataset_size": 82561921}}
TAGS
#license-cc-by-4.0 #region-us 


Usage:

TAGS
#license-cc-by-4.0 #region-us 
