Coder Social home page Coder Social logo

iscyy / yoloair Goto Github PK

View Code? Open in Web Editor NEW
2.3K 23.0 409.0 58.52 MB

🔥🔥🔥 专注于YOLOv5,YOLOv7、YOLOv8、YOLOv9改进模型,Support to improve backbone, neck, head, loss, IoU, NMS and other modules🚀

Home Page: https://github.com/iscyy/yoloair

License: GNU General Public License v3.0

Dockerfile 0.05% Shell 0.22% Python 96.61% Jupyter Notebook 3.12%
yolov5 attention backbone pytorch transformer yolor yolov3 yolov4 yolov7 yolox

yoloair's Introduction

Hi there 👋

image

Talking about Personal Stuffs:

  • 😄Learning direction: Computer vision, algorithm enthusiasts, have some exposure to machine learning, deep learning, software program development;
  • 🌟Work direction: software development
  • 👯Internship experience: Tencent Ltd., NetEase Research Institute

Languages and Tools

HTML CSS JavaScript Node.js
VS Code Git Shell python LaTeX pytorch numpy jupyter git github vscode macOS linux ubuntu

Knowledge Graph

  • loading...
  • loading...
  • loading...

yoloair's People

Contributors

iscyy avatar thibaultcastells avatar wangqvq avatar xayon avatar yang-0201 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yoloair's Issues

XCRS源码

请问模块XCRS源码在哪哇 没有找到

yolox:AttributeError: 'DetectX' object has no attribute 'anchors'

I use yolox appearing the following error:
Traceback (most recent call last):
File "train.py", line 690, in
main(opt)
File "train.py", line 586, in main
train(opt.hyp, opt, device, callbacks)
File "train.py", line 253, in train
check_anchors(dataset, model=model, thr=hyp['anchor_t'], imgsz=imgsz)
File "/yoloair-main/utils/autoanchor.py", line 43, in check_anchors
anchors = m.anchors.clone() * m.stride.to(m.anchors.device).view(-1, 1, 1) # current anchors
File "/.conda/envs/yolo/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1185, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'DetectX' object has no attribute 'anchors'

你好,最新版的yoloair在训练acmix的时候报如下错误

