wufan-tb / sam_with_dsdl

evaluation sam with dsdl datasets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Evaluation SAM with DSDL

demo

steps

1. install

git clone https://github.com/wufan-tb/sam_with_dsdl.git

cd sam_with_dsdl

pip install git+https://github.com/facebookresearch/segment-anything.git

pip install opencv-python pycocotools matplotlib dsdl

2. prepare dsdl datasets

please visit our opendatalab platform to download sam evaluation datasets and dsdl files into ./datasets folder. after downlad and unzip process, the datasets folder should like this:

./datasets
├── ADE20K
│   ├── config.py
│   ├── defs
│   ├── README.md
│   ├── set-train
│   ├── set-val
│   └── tools
├── BBBC038v1
├── DOORS
├── DRAM
├── GTEA
├── iShape
├── LVIS
├── NDD20
├── NDISPark
├── OVIS
├── Plittersdorf
├── PPDLS
├── STREETS
├── TimberSeg
├── TrashCan
├── WoodScape
└── ZeroWaste-f
└── ...

3. download sam model

default or vit_h: ViT-H SAM model.

vit_l: ViT-L SAM model.

vit_b: ViT-B SAM model.

3. set location config

to evaluate sam with python code, please change location config in ./data_cfgs.json, you can also read our tutorials to get more details about how to load dataset in python code.

4. evaluation sam

python evaluation_sa.py

notebook users can open evaluation_sa.ipynb to read details about evaluation code.

About

evaluation sam with dsdl datasets


Languages

Language:Jupyter Notebook 99.8%Language:Python 0.2%