Coder Social home page Coder Social logo

cbnuirl / cbnu_swin-transformer Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 7.13 MB

This repository is for MORAI dataset training in 2D object detection with swin-transformer

License: Apache License 2.0

Python 99.81% Dockerfile 0.13% Shell 0.06%
morai-simulator object-detection swin-transformer mmdetection

cbnu_swin-transformer's Introduction

2D Object Detection with Swin Transformer on MORAI dataset

This repository is based on Swin-Transformer-Object-Detection and mmdetection. All configurations and codes were revised for MORAI dataset.

Results and Models

Swin-L + FPN + Cascade R-CNN

Dataset Epoch box AP(vehicle) config log model
Real 36 85.8 config log [model]
Daegu 36 68.3 config log [model]
Sejong BRT 1 36 70.5 config log [model]
Sangam Edge 36 71.1 config log [model]
Sejong BRT 1 Edge 36 69.6 config log [model]

Real:

image

Daegu:

image

Sejong BRT 1:

image

Sangam Edge:

image

Sejong BRT 1 Edge:

image

Mixed Models(10% real + 90% synthetic)

Dataset Epoch Real test-set box AP(vehicle) config log model
Daegu 36 73.9 config log [model]
Sejong BRT 1 36 71.3 config log [model]
Sangam Edge 36 70.3 config log [model]
Sejong BRT 1 Edge 36 64.8 config log [model]

Daegu:

image

Sejong BRT 1:

image

Sangam Edge:

image

Sejong BRT 1 Edge:

image

Usage

Installation

Please refer to install.md for installation, dataset preparation and making configuration file.

Testing, Demo

# single-gpu testing
python tools/test.py {CONFIG_FILE} {MODEL_FILE} --eval bbox \
(--show-dir {LOCATION}) \
(--options "classwise=True")

# multi-gpu testing
(CUDA_VISIBLE_DEVICES={GPU_NUM}) \
tools/dist_test.sh {CONFIG_FILE} {MODEL_FILE} {TOTAL_NUM_OF_GPU} --eval bbox \
(--show-dir {LOCATION}) \
(--options “classwise=True”)

--show-dir saves pictures of result, --options "classwise=True" shows average precision of all classes. You can use --show in GUI environment.

Example:

python tools/test.py \
configs/swin/cascade_mask_rcnn_swin_base_patch4_window7_mstrain_480-800_giou_4conv1f_adamw_3x_morai_daegu.py \
checkpoints/cascade_mask_rcnn_swin_base_patch4_window7_mstrain_480-800_giou_4conv1f_adamw_3x_morai_daegu.pth \
--eval bbox --show-dir result.bbox.daegu/ --options “classwise=True”

CUDA_VISIBLE_DEVICES=0,1,3 tools/dist_test.sh \
configs/swin/cascade_mask_rcnn_swin_base_patch4_window7_mstrain_480-800_giou_4conv1f_adamw_3x_morai_daegu.py \
checkpoints/cascade_mask_rcnn_swin_base_patch4_window7_mstrain_480-800_giou_4conv1f_adamw_3x_morai_daegu.pth 3 \
--eval bbox --show-dir result.bbox.daegu/ --options “classwise=True”

Training

# single-gpu training
python tools/train.py {CONFIG_FILE}

# multi-gpu training
(CUDA_VISIBLE_DEVICES={GPU_NUM}) tools/dist_train.sh {CONFIG_FILE} {TOTAL_NUM_OF_GPU}

Example:

python tools/train.py configs/swin/cascade_mask_rcnn_swin_base_patch4_window7_mstrain_480-800_giou_4conv1f_adamw_3x_morai_daegu.py

CUDA_VISIBLE_DEVICES=0,1,3 tools/dist_train.sh \
configs/swin/cascade_mask_rcnn_swin_base_patch4_window7_mstrain_480-800_giou_4conv1f_adamw_3x_morai_daegu.py 3

cbnu_swin-transformer's People

Contributors

cbnuirl avatar

Stargazers

 avatar

Watchers

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