Git Product home page Git Product logo

transfgu's Introduction

TransFGU: A Top-down Approach to Fine-Grained Unsupervised Semantic Segmentation

Zhaoyun Yin, Pichao Wang, Fan Wang, Xianzhe Xu, Hanling Zhang, Hao Li, Rong Jin

[Preprint]

News: TransFGU is accepted as a paper for an oral presentation at ECCV'2022!

Getting Started

Create the environment

# create conda env
conda create -n TransFGU python=3.8
# activate conda env
conda activate TransFGU
# install pytorch
conda install pytorch=1.8 torchvision cudatoolkit=10.1
# install other dependencies
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.8.0/index.html
pip install -r requirements.txt

Dataset Preparation

the structure of dataset folders should be as follow:

data/
    │── MSCOCO/
    │     ├── images/
    │     │     ├── train2017/
    │     │     └── val2017/
    │     └── annotations/
    │           ├── train2017/
    │           ├── val2017/
    │           ├── instances_train2017.json
    │           └── instances_val2017.json
    │── Cityscapes/
    │     ├── leftImg8bit/
    │     │     ├── train/
    │     │     │       ├── aachen
    │     │     │       └── ...
    │     │     └──── val/
    │     │             ├── frankfurt
    │     │             └── ...
    │     └── gtFine/
    │           ├── train/
    │           │       ├── aachen
    │           │       └── ...
    │           └──── val/
    │                   ├── frankfurt
    │                   └── ...
    │── PascalVOC/
    │     ├── JPEGImages/
    │     ├── SegmentationClass/
    │     └── ImageSets/
    │           └── Segmentation/
    │                   ├── train.txt
    │                   └── val.txt
    └── LIP/
          ├── train_images/
          ├── train_segmentations/
          ├── val_images/
          ├── val_segmentations/
          ├── train_id.txt
          └── val_id.txt

Model download

Name mIoU Pixel Accuracy Model
COCOStuff-27 16.19 44.52 Google Drive
COCOStuff-171 11.93 34.32 Google Drive
COCO-80 12.69 64.31 Google Drive
Cityscapes 16.83 77.92 Google Drive
Pascal-VOC 37.15 83.59 Google Drive
LIP-5 25.16 65.76 Google Drive
LIP-16 15.49 60.08 Google Drive
LIP-19 12.24 42.52 Google Drive

Train and Evaluate Our Method

To train and evaluate our method on different datasets under desired granularity level, please follow the instructions here.

Citation

If you find our work useful in your research, please consider citing:

@inproceedings{yin2022transfgu,
  title		=	{TransFGU: A Top-down Approach to Fine-Grained Unsupervised Semantic Segmentation},
  author	=	{Zhaoyun, Yin and Pichao, Wang and Fan, Wang and Xianzhe, Xu and Hanling, Zhang and Hao, Li and Rong, Jin},
  booktitle	=	{European Conference on Computer Vision},
  pages		=	{73--89},
  year		=	{2022},
  organization	=	{Springer}
}

LICENSE

The code is released under the MIT license.

Copyright

Copyright (C) 2010-2021 Alibaba Group Holding Limited.

transfgu's People

Contributors

zyy-cn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

transfgu's Issues

Downloads of Cityscapes Dataset

Hi, thanks for the interesting work!

Could you please check/update the download links of Cityscapes Dataset at this project page? Many thanks!

Best,
Jun-Pu Zhang

hi,about token file problem

ERROR:root:No token file found. Also make sure that a [prod] section with a 'token = value' assignment exists.
I have a question for you,The error is to obtain token by CUDA_VISIBLE_DEVICES=0 python pascalvoc_crop.py,The generated token file is in the trained directory

The following is the final output of training VOC, that is, when saving, there is a problem. I suppose so eval_pascalvoc(cfg, model, val_loader_pascalvoc, history, device, epoch,) Internal error, do not know why. I train with only one gpu. Can the author help me?

..
INFO - train_pascalvoc - train epoch: [0][ 457/ 457] Time: 1.62 (1.73) Loss(cat/unc/emb/all): 1.7187/0.8079/0.9578/2.9189 (1.9438/0.8700/0.9989/3.2037)
INFO - train_pascalvoc - * train epoch: [0] loss(cat/unc/emb/all): 1.9438/0.8700/0.9989/3.2037
ERROR - pascalvoc - Failed after 0:13:26!
Usage:
pascalvoc_trainval.py [(with UPDATE...)] [options]
pascalvoc_trainval.py help [COMMAND]
pascalvoc_trainval.py (-h | --help)
pascalvoc_trainval.py COMMAND [(with UPDATE...)] [options]
sacred.utils.MissingConfigError: eval_pascalvoc is missing value(s): ['exp_ckpt_dir']

Training on custom data

Hi,

Great work. I am interested to use this method on my custom dataset. Is it possible to train the model on custom dataset?

About training time

Thanks for proposing such an interesting approach! I want to know how long will TransFGU take to train on COCO-S-27* with 4 × Tesla V100 32G GPUs?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.