Skip to content

A tool to convert ADE20K to COCO format based on desired objects

License

Notifications You must be signed in to change notification settings

macTracyHuang/ADE20K_To_COCO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADE20K_To_COCO

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 🌝

Usage

  1. Install dependencies
    pip install -r requirements.txt
    
  2. Run Script
    python AdeToCOCO.py --datasetDir DATASETDIR --pklPath PKLPATH --objectNames OBJECTNAMES [OBJECTNAMES ...]
    
    objectNames: Name of target objects, ex: ["door", "door frame"]
    pklPath: the path to index_ade20k.pkl provied by ADE20K
    datasetDir: ADE20K dataset path

Test Result

Use demo.ipynb to visualize if it works
image
image\

Citation

@misc{
    title  = {ADE20K_To_COCO},
    author = {Tracy Huang},
    url    = {https://github.com/macTracyHuang/ADE20K_To_COCO},
    year   = {2023}
}

About

A tool to convert ADE20K to COCO format based on desired objects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published