ultralytics icon indicating copy to clipboard operation
ultralytics copied to clipboard

obb的性能疑惑

Open fakerhbj opened this issue 1 year ago • 16 comments

Search before asking

  • [X] I have searched the YOLOv8 issues and discussions and found no similar questions.

Question

obb的性能是采用了多尺度训练和多尺度测试出来的性能结果吗?

Additional

No response

fakerhbj avatar Jan 15 '24 08:01 fakerhbj

@fakerhbj 指标是多尺度训练多尺度测试的,速度性能是单张单尺度1024x1024的速度

Laughing-q avatar Jan 15 '24 11:01 Laughing-q

@fakerhbj 指标是多尺度训练多尺度测试的,速度性能是单张单尺度1024x1024的速度

请问如何开启多尺度训练和多尺度预测呢?有配置文件或者相关文档吗?

mzy369 avatar Jan 15 '24 16:01 mzy369

我弄了一个yolov8 obb的项目,看上去还可以,请看一下:https://github.com/kuazhangxiaoai/yolov8-obb.git yolov8-obb

kuazhangxiaoai avatar Jan 16 '24 06:01 kuazhangxiaoai

@kuazhangxiaoai i'm glad to hear you're working on a YOLOv8 OBB project and that it's looking promising! While I won't be able to visit external links or view images, I encourage you to continue engaging with the community on our Discussions page. If you have specific questions or need guidance, feel free to ask there or open an issue in the repo. Keep up the great work! 🚀

glenn-jocher avatar Jan 16 '24 14:01 glenn-jocher

@fakerhbj 指标是多尺度训练多尺度测试的,速度性能是单张单尺度1024x1024的速度

请问如何开启多尺度训练和多尺度预测呢?有配置文件或者相关文档吗?

因为DOTA数据集的分辨率很高,所以DOTA的训练是先采用滑窗的方式切割图片为1024x1024大小,这里的多尺度是指滑窗切割的时候的多尺度,具体可参考:https://docs.ultralytics.com/datasets/obb/dota-v2/#split-dota-images, 送入模型之前都还是采用统一的1024大小

Laughing-q avatar Jan 17 '24 07:01 Laughing-q

我弄了一个yolov8 obb的项目,看上去还可以,请看一下:https://github.com/kuazhangxiaoai/yolov8-obb.git yolov8-obb

你好你这是yolov8s模型吗,同时想问一下,如何使用yolov8推理测试集,然后提交dota官网评测

QibangLi avatar Jan 17 '24 11:01 QibangLi

@QibangLi 你好!很高兴你在使用YOLOv8进行OBB项目。关于使用YOLOv8进行推理和提交到DOTA官网评测的步骤,你可以参考我们的文档中的Predict和Val模式说明。这些文档会指导你如何进行模型推理和验证。祝你的项目成功!🌟

glenn-jocher avatar Jan 17 '24 17:01 glenn-jocher

@fakerhbj 指标是多尺度训练多尺度测试的,速度性能是单张单尺度1024x1024的速度

请问如何开启多尺度训练和多尺度预测呢?有配置文件或者相关文档吗?

因为DOTA数据集的分辨率很高,所以DOTA的训练是先采用滑窗的方式切割图片为1024x1024大小,这里的多尺度是指滑窗切割的时候的多尺度,具体可参考:https://docs.ultralytics.com/datasets/obb/dota-v2/#split-dota-images, 送入模型之前都还是采用统一的1024大小

请问数据集多尺度切割之后,还需要将multi_scale这个参数设置为True吗?

mzy369 avatar Jan 17 '24 23:01 mzy369

@mzy369 不需要,针对DOTA数据的多尺度都是指切图的多尺度,训练都是1024x1024的固定分辨率

Laughing-q avatar Jan 18 '24 06:01 Laughing-q

请问想要复现 yolov8 obb(dotav1)的结果(yolov8n-obb,map test50 :78.0 ),1. 我该使用哪一个超参数配置文件 ?还是默认的这个路径吗?‘ultralytics/cfg/ /default.yaml’ 2.需要使用哪个预训练权重?是yolov8n.pt(coco)吗? @Laughing-q

puppetmonkey avatar Jan 26 '24 13:01 puppetmonkey

@puppetmonkey 你可以通过如下的方式查看训练的参数:

import torch

ckpt = torch.load("weights/yolov8m-obb.pt")
print(ckpt["train_args"])

所有的obb模型都是从头开始训练的,没有使用预训练加载

Laughing-q avatar Jan 31 '24 02:01 Laughing-q

我弄了一个yolov8 obb的项目,看上去还可以,请看一下:https://github.com/kuazhangxiaoai/yolov8-obb.git yolov8-obb

你好你这是yolov8s模型吗,同时想问一下,如何使用yolov8推理测试集,然后提交dota官网评测

请问你有解决这个问题吗,我也有同样的困惑

LeiaJ520 avatar Feb 27 '24 08:02 LeiaJ520

