Home

Awesome

YOLOX OBB -- YOLOX 旋转框 | 实例分割

version


<img align=center>result_vis


ForeWord

More rotated detection methods can reference OBBDetection. And you can reference 知乎 for more information🔥🔥🔥(知乎更加详细,大家请参考知乎)

Introduction

Method

Content

Quick Start

Firstly, create python environment

conda create -n yolox_dect python=3.7 -y

then, install pytorch according to your machine, as cuda-10.2 and pytorch-1.7.0, you can install like following

conda activate yolox_dect
conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=10.2 -c pytorch -y

then, clone the github of the item and install requirements

git clone --recursive https://github.com/DDGRCF/YOLOX_OBB.git
cd YOLOX_OBB
pip3 install -U pip && pip3 install -r requirements.txt
pip3 install -v -e .

install BboxToolkit

cd BboxToolkit
python setup.py develop

Instruction

Data

Convert Other data format into dota style

If We want to train your datasets, firstly you first convert your data as dota datasets format. If you have a coco annotation-style datasets, you can just convert it annoatations into dota format. We perpare a script for you.

$ cd my_exps
$ bash coco2dota.sh
# PS: you should change filename、diranme and so on.

Convert dota style into BboxToolkit style

This part please reference BboxToolkit

Demo

I prepare the shell the demo script so that you can quick run obb demo as :

$ expn=... && exp=... && ckpt=... && cuda=... && img_path=...
$ bash my_exps/demo.sh ${expn} ${exp} ${ckpt} ${cuda} ${img_path} --output_format obb --save_result

Train

$ expn=... && exp=... && cuda=... && num_device=... && batch_size=...
$ bash my_exps/train.sh ${expn} ${exp} ${cuda} ${num_device} ${batch_size} --fp16[optional] 

Test

OBB

$ expn=... && exp=... && ckpt=... && cuda=...
$ bash my_exps/eval_obb.sh ${expn} ${exp} ${ckpt} ${cuda} ${num_device} ${batch_size} --fuse[optional] --fp16[optional] --options is_merge=True
$ expn=... && exp=... && ckpt=... && cuda=... && num_device=... && batch_size=... 
$ bash my_exps/eval_obb.sh ${expn} ${exp} ${ckpt} ${cuda} ${num_device} ${batch_size} --fuse[optional] --fp16[optional] --options is_merge=True is_submiss=True --test

Deploy

Results

MODEL_ZOO | code: tdm6

Modelimage sizemAPepochs
YOLOX_s_dota1_0102470.82(73.17)80(137)
YOLOX_s_dota2_0102449.5280
YOLOX_s_condinst_coco102426.4336
YOLOX_s_sparseinst_coco10240.05(error)24
more results, wait...

Ralated Hub