Code Monkey home page Code Monkey logo

hyctas's Introduction

HyCTAS: Real-Time Image Segmentation via Hybrid Convolutional-Transformer Architecture Search

Overview

We develop a multi-target multi-branch supernet method, which not only retains the multi-branch structure of HRNet, but also finds the proper location for placing multi-head self-attention module. Our search algorithm is optimized towards multiple objectives (e.g., latency and mIoU) and capable of finding architectures on Pareto frontier with arbitrary number of branches in a single search. We further present a series of HyCTAS that searched for the best hybrid combination of light-weight convolution layers and memory-efficient self-attention layers between branches from different resolutions and fuse to high resolution for both efficiency and effectiveness.

intro
HyCTAS search space

intro
HyCTAS searchable modules

Highlights:

  • 1: We design a novel searching framework incorporating with multi-branch space for high resolution representation and genetic-based multi-objective.
  • 2: We present a series of HyCTAS that combines a light-weight convolution module to reduce the computation cost while preserving high-resolution information and a memory efficient self-attention module to attend long-range dependencies.
  • 3: HyCTAS achieves extremely fast speed, low flops, low parameters and maintains competitive accuracy.

Results

intro
HyCTAS models

Prerequisites

  • Ubuntu 16.04
  • Python 3.7
  • CUDA 10.2 (lower versions may work but were not tested)
  • NVIDIA GPU (>= 11G graphic memory) + CuDNN v7.3

This repository has been tested on GTX 2080Ti. Configurations (e.g batch size, image patch size) may need to be changed on different platforms.

Installation

  • Clone this repo:
git clone https://github.com/HyCTAS/HyCTAS.git
cd HyCTAS
  • Install dependencies:
bash install.sh

Usage

0. Prepare the dataset

1. Train from scratch

  • cd HyCTAS/train
  • Set the dataset path via ln -s $YOUR_DATA_PATH ../DATASET
  • Set the output path via mkdir ../OUTPUT
  • Train from scratch
export DETECTRON2_DATASETS="$Your_DATA_PATH"
NGPUS=8
python -m torch.distributed.launch --nproc_per_node=$NGPUS train.py --world_size $NGPUS --seed 12367 --config ../configs/cityscapes/semantic.yaml

2. Evaluation

We provide training models and logs, which can be downloaded from Google Drive.

cd train
  • Download the pretrained weights of the from Google Drive.
  • Set config.model_path = $YOUR_MODEL_PATH in semantic.yaml.
  • Set config.json_file = $HyCTAS_MODEL in semantic.yaml.
  • Start the evaluation process:
CUDA_VISIBLE_DEVICES=0 python test.py

Cite

If you find this repository useful, please use the following BibTeX for citation.

@misc{yu2024realtime,
      title={Real-Time Image Segmentation via Hybrid Convolutional-Transformer Architecture Search}, 
      author={Hongyuan Yu and Cheng Wan and Mengchen Liu and Dongdong Chen and Bin Xiao and Xiyang Dai},
      year={2024},
      eprint={2403.10413},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

hyctas's People

Contributors

jornywan avatar marvinyu1995 avatar hongyuanyu avatar

Stargazers

Sang avatar XiaobinWu avatar Yanting Lu avatar  avatar  avatar IronMan avatar  avatar

Watchers

IronMan avatar  avatar

Forkers

lliai anilgavade

hyctas's Issues

HyCTAS searched architecture

The architecture shown in figure 3image

and this github is different
image

I wonder which one is the HyCTAS-M described in the paper. I am interested in the 3-branch architecture.

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.