Traceback (most recent call last):
File "E:\code\yolov5\yoloair-main\train.py", line 690, in
main(opt)
File "E:\code\yolov5\yoloair-main\train.py", line 586, in main
train(opt.hyp, opt, device, callbacks)
File "E:\code\yolov5\yoloair-main\train.py", line 125, in train
model = Model(cfg or ckpt['model'].yaml, ch=3, nc=nc, anchors=hyp.get('anchors')).to(device) # create
File "E:\code\yolov5\yoloair-main\models\yolo.py", line 132, in init
m.stride = torch.tensor([s / x.shape[-2] for x in self.forward(torch.zeros(1, ch, s, s))]) # forward
File "E:\code\yolov5\yoloair-main\models\yolo.py", line 165, in forward
return self._forward_once(x, profile, visualize) # single-scale inference, train
File "E:\code\yolov5\yoloair-main\models\yolo.py", line 188, in _forward_once
x = m(x) # run
File "D:\Program Files\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "E:\code\yolov5\yoloair-main\models\common.py", line 850, in forward
unfold_k = self.unfold(self.pad_att(k_att)).view(b * self.head, self.head_dim,
File "D:\Program Files\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "D:\Program Files\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\padding.py", line 174, in forward
return F.pad(input, self.padding, 'reflect')
File "D:\Program Files\anaconda3\envs\pytorch\lib\site-packages\torch\nn\functional.py", line 4189, in _pad
return torch._C._nn.reflection_pad2d(input, pad)
RuntimeError: Argument #4: Padding size should be less than the corresponding input dimension, but got: padding (256, 256) at dimension 3 of input 4

Hornet

Thanks for your work, just amazing!

I noticed that there are many models that use Hornet, but there is no corresponding horblock in common.py and yolo.py. Looking forward to further improvement of the project.

By the way, I currently need a model with the best trade-off between mAP and latency. Since I currently don't have enough equipment and time to try all the models, do you have any recommendations?

The fusevggforward() is missing

while using yolov5-lite model to val,m.fusevggforward() is missing In /models/Models/Litemodel.py,RepVGGBlock class
Please add missing code

    def fusevggforward(self, x):
        return self.nonlinearity(self.rbr_dense(x))

训练yolox-s是会出现同样的错误

Traceback (most recent call last):
File "train.py", line 690, in
main(opt)
File "train.py", line 586, in main
train(opt.hyp, opt, device, callbacks)
File "train.py", line 253, in train
check_anchors(dataset, model=model, thr=hyp['anchor_t'], imgsz=imgsz)
File "/home/yoloair-main/utils/autoanchor.py", line 43, in check_anchors
anchors = m.anchors.clone() * m.stride.to(m.anchors.device).view(-1, 1, 1) # current anchors
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 947, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'DetectX' object has no attribute 'anchors'

从头训练yolox模型,报错 'DetectX' object has no attribute 'anchors'

Plotting labels to runs/train/exp4/labels.jpg...
Traceback (most recent call last):
File "/home/innovation/zgx/yoloair-main/train.py", line 695, in
main(opt)
File "/home/innovation/zgx/yoloair-main/train.py", line 591, in main
train(opt.hyp, opt, device, callbacks)
File "/home/innovation/zgx/yoloair-main/train.py", line 254, in train
check_anchors(dataset, model=model, thr=hyp['anchor_t'], imgsz=imgsz)
File "/home/innovation/zgx/yoloair-main/utils/autoanchor.py", line 43, in check_anchors
anchors = m.anchors.clone() * m.stride.to(m.anchors.device).view(-1, 1, 1) # current anchors
File "/home/innovation/anaconda3/envs/yoloair/lib/python3.7/site-packages/torch/nn/modules/module.py", line 779, in getattr
type(self).name, name))
torch.nn.modules.module.ModuleAttributeError: 'DetectX' object has no attribute 'anchors'

键入的命令是:python /home/innovation/zgx/yoloair-main/train.py --data /home/innovation/zgx/yoloair-main/data/VOC.yaml --weights '' --cfg /home/innovation/zgx/yoloair-main/configs/yolox-Improved/yolox_acmix_backbone.yaml --img 640

请问该如何解决?谢谢

训练YOLOX-S

用自己的数据集训练本仓库的YOLOX-S比官方YOLOX-S要高6-7个点,本仓库YOLOX代码和官方YOLOX代码哪里不一样吗?

RuntimeError: expected scalar type Half but found Float

使用yolov5进行训练,train的时候没有问题,训练完一个epoch之后,进行验证的时候会报错误:RuntimeError: expected scalar type Half but found Float,请问是哪里出的问题?使用的v100显卡

nms

请问,为啥我每轮的 nms 需要花费五六分钟,然后程序跑一轮就停止了?

KeyError: 'ema'

Traceback (most recent call last):
File "detect.py", line 257, in
main(opt)
File "detect.py", line 252, in main
run(**vars(opt))
KeyError: 'ema'

about yolov7

thank you for your working, I have some question hope you can tell me:

change the --cfg to yolov7, by training, I get the weight best.pt
but when val, it cause a error
........torch.nn.modules.module.ModuleAttributeError: 'IDetect' object has no attribute 'end2end'.....

TypeError: 'NoneType' object is not iterable

运行val.py时报错:
Traceback (most recent call last):
File "D:\yoloair-main\val.py", line 399, in
main(opt)
File "D:\yoloair-main\val.py", line 372, in main
run(**vars(opt))
File "D:\Python\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "D:\yoloair-main\val.py", line 204, in run
loss += compute_loss([x.float() for x in train_out], targets)[1] # box, obj, cls
TypeError: 'NoneType' object is not iterable

