Yolo-fastest+dnn+flask实现移动端推流&拉流并在web显示
转载请注明出处!转载请注明出处!转载请注明出处!已经两三点了,太困了,直接github上的readme复制过来,周末有点无聊,做了一个推拉流的demo,共四个功能:①图片推理②视频推理和保存③摄像头本地推理(不加保存了,有点费内存)④移动端(树莓派,或其他开发板)调用摄像头并对流帧进行推理,通过flask推流到局域网,局域网下的其他设备拉流并显示在web页面上代码基本不用改,down下来即可运行,
转载请注明出处!
转载请注明出处!
转载请注明出处!
项目代码链接:https://github.com/pengtougu/Push-Streaming.git
已经两三点了,太困了,直接github上的readme复制过来,周末有点无聊,做了一个推拉流的demo,共四个功能:
①图片推理
②视频推理和保存
③摄像头本地推理(不加保存了,有点费内存)
④移动端(树莓派,或其他开发板)调用摄像头并对流帧进行推理,通过flask推流到局域网,局域网下的其他设备拉流并显示在web页面上
代码基本不用改,down下来即可运行,已在window&mac&linux三种平台上测试过,代码通用。推拉流那个,请保证在同个局域网下!!!
目前只做了yolo-fastest的demo,对nanodet感兴趣,后续会持续更新!
项目代码链接:https://github.com/pengtougu/Push-Streaming.git
Push-Streaming
Hi, this repository documents the process of pushing streams on some ultra-lightweight nets. The general steps are that opencv calls the board(like Raspberry Pi)'s camera, transmits the detected live video to an ultra-lightweight network like yolo-fastest, nanodet, ghostnet, and then talks about pushing the processed video frames to the web using the flask lightweight framework, which basically guarantees real-time performance.
Requirements
Please install the following packages first
- Linux & MacOS & window
- python>= 3.6.0
- opencv-python>= 4.2.X
- flask>= 1.0.0
inference
- Yolo-Fastest: https://github.com/dog-qiuqiu/Yolo-Fastest
Models:Yolo-Fastest-1.1-xl
Equipment | Computing backend | System | Framework | Run time |
---|---|---|---|---|
Raspberrypi 3B | 4xCortex-A53 | Linux(arm64) | dnn | 89ms |
Intel | Core i5-4210 | window10(x64) | dnn | 67ms |
-
Nanodet: https://github.com/RangiLyu/nanodet
updating. . .
Demo
First of all, I have tested this demo in window, mac and linux environments and it works in all of them.
拉下来的同学先看下文件全不全:
- Inference images
python yolov3_fastest.py --image dog.jpg
- Inference video
python yolov3_fastest.py --video test.mp4
- Inference webcam
python yolov3_fastest.py --fourcc 0
- Push-Streaming
python app.py
(请确保你的树莓派已经安装好摄像头的驱动了,并且板子和本地机连的是同个WiFi)
(请确保你的树莓派已经安装好摄像头的驱动了,并且板子和本地机连的是同个WiFi)
(请确保你的树莓派已经安装好摄像头的驱动了,并且板子和本地机连的是同个WiFi)
⚡ Please note! Be sure to be on the same LAN!
Demo Effects
-
Demo images
-
Demo video
-
Demo camera
-
Demo Push-Streaming
项目代码链接:https://github.com/pengtougu/Push-Streaming.git
Thanks
- https://github.com/dog-qiuqiu/Yolo-Fastest
- https://github.com/hpc203/Yolo-Fastest-opencv-dnn
- https://github.com/miguelgrinberg/flask-video-streaming
- 感谢这个博客的大佬提供思路:https://blog.csdn.net/nihate/article/details/108670542
备注
一年没写博客了,这一年真的遇到了超级多大佬,还是感叹要学的东西实在是太多了
更多推荐
所有评论(0)