@LeiaJ520 hey there! 😊 It looks like you're interested in using YOLOv8 for inference on a test set and submitting results to the DOTA website. If you're working with a custom project like yolov8-obb, you'd typically follow these steps for inference and submission:

  1. Inference: Use the predict mode with your model. Here's a quick example if you're using the CLI:

    yolo detect predict model=path/to/your/yolov8-obb.pt source=path/to/test/images
    

    Make sure to replace path/to/your/yolov8-obb.pt and path/to/test/images with the actual paths.

  2. Prepare Submission: Format your results according to the DOTA evaluation guidelines. This usually involves converting your model's output to the DOTA submission format.

  3. Submit: Follow the submission instructions on the DOTA competition website.

If you're looking for more specific guidance on formatting the results or the submission process, the DOTA competition guidelines or forums might have more detailed instructions. Good luck with your submission! 🚀

glenn-jocher avatar Feb 27 '24 16:02 glenn-jocher

👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.

For additional resources and information, please see the links below:

  • Docs: https://docs.ultralytics.com
  • HUB: https://hub.ultralytics.com
  • Community: https://community.ultralytics.com

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLO 🚀 and Vision AI ⭐

github-actions[bot] avatar Mar 30 '24 00:03 github-actions[bot]

@mzy369 不需要,针对DOTA数据的多尺度都是指切图的多尺度,训练都是1024x1024的固定分辨率 您好,为什么我切分出的是682×682的分辨率,而不是1024×1024

STITCHESHHH avatar Apr 10 '24 09:04 STITCHESHHH

@mzy369 不需要,针对DOTA数据的多尺度都是指切图的多尺度,训练都是1024x1024的固定分辨率 您好,为什么我切分出的是682×682的分辨率,而不是1024×1024

你好,请问你解决了吗

csh313 avatar May 09 '24 01:05 csh313

还没有,多尺度里面可以指定切割的大小,可是我的代码一直报错

LeiaJ520 avatar May 13 '24 01:05 LeiaJ520

还没有,多尺度里面可以指定切割的大小,可是我的代码一直报错

就用官方的代码split_dota就可以吧,再用 from ultralytics.data.split_dota import split_trainval, split_test

split train and val set, with labels.

split_trainval( data_root='path/to/DOTAv1.0/', save_dir='path/to/DOTAv1.0-split/', rates=[0.5, 1.0, 1.5], # multiscale gap=500 )

split test set, without labels.

split_test( data_root='path/to/DOTAv1.0/', save_dir='path/to/DOTAv1.0-split/', rates=[0.5, 1.0, 1.5], # multiscale gap=500 ) 这段分割,我用这个把v1分割成10w张,分辨率也是682,跑一下明显提高了map,就是数据太多了跑了两天。又从dota官网下载的,分割成了1024。

csh313 avatar May 13 '24 02:05 csh313

我也是用的这个代码,可能是我数据集结构有问题吧,总是报错

微信图片_20240513105430 另外,我还有个问题想请问下,就是在进行多尺度测试的时候,图片已经被划分为多个尺度的,那最后如何让整合检测结果,并提交到DOTA服务器上计算结果呢

LeiaJ520 avatar May 13 '24 02:05 LeiaJ520

@csh313 你可以关注一下https://github.com/CAPTAIN-WHU/DOTA_devkit

kuazhangxiaoai avatar May 13 '24 02:05 kuazhangxiaoai

@puppetmonkey 你可以通过如下的方式查看训练的参数:

import torch

ckpt = torch.load("weights/yolov8m-obb.pt")
print(ckpt["train_args"])

所有的obb模型都是从头开始训练的,没有使用预训练加载

但是按照您给的方法查看yolov8n-obb.pt训练参数,显示的'pretrained': True。想再次咨询一下obb 的预训练权重用的哪一个?

puppetmonkey avatar May 29 '24 10:05 puppetmonkey

image

puppetmonkey avatar May 29 '24 10:05 puppetmonkey

Hello! It looks like there might be a misunderstanding or a discrepancy in the checkpoint file. The pretrained: True flag in the yolov8n-obb.pt model's training arguments suggests that it was initialized with weights from a pretrained model. Typically, for OBB models, this could be a generic pre-training on a related dataset to help the model converge better during the specific task training.

If you're looking for specifics about which pretrained weights were used, this information is usually decided during the model training setup and might not be directly visible in the checkpoint file. It often involves a base YOLO model trained on a large, diverse dataset. For exact details, reviewing the training script or model configuration file used to train yolov8n-obb.pt would be necessary.

If you have further questions or need more detailed assistance, feel free to reach out!

glenn-jocher avatar May 29 '24 15:05 glenn-jocher

👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.

For additional resources and information, please see the links below:

  • Docs: https://docs.ultralytics.com
  • HUB: https://hub.ultralytics.com
  • Community: https://community.ultralytics.com

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLO 🚀 and Vision AI ⭐

github-actions[bot] avatar Jul 01 '24 00:07 github-actions[bot]