Comments (13)
Hello @p110120p1, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook , Docker Image, and Google Cloud Quickstart Guide for example environments.
If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.
If this is a custom model or data training question, please note Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:
- Cloud-based AI systems operating on hundreds of HD video streams in realtime.
- Edge AI integrated into custom iOS and Android apps for realtime 30 FPS video inference.
- Custom data training, hyperparameter evolution, and model exportation to any destination.
For more information please visit https://www.ultralytics.com.
from yolov5_obb.
- 先使用demo文件进行训练,确保相关环境安装正确,train.py detect.py evaluation.py 这3个demo都有可视化结果,如果demo运行不成功,还请检查环境版本是否与reqirements.txt一致;
- 训练自制训练集时,请确保labels的数据形式与ReadMe一致:
【classid x_c y_c longside shortside Θ】 Θ∈[0, 180)
-
longside: The longest side of the oriented rectangle.
-
shortside: The other side of the oriented rectangle.
-
Θ: The angle between the longside and the x-axis(The x-axis rotates clockwise);x轴顺时针旋转遇到最长边所经过的角度
图示:
from yolov5_obb.
你好,我按照你之前说的进行了demo训练和推理都没问题,之后我使用自制数据集训练,发现对于大目标的效果好像不太好,请问这个如何处理
from yolov5_obb.
“效果不太好”这个描述过于宽泛,而且具体问题也需要具体分析。自制数据集目标大致是什么样的?大目标指的是哪一类目标?
根据你给出的图片来看,首先你的训练集规模太小,不足以支撑深度学习算法,因为这个项目是把θ作为分类任务来处理的,数据规模小原本就会引入类间不平衡的问题,而θ有180个分类,一旦数据规模不够类间不平衡产生的影响就会更大,特别是角度预测的准确率会大大降低;
另外,预测不出目标,这个问题不太具体。
是因为预测出来的框置信度太低? —— 那么你就需要调低detect.py文件中的conf_thresh.
预测使用的图片与训练集的图片特征分布完全不相关? —— 那么预测不出框是正常现象。
from yolov5_obb.
就是类似于这种样的数据集,识别表针任务的,我大概每次训练400多轮,数据集为200多张,我在用原版yolov5训练的时候可以mAP能达到0.95,但是用旋转框这个只能把旋转点识别出来,表针要么识别不出来要么角度不对。你指的是这种旋转框任务得增加数据集?但是demo只有44张图片,训练400多轮也有不少目标被识别出来了,准确度也可以。
from yolov5_obb.
训练时生成的train_batch_0/1/2 三张图片能否发过来看看
from yolov5_obb.
from yolov5_obb.
看得出来labels定义没有出问题。
几点建议:
1.train时,终端打印了超出opencv定义范围的情况,这个需要解决,否则影响训练收敛,这个问题发生在general.py -> compute_loss -> rbox_iou -> longsideformat2poly -> longsideformat2cvminAreaRect函数中,即训练中计算损失函数时,需要计算旋转IoU,过程中需要把YOLO longside format转为poly format,但是转换中超出了定义范围,追溯回去的话应该是在某次预测中,θ被预测为180,但是预测值只可能是【0,179】180个分类值中的一个才对。麻烦你在general.py文件中做以下更改,再开始训练,方便我查找问题
2.从预测的图来看,框的中心位置预测是准确的,但就是θ分类出错,可能原因是数据规模太小,导致其中的物体的θ分布在【0,179】上是极度不均匀的,因此产生类间不平衡问题,解决办法:
在解决1问题的基础上,如果θ预测效果依然不好的话,可以尝试对数据集进行随机旋转增强,增加θ在数据集中的多样性
from yolov5_obb.
我之前调整了一下数据集标签格式,参考了一下你的DOTA2YOLO的代码,1问题没有再出现了。刚才发的推理图是在解决了1问题的基础上的效果。
这三个yolov5自带的旋转增强没有动。请问像这种旋转框项目数据集一般为多少好一些呢?
from yolov5_obb.
我的代码里面涉及到旋转增强的只有水平镜像翻转,这种类型和规模的数据我建议你专门找找旋转增强的开源代码,比如旋转度数随机的数据扩增代码。200多张图片实在不适合用θ分类的检测器来训练,因为θ的分类太不均匀了,平均一下每个角度只有不到2张图片。
如果你解决不了数据集扩增的问题,那么适合你的应用场景的检测器符合以下特点:
- 若选择anchor-based的检测器,每个anchor point生成的anchor框,不仅有scale、ratio区别,还有角度区别。
- 尽量把θ作为回归任务来做,本项目使用的CSL是用分类来实现回归的**,即从连续到离散的区别,这个过程中有精度损失,在数据集规模充分的情况下,损失可以接受,但显然你这个应用场景这种精度损失的作用被放大了
from yolov5_obb.
好的谢谢,那我找找旋转增强代码
from yolov5_obb.
好的谢谢,那我找找旋转增强代码
找到了吗兄弟
from yolov5_obb.
from yolov5_obb.
Related Issues (20)
- 关于poly2rbox中转长边表示法的问题 HOT 4
- Problems with using CSL(circular smooth label) HOT 3
- Starting commit from original yolov5 repository
- 旋转框标注方式和后续旋转检测优化 HOT 2
- 图像损坏 HOT 3
- Train fitness chooses incorrect checkpoint as best
- ValueError: not enough values to unpack (expected 3, got 0)
- yolov5_obb_models_resources
- ModuleNotFoundError: No module named 'DOTA_devkit' HOT 1
- 为什么验证时速度很慢呀
- 运行pip install -v -e .时出现了以下错误 HOT 1
- 已按照解决办法替换了文件,执行python setup.py develop还是报错,请问各位大佬该怎么解决 HOT 2
- How to submit to DOTA official website HOT 1
- fatal error C1189 with nms_rotated/setuo.py HOT 1
- box损失问题 HOT 7
- 如何保存预测结果为jason格式???????
- ImportError: cannot import name 'nms_rotated_ext' from partially initialized module 'utils.nms_rotated' (most likely due to a circular import) HOT 3
- INTERNAL ASSERT FAILED got size:5 HOT 3
- error: command C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.3\\bin\\nvcc.exe failed with exit code 1
- 出错 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yolov5_obb.