https://github.com/cvi-szu/clims
[CVPR 2022] CLIMS: Cross Language Image Matching for Weakly Supervised Semantic Segmentation
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.0%) to scientific vocabulary
Keywords
Repository
[CVPR 2022] CLIMS: Cross Language Image Matching for Weakly Supervised Semantic Segmentation
Basic Info
Statistics
- Stars: 130
- Watchers: 3
- Forks: 12
- Open Issues: 8
- Releases: 0
Topics
Metadata Files
README.md
CLIMS
Code repository for our paper "CLIMS: Cross Language Image Matching for Weakly Supervised Semantic Segmentation" in CVPR 2022.
:heart_eyes: Code for our paper "CCAM: Contrastive learning of Class-agnostic Activation Map for Weakly Supervised Object Localization and Semantic Segmentation" in CVPR 2022 is also available here.

Please to NOTE that this repository is an **improved version of our camera-ready version (you can refer to the directory of previous_version/). We recommend to use our improved version of CLIMS instead of camera-ready version.**
Dataset
PASCAL VOC2012
You will need to download the images (JPEG format) in PASCAL VOC2012 dataset from here and train_aug ground-truth can be found here. Make sure your data/VOC2012 folder is structured as follows:
├── VOC2012/
| ├── Annotations
| ├── ImageSets
| ├── SegmentationClass
| ├── SegmentationClassAug
| └── SegmentationObject
MS-COCO 2014
You will need to download the images (JPEG format) in MSCOCO 2014 dataset here and ground-truth mask can be found here. Make sure your data/COCO folder is structured as follows:
├── COCO/
| ├── train2014
| ├── val2014
| ├── annotations
| | ├── instances_train2014.json
| | ├── instances_val2014.json
| ├── mask
| | ├── train2014
| | ├── val2014
Training on PASCAL VOC2012
- Install CLIP.
$ pip install ftfy regex tqdm $ pip install git+https://github.com/openai/CLIP.git - Download pre-trained baseline CAM ('res50_cam.pth') here and put it at the directory of
cam-baseline-voc12/. - Train CLIMS on PASCAL V0C2012 dataset to generate initial CAMs.
CUDA_VISIBLE_DEVICES=0 python run_sample.py --voc12_root /data1/xjheng/dataset/VOC2012/ --hyper 10,24,1,0.2 --clims_num_epoches 15 --cam_eval_thres 0.15 --work_space clims_voc12 --cam_network net.resnet50_clims --train_clims_pass True --make_clims_pass True --eval_cam_pass True - Train IRNet and generate pseudo semantic masks.
CUDA_VISIBLE_DEVICES=0 python run_sample.py --voc12_root /data1/xjheng/dataset/VOC2012/ --cam_eval_thres 0.15 --work_space clims_voc12 --cam_network net.resnet50_clims --cam_to_ir_label_pass True --train_irn_pass True --make_sem_seg_pass True --eval_sem_seg_pass True - Train DeepLabv2 using pseudo semantic masks.
shell cd segmentation/
Evaluation Results
The quality of initial CAMs and pseudo masks on PASCAL VOC2012.
| Method | backbone | CAMs | + RW | + IRNet | |:---------:|:--------:|:----:|:----:|:----:| | CLIMS(camera-ready) | R50 | 56.6 | 70.5 | - | | CLIMS(this repo) | R50 | 58.6 | ~73 | 74.1 |
Evaluation results on PASCAL VOC2012 val and test sets.
Please cite the results of camera-ready version
| Method | Supervision | Network | Pretrained | val | test | |:---------:|:-----------:|:----:|:----:|:----:|:----:| | AdvCAM | I | DeepLabV2 | ImageNet | 68.1 | 68.0 | | EDAM | I+S | DeepLabV2 | COCO | 70.9 | 70.6 | | CLIMS(camera-ready) | I | DeepLabV2 | ImageNet | 69.3 | 68.7 | | CLIMS(camera-ready) | I | DeepLabV2 | COCO | 70.4 | 70.0 | | CLIMS(this repo) | I | DeepLabV2 |ImageNet | 70.3 | 70.6 | | CLIMS(this repo) | I | DeepLabV2 | COCO | 71.4 | 71.2 | | CLIMS(this repo) | I | DeepLabV1-R38 | ImageNet | 73.3 | 73.4 |
(Please cite the results of camera-ready version. Initial CAMs, pseudo semantic masks, and pre-trained models of camera-ready version can be found at Google Drive)
Training on MSCOCO 2014
- Download pre-trained baseline CAM ('res50_cam.pth') here and put it at the directory of
cam-baseline-coco/. - Train CLIMS on MSCOCO 2014 dataset to generate initial CAMs.
CUDA_VISIBLE_DEVICES=6,7 python -m torch.distributed.launch --nproc_per_node=2 run_sample_coco.py --work_space clims_coco --clims_network net.resnet50_clims --train_clims_pass True --make_clims_pass True --eval_cam_pass True --clims_num_epoches 8 --cam_eval_thres 0.15 --hyper 2,14,1.25,0.2 --cam_batch_size 16 --clims_learning_rate 0.0005 --use_distributed_train True --cbs_loss_thresh 0.285
If you are using our code, please consider citing our paper.
@InProceedings{Xie_2022_CVPR,
author = {Xie, Jinheng and Hou, Xianxu and Ye, Kai and Shen, Linlin},
title = {CLIMS: Cross Language Image Matching for Weakly Supervised Semantic Segmentation},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2022},
pages = {4483-4492}
}
@article{xie2022cross,
title={Cross Language Image Matching for Weakly Supervised Semantic Segmentation},
author={Xie, Jinheng and Hou, Xianxu and Ye, Kai and Shen, Linlin},
journal={arXiv preprint arXiv:2203.02668},
year={2022}
}
This repository was highly based on IRNet, thanks for Jiwoon Ahn's great code.
Owner
- Name: Computer Vision Institute, SZU
- Login: CVI-SZU
- Kind: organization
- Location: Shenzhen Univeristy, Shenzhen, China
- Website: http://cv.szu.edu.cn/
- Repositories: 13
- Profile: https://github.com/CVI-SZU
Computer Vision Institute, Shenzhen University
GitHub Events
Total
- Issues event: 3
- Watch event: 11
- Issue comment event: 4
- Fork event: 1
Last Year
- Issues event: 3
- Watch event: 11
- Issue comment event: 4
- Fork event: 1
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 28
- Total pull requests: 0
- Average time to close issues: 17 days
- Average time to close pull requests: N/A
- Total issue authors: 22
- Total pull request authors: 0
- Average comments per issue: 4.68
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 2
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 2
- Pull request authors: 0
- Average comments per issue: 0.5
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- Spritea (3)
- Bala93 (2)
- hung334 (2)
- yangxinhaosmu (2)
- zkjkak (2)
- y276624172 (1)
- YangjiaqiDig (1)
- mt-cly (1)
- ProjectDisR (1)
- Big-Brother-Pikachu (1)
- CZeng1220 (1)
- ineedugirl (1)
- mymuli (1)
- cqjtuhxf (1)
- fsted (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- Cython ==0.29.23
- DALL-E ==0.1
- Markdown ==3.3.4
- MarkupSafe ==2.0.1
- PasteDeploy ==2.1.1
- Pillow ==8.2.0
- PyWavelets ==1.1.1
- PyYAML ==5.4.1
- SQLAlchemy ==1.4.25
- Shapely ==1.7.1
- WTForms ==2.3.3
- WebOb ==1.8.7
- Werkzeug ==1.0.1
- absl-py ==0.12.0
- addict ==2.4.0
- aiohttp ==3.8.1
- aiosignal ==1.2.0
- albumentations ==1.0.3
- antlr4-python3-runtime ==4.8
- anykeystore ==0.2
- apex ==0.1
- async-timeout ==4.0.1
- attrs ==21.2.0
- axial-positional-embedding ==0.2.1
- blobfile ==1.2.7
- braceexpand ==0.1.7
- cachetools ==4.2.2
- certifi ==2020.12.5
- chainer ==7.8.1
- chainercv ==0.13.1
- chardet ==4.0.0
- charset-normalizer ==2.0.8
- click ==8.0.1
- cmapy ==0.6.6
- cryptacular ==1.6.2
- cycler ==0.10.0
- dalle-pytorch ==1.1.4
- dataclasses ==0.6
- decorator ==4.4.2
- deepspeed ==0.5.7
- defusedxml ==0.7.1
- dominate ==2.6.0
- easydict ==1.9
- efficientnet-pytorch ==0.7.1
- einops ==0.3.2
- filelock ==3.4.0
- frozenlist ==1.2.0
- fsspec ==2021.11.1
- ftfy ==6.0.3
- future ==0.18.2
- g-mlp-pytorch ==0.1.5
- google-auth ==1.30.0
- google-auth-oauthlib ==0.4.4
- grad-cam ==1.2.3
- graphviz ==0.8.4
- greenlet ==1.1.2
- grpcio ==1.37.1
- hjson ==3.0.2
- huggingface-hub ==0.1.2
- hupper ==1.10.3
- idna ==2.10
- imageio ==2.9.0
- imgaug ==0.4.0
- iniconfig ==1.1.1
- inplace-abn ==1.1.0
- joblib ==1.0.1
- jsonpatch ==1.32
- jsonpointer ==2.1
- kiwisolver ==1.3.1
- matplotlib ==3.4.1
- mmcv-full ==1.4.3
- multidict ==5.2.0
- mypy ==0.910
- mypy-extensions ==0.4.3
- networkx ==2.5.1
- ninja ==1.10.2.3
- numpy ==1.20.2
- oauthlib ==3.1.0
- omegaconf ==2.1.0
- opencv-python ==4.5.1.48
- opencv-python-headless ==4.5.3.56
- packaging ==21.3
- pandas ==1.2.4
- pbkdf2 ==1.3
- plaster ==1.0
- plaster-pastedeploy ==0.7
- pluggy ==1.0.0
- prettytable ==3.0.0
- protobuf ==3.15.8
- psutil ==5.8.0
- py ==1.11.0
- pyDeprecate ==0.3.1
- pyasn1 ==0.4.8
- pyasn1-modules ==0.2.8
- pycocotools ==2.0.2
- pycryptodomex ==3.11.0
- pydensecrf ==1.0rc2
- pyparsing ==2.4.7
- pyramid ==2.0
- pyramid-mailer ==0.15.1
- pytest ==6.2.5
- python-dateutil ==2.8.1
- python3-openid ==3.2.0
- pytorch-lightning ==1.5.3
- pytz ==2021.1
- pyzmq ==22.1.0
- randaugment ==1.0.2
- regex ==2021.4.4
- repoze.sendmail ==4.4.1
- requests ==2.25.1
- requests-oauthlib ==1.3.0
- resnest ==0.0.6b20210715
- rotary-embedding-torch ==0.1.2
- rsa ==4.7.2
- sacremoses ==0.0.46
- scikit-image ==0.18.1
- scikit-learn ==0.24.1
- scipy ==1.6.2
- seaborn ==0.11.2
- six ==1.15.0
- sklearn ==0.0
- taming-transformers-rom1504 ==0.0.6
- tensorboard ==2.5.0
- tensorboard-data-server ==0.6.0
- tensorboard-plugin-wit ==1.8.0
- tensorboardX ==2.2
- threadpoolctl ==2.1.0
- tifffile ==2021.4.8
- timm ==0.4.12
- tokenizers ==0.10.3
- toml ==0.10.2
- torch ==1.7.1
- torchfile ==0.1.0
- torchmetrics ==0.6.0
- torchnet ==0.0.4
- torchvision ==0.8.2
- tornado ==6.1
- tqdm ==4.60.0
- transaction ==3.0.1
- transformers ==4.12.5
- translationstring ==1.4
- triton ==1.1.1
- tsnecuda ==0.1.1
- typing-extensions ==3.7.4.3
- urllib3 ==1.26.4
- velruse ==1.1.1
- venusian ==3.0.0
- visdom ==0.1.8.9
- wcwidth ==0.2.5
- webdataset ==0.1.103
- websocket-client ==1.1.0
- wtforms-recaptcha ==0.3.2
- xmltodict ==0.12.0
- yapf ==0.32.0
- yarl ==1.7.2
- youtokentome ==1.0.6
- zope.deprecation ==4.4.0
- zope.interface ==5.4.0
- zope.sqlalchemy ==1.6