Giter Site home page Giter Site logo

junhai0428 / yolov5_obb_kld Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lx-cly/yolov5_obb_kld

0.0 0.0 0.0 820 KB

KLD实现旋转目标检测

License: GNU General Public License v3.0

Dockerfile 0.33% Shell 0.89% Python 61.27% Makefile 0.01% C++ 34.32% Cython 0.18% Cuda 2.98% SWIG 0.03%

yolov5_obb_kld's Introduction

YOLOv5_OBB_KLD

基于kld_loss的YOLOv5 旋转目标检测。因为基于项目 也可以YOLOv5 in DOTA_OBB dataset with CSL_label.(Oriented Object Detection)

Datasets and pretrained checkpoint

Fuction

  • train.py. Train.

  • detect.py. Detect and visualize the detection result. Get the detection result txt.

  • evaluation.py. Merge the detection result and visualize it. Finally evaluate the detector

Installation (Linux Recommend, Windows not Recommend)

1. Python 3.8 with all requirements.txt dependencies installed, including torch==1.6, opencv-python==4.1.2.30, To install run:

$   pip install -r requirements.txt

2. Install swig

$   cd  \.....\yolov5_OBB_KLD\utils
$   sudo apt-get install swig

3. Create the c++ extension for python

$   swig -c++ -python polyiou.i
$   python setup.py build_ext --inplace

效果

只是用DOTAv1.5的ship一类进行训练,超参数相同,KLD比CSL的AP50高0.3%,不过收敛很快。

More detailed explanation

想要了解其他相关实现的细节和原理可以参看项目README.md 这里主要介绍修改成KLD_LOSS的部分。 1. 'train.py'

  • parser.add_argument('--use_kld', type=bool, default=True, help='use kld')选择KLD or CSL
  • 修改.\models\yolo.pyDetect类中初始化函数的self.angle = 1 #CSL---180 KLD--1

2. 'test.py'

  • 新增了在线推断代码

3. 'detect.py'

  • 新增了多batch_size的检测,修改ManyPi=True
  • parser.add_argument('--kld', type=bool, default=True, help='use kld') 对应KLD or CSL的检测

4. 'evaluation.py'

  • Run the detect.py demo first. Then change the path with yours:
  • 添加了merged前后的预测结果.

5. 'yolo_new.py'

  • 在YOLOv5中加入注意力机制

感激

感谢以下的项目,排名不分先后

关于作者

  Name  : "lx"
  describe myself:"good man"

yolov5_obb_kld's People

Contributors

lx-cly 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.