This tool can convert the latest ADE20K dataset to COCO format, which can be further used in Detectron2 Framework. As my goal is to build a object level SLAM system, this tool is designed to retrieve information related to target objects. However, you can always modify it to fit your purposes, and Welcome to pull a request.
Please ⭐ the repo if you find it useful 🌝
- Install dependencies
pip install -r requirements.txt
- Run Script
objectNames: Name of target objects, ex: ["door", "door frame"]
python AdeToCOCO.py --datasetDir DATASETDIR --pklPath PKLPATH --objectNames OBJECTNAMES [OBJECTNAMES ...]
pklPath: the path to index_ade20k.pkl provied by ADE20K
datasetDir: ADE20K dataset path
Use demo.ipynb to visualize if it works
\
@misc{
title = {ADE20K_To_COCO},
author = {Tracy Huang},
url = {https://github.com/macTracyHuang/ADE20K_To_COCO},
year = {2023}
}