能支持更高效的数据加载方式吗?

Search before asking

  • I have searched the YOLOAir issues and found no similar feature requests.

Description

我想使用coco数据重新训练一下,发现数据加载到训练的时间特别长,如果使用lmdb会高效一点吗

Use case

减少训练时间

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!

I used YOLOv7 to train my dataset, after dozens of epochs the mAP did not go up, it was always around 0.00005, I did not change the parameters, but I used the code on the YOLOv7 side, the mAP was able to go up normally, why is this?

I used YOLOv7 to train my dataset, after dozens of epochs the mAP did not go up, it was always around 0.00005, I did not change the parameters, but I used the code on the YOLOv7 side, the mAP was able to go up normally, why is this?
image
This is the result of running the code using yolov7's side

请问关于一些非yolo官方的模型权重参数如何获取

Search before asking

  • I have searched the YOLOAir issues and found no similar questions.

Question

例如飞桨的PicoDet可以在yoloair中复现成功,但是飞桨官方的权重文件是.pdparams格式,训练这类模型有办法可以使用到他们的官方权重参数吗。

Additional

No response

This happens when I train my dataset with yolox:ValueError: not enough values to unpack (expected 2, got 1)

 Epoch   gpu_mem       box       obj       cls    labels  img_size
  0/99     1.95G     4.366     8.054     1.459       149       640: 100%|██████████| 14/14 [01:18<00:00,  5.64s/it]                                                                
           Class     Images     Labels          P          R     [email protected] [email protected]:.95:   0%|          | 0/1 [00:02<?, ?it/s]                                                          

Traceback (most recent call last):
File "train.py", line 695, in
main(opt)
File "train.py", line 591, in main
train(opt.hyp, opt, device, callbacks)
File "train.py", line 416, in train
results, maps, _ = val.run(data_dict,
File "/root/miniconda3/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context
return func(*args, **kwargs)
File "/root/autodl-tmp/yoloair/val.py", line 196, in run
out, train_out = model(im) if training else model(im, augment=augment, val=True) # inference, loss outputs
ValueError: not enough values to unpack (expected 2, got 1)

CBH模块

大佬你好,你的CBH在yaml里面是不是配置错了啊

ModuleNotFoundError: No module named 'timm'

Following setup steps in README.md, when running training script (python train.py --data coco128.yaml --cfg configs/yolov5/yolov5s.yaml), met the following errors:

Downloading https://ultralytics.com/assets/Arial.ttf to /home/logan/.config/Ultralytics/Arial.ttf...
Traceback (most recent call last):
File "/home/logan/dev/pyfarm/pytorch/yoloair/train.py", line 41, in
import val # for end-of-epoch mAP
File "/home/logan/dev/pyfarm/pytorch/yoloair/val.py", line 38, in
from models.common import DetectMultiBackend
File "/home/logan/dev/pyfarm/pytorch/yoloair/models/common.py", line 35, in
from models.Models.muitlbackbone import conv_bn_hswish, MobileNetV3_InvertedResidual, DepthSepConv,
File "/home/logan/dev/pyfarm/pytorch/yoloair/models/Models/muitlbackbone.py", line 26, in
from models.Models.SwinTransformer import SwinTransformerLayer
File "/home/logan/dev/pyfarm/pytorch/yoloair/models/Models/SwinTransformer.py", line 9, in
from timm.models.layers import DropPath, to_2tuple, trunc_normal_
ModuleNotFoundError: No module named 'timm'

Any help?

P.S. My env: Ubuntu22.04.1, python 3.10.4

decoupled head

When I try to use the decoupled head ,I find the Gflops is too large, up to 56.4 GFLOPs,Is this normal?

代码训练问题!

Search before asking

  • I have searched the YOLOAir issues and found no similar questions.

Question

请问改这些模块,博主用数据集自己训练过吗?最好可以放上一些有说服力的图、表!!!

Additional

No response

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.