GithubHelp home page GithubHelp logo

hpc203 / yolox-opencv-dnn Goto Github PK

View Code? Open in Web Editor NEW
153.0 4.0 50.0 910 KB

使用OpenCV部署YOLOX,支持YOLOX-S、YOLOX-M、YOLOX-L、YOLOX-X、YOLOX-Darknet53五种结构,包含C++和Python两种版本的程序

C++ 51.26% Python 48.74%
yolox opencv cpp python object-detection anchor-free opencv-dnn

yolox-opencv-dnn's Introduction

yolox-opencv-dnn

使用OpenCV部署YOLOX,支持YOLOX-S、YOLOX-M、YOLOX-L、YOLOX-X、YOLOX-Darknet53五种结构,包含C++和Python两种版本的程序

onnx文件在百度云盘,下载链接:https://pan.baidu.com/s/11UAVSPWbDKY_LmmoHlUQXw 提取码:147w

下载完成后,把文件放在代码文件所在目录里,就可以运行程序了。如果出现读取onnx文件失败, 那很有可能是你的opencv版本低了,需要升级到4.5以上的

在10月20日,我看了一下官方代码https://github.com/Megvii-BaseDetection/YOLOX 新版的在做推理时,预处理没有做BGR2RGB,除以255.0, 减均值除以方差这几步的。 因此如果用最新代码训练后生成onnx文件,然后用本仓库里的程序做推理时,需要注释掉“BGR2RGB, 除以255.0, 减均值除以方差这几步”

yolox-opencv-dnn's People

Contributors

hpc203 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

yolox-opencv-dnn's Issues

读取onnx模型失败

你好,请问我用你提供的onnx模型可以读取并得出结果,用官方代码训练的自己的数据集并转成onnx,却读取不了是为什么呢?

您好,我跑通了opencv dnn推理yolox-tiny

我如你所说注释掉了均值那些(void yolox::normalize(Mat& img))
然后就跑通了,但是我感觉AP好像没有ncnn高(threshold阈值都是0.25),当然速度确实比ncnn快了一倍(i3-8100 cpu)。
请问是不是要改如下几处? 也就是说yolox-tiny不能沿用你在cpp里预设好的值?

const int stride[3] = { 8, 16, 32 };
const float mean[3] = { 0.485, 0.456, 0.406 };
const float std[3] = { 0.229, 0.224, 0.225 };

你好除了YOLOX-S 其他模型都报错,这是什么原因?谢谢

Traceback (most recent call last):
File "main.py", line 153, in
net = yolox(args.model, p6=args.with_p6, confThreshold=args.score_thr)
File "main.py", line 9, in init
self.net = cv2.dnn.readNet(model)
cv2.error: OpenCV(4.5.3) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-q3d_8t8e\opencv\modules\dnn\src\onnx\onnx_importer.cpp:78: error: (-5:Bad argument) Can't read ONNX file: yolox_m.onnx in function 'cv::dnn::dnn4_v20210608::ONNXImporter::ONNXImporter'

关于opencv dnn实现神经网络的问题

关注了你在CSDN的博客,工作很棒,请继续加油!
另外我有个不情之请,能不能写一篇关于opencv dnn实现神经网络的文章呢?
比如,有些网络结构中的某些层,在opencv自己的定义中没有,需要自行改动layer的定义,能否结合一个实例,给介绍一下如何实现?需要注意的问题有哪些?
不情之请,还望百忙之中抽时间给与支持!

再谢再盼!

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.