GithubHelp home page GithubHelp logo

mohammadmahdikazemi / ifr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jfzhuang/ifr

0.0 0.0 0.0 20.17 MB

[CVPR'22] Semi-Supervised Video Semantic Segmentation with Inter-Frame Feature Reconstruction

License: MIT License

Shell 0.21% C++ 17.56% Python 63.64% Cuda 18.60%

ifr's Introduction

IFR

This repository is the official implementation of "Semi-Supervised Video Semantic Segmentation with Inter-Frame Feature Reconstruction" (accepted by CVPR 2022). It is designed for semi-supervised video semantic segmentation task.

Install & Requirements

The code has been tested on pytorch=1.8.2 and python3.8. Please refer to requirements.txt for detailed information.

To Install python packages

pip install -r requirements.txt

Download Pretrained Weights

mkdir ./IFR/pretrained
cd ./IFR/pretrained
# download resnet18 imagenet pretrained weight
wget http://sceneparsing.csail.mit.edu/model/pretrained_resnet/resnet18-imagenet.pth
# download resnet101 imagenet pretrained weight
wget http://sceneparsing.csail.mit.edu/model/pretrained_resnet/resnet101-imagenet.pth

Data preparation

You need to download the Cityscapes datasets.

Your directory tree should be look like this:

./IFR/data
├── cityscapes
│   ├── gtFine
│   │   ├── train
│   │   └── val
│   └── leftImg8bit_sequence
│       ├── train
│       └── val

Prepare Downsample Dataset

Generated downsample dataset would be saved in ./data

cd ./IFR
python tools/data_downsample.py

Stage One Training of Accel

For example, train image segmentation model on 2 GPUs. Checkpoints would be saved in ./IFR/work_dirs.

# train PSP18 baseline model
cd ./IFR/exp/sup_30_res18/scripts
bash train.sh
# train PSP101 baseline model
cd ./IFR/exp/sup_30_res101/scripts
bash train.sh
# train PSP18 IFR model
cd ./IFR/exp/IFR_30_res18/scripts
bash train.sh
# train PSP101 IFR model
cd ./IFR/exp/IFR_30_res101/scripts
bash train.sh

Stage Two Training of Accel

For example, train Accel18 on 2 GPUs. Checkpoints would be saved in ./Accel/work_dirs.

mkdir ./Accel/work_dirs
# train Accel18 with baseline model
cd ./Accel/exp/accel18_30_sup/script
bash train.sh
# train Accel18 with IFR model
cd ./Accel/exp/accel18_30_IFR/script
bash train.sh

ifr's People

Contributors

jfzhuang avatar

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.