k-net
[NeurIPS2021] Code Release of K-Net: Towards Unified Image Segmentation
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (5.4%) to scientific vocabulary
Keywords
Repository
[NeurIPS2021] Code Release of K-Net: Towards Unified Image Segmentation
Basic Info
Statistics
- Stars: 476
- Watchers: 9
- Forks: 47
- Open Issues: 14
- Releases: 0
Topics
Metadata Files
README.md
K-Net: Towards Unified Image Segmentation
Introduction
This is an official release of the paper K-Net:Towards Unified Image Segmentation. K-Net will also be integrated in the future release of MMDetection and MMSegmentation.
K-Net:Towards Unified Image Segmentation,
Wenwei Zhang, Jiangmiao Pang, Kai Chen, Chen Change Loy
In: Proc. Advances in Neural Information Processing Systems (NeurIPS), 2021
[arXiv][project page][Bibetex]
Results
The results of K-Net and their corresponding configs on each segmentation task are shown as below. We have released the full model zoo of panoptic segmentation. The complete model checkpoints and logs for instance and semantic segmentation will be released soon.
Semantic Segmentation on ADE20K
| Backbone | Method | Crop Size | Lr Schd | mIoU | Config | Download | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | R-50 | K-Net + FCN | 512x512 | 80K | 43.3 |config | model | log | | R-50 | K-Net + PSPNet | 512x512 | 80K | 43.9 |config | model | log | | R-50 | K-Net + DeepLabv3 | 512x512 | 80K | 44.6 |config | model | log | | R-50 | K-Net + UPerNet | 512x512 | 80K | 43.6 |config | model | log | | Swin-T | K-Net + UPerNet | 512x512 | 80K | 45.4 |config | model | log | | Swin-L | K-Net + UPerNet | 512x512 | 80K | 52.0 |config | model | log | | Swin-L | K-Net + UPerNet | 640x640 | 80K | 52.7 |config | model | log |
Instance Segmentation on COCO
| Backbone | Method | Lr Schd | Mask mAP| Config | Download | | :---: | :---: | :---: | :---: | :---: | :---: | | R-50 | K-Net | 1x | 34.0 |config | model | log | | R-50 | K-Net | ms-3x | 37.8 |config | model | log | | R-101 | K-Net | ms-3x | 39.2 |config | model | log | | R-101-DCN | K-Net | ms-3x | 40.5 |config | model | log |
Panoptic Segmentation on COCO
| Backbone | Method | Lr Schd | PQ | Config | Download | | :---: | :---: | :---: | :---: | :---: | :---: | | R-50 | K-Net | 1x| 44.3 |config | model | log | | R-50 | K-Net | ms-3x| 47.1 |config | model | log | | R-101 | K-Net | ms-3x| 48.4 |config | model | log | | R-101-DCN | K-Net | ms-3x| 49.6 |config | model | log | | Swin-L (window size 7) | K-Net | ms-3x| 54.6 |config | model | log | | Above on test-dev | | | 55.2 | | |
Installation
It requires the following OpenMMLab packages:
- MIM >= 0.1.5
- MMCV-full >= v1.3.14
- MMDetection >= v2.17.0
- MMSegmentation >= v0.18.0
- scipy
- panopticapi
bash
pip install openmim scipy mmdet mmsegmentation
pip install git+https://github.com/cocodataset/panopticapi.git
mim install mmcv-full
License
This project is released under the Apache 2.0 license.
Usage
Data preparation
Prepare data following MMDetection and MMSegmentation. The data structure looks like below:
```text data/ ├── ade │ ├── ADEChallengeData2016 │ │ ├── annotations │ │ ├── images ├── coco │ ├── annotations │ │ ├── panoptic{train,val}2017.json │ │ ├── instance{train,val}2017.json │ │ ├── panoptic{train,val}2017/ # panoptic png annotations │ │ ├── imageinfo_test-dev2017.json # for test-dev submissions │ ├── train2017 │ ├── val2017 │ ├── test2017
```
Training and testing
For training and testing, you can directly use mim to train and test the model
```bash
train instance/panoptic segmentation models
sh ./tools/mimslurmtrain.sh $PARTITION mmdet $CONFIG $WORK_DIR
test instance segmentation models
sh ./tools/mimslurmtest.sh $PARTITION mmdet $CONFIG $CHECKPOINT --eval segm
test panoptic segmentation models
sh ./tools/mimslurmtest.sh $PARTITION mmdet $CONFIG $CHECKPOINT --eval pq
train semantic segmentation models
sh ./tools/mimslurmtrain.sh $PARTITION mmseg $CONFIG $WORK_DIR
test semantic segmentation models
sh ./tools/mimslurmtest.sh $PARTITION mmseg $CONFIG $CHECKPOINT --eval mIoU ```
For test submission for panoptic segmentation, you can use the command below:
```bash
we should update the category information in the original image test-dev pkl file
for panoptic segmentation
python -u tools/genpanoptictest_info.py
run test-dev submission
sh ./tools/mimslurmtest.sh $PARTITION mmdet $CONFIG $CHECKPOINT --format-only --cfg-options data.test.annfile=data/coco/annotations/panopticimageinfotest-dev2017.json data.test.imgprefix=data/coco/test2017 --eval-options jsonfileprefix=$WORK_DIR ```
You can also run training and testing without slurm by directly using mim for instance/semantic/panoptic segmentation like below:
bash
PYTHONPATH='.':$PYTHONPATH mim train mmdet $CONFIG $WORK_DIR
PYTHONPATH='.':$PYTHONPATH mim train mmseg $CONFIG $WORK_DIR
- PARTITION: the slurm partition you are using
- CHECKPOINT: the path of the checkpoint downloaded from our model zoo or trained by yourself
- WORK_DIR: the working directory to save configs, logs, and checkpoints
- CONFIG: the config files under the directory
configs/ - JOB_NAME: the name of the job that are necessary for slurm
Citation
bibtex
@inproceedings{zhang2021knet,
title={{K-Net: Towards} Unified Image Segmentation},
author={Wenwei Zhang and Jiangmiao Pang and Kai Chen and Chen Change Loy},
year={2021},
booktitle={NeurIPS},
}
Owner
- Name: Wenwei Zhang
- Login: ZwwWayne
- Kind: user
- Location: Singapore
- Company: MMLab, NTU
- Website: zhangwenwei.cn
- Twitter: wenweiz97
- Repositories: 3
- Profile: https://github.com/ZwwWayne
Wenwei Zhang
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - name: "Wenwei Zhang, Jiangmiao Pang, Kai Chen, Chen Change Loy" title: "K-Net: Towards Unified Image Segmentation" date-released: 2021-10-22 url: "https://github.com/ZwwWayne/K-Net" license: Apache-2.0
GitHub Events
Total
- Watch event: 11
- Pull request event: 1
- Fork event: 2
Last Year
- Watch event: 11
- Pull request event: 1
- Fork event: 2
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 34
- Total pull requests: 4
- Average time to close issues: 16 days
- Average time to close pull requests: 3 days
- Total issue authors: 31
- Total pull request authors: 2
- Average comments per issue: 1.32
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- lucasjinreal (2)
- lifuguan (2)
- yucornetto (1)
- m3at (1)
- Ken-97 (1)
- ljmiao (1)
- kagawa588 (1)
- huliangxiao (1)
- NickChang97 (1)
- xiehousen (1)
- luohao123 (1)
- Mollylulu (1)
- YangPanHZAU (1)
- ctkindle (1)
- talebolano (1)
Pull Request Authors
- ZwwWayne (3)
- minerharry (2)