Giter Club home page Giter Club logo

nn_project1_kong_9j9f's Introduction

"Adapting Transformer in Image Segmentation tasks"

2020021461 Heejo Kong

1st project for Applications and Practice in Neural Networks

This repository is based on official code of mmsegmentation & SegFormer

https://github.com/open-mmlab/mmsegmentation

https://github.com/NVlabs/SegFormer

Installation

For install and data preparation, please refer to the guidelines as follows

pip install torchvision==0.8.2
pip install timm==0.3.2
pip install mmcv-full==1.2.7 -f https://download.openmmlab.com/mmcv/dist/{cuda version}/{torch version}/index.html
# example, https://download.openmmlab.com/mmcv/dist/cu101/torch1.7.0/index.html
pip install opencv-python==4.5.1.48
git clone https://github.com/deepkong/NN_project1_kong.git
cd NN_project1_kong && pip install -e .

Donwload [dataset] https://drive.google.com/file/d/1TTFloQwNdg95h-IJceUtVs1WQl_Bu1Ev/view?usp=sharing
Need to prepare the data root as below

NN_project1_kong
├── mmseg
├── tools
├── local_configs
├── data
│   ├── semantic_drone_dataset
│   │   ├── images
│   │   ├── labels
│   │   ├── split
│   │   │   ├── train.txt
│   │   │   ├── val.txt
│   │   │   ├── test.txt

Training

Donwload [pretrained weights] https://drive.google.com/file/d/1VuhtdeQSGl2gxndg_-98HPFJ1qEl3KiH/view?usp=sharing

# Single-gpu training
python tools/train.py local_configs/segformer_drone/segformer.b2.512x512.drone.20k.py

# Multi-gpu training
./tools/dist_train.sh local_configs/segformer_drone/segformer.b2.512x512.drone.20k.py <GPU_NUM>

Evaluation

Donwload [weights] https://drive.google.com/file/d/15X00UIMRd3cmFC7sgKiHu5DCRQhM5zik/view?usp=sharing

# Single-gpu testing
python tools/test.py local_configs/segformer_drone/segformer.b2.512x512.drone.20k.py /path/to/checkpoint_file --show-dir /path/to/save_file

# Multi-gpu testing
./tools/dist_test.sh local_configs/segformer_drone/segformer.b2.512x512.drone.20k.py /path/to/checkpoint_file <GPU_NUM> --show-dir /path/to/save_file

nn_project1_kong_9j9f's People

Contributors

patchtester avatar shany14 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.