Giter Club home page Giter Club logo

opencv-flask's Introduction

Flask OpenCV and Object Detection

将OpenCV视频传输到网页浏览器并进行目标检测

Xu Jing

1. 功能实现

  • 基于Flask搭建一个Web服务;
  • 将openCV视频流同步传输到Web网页;
  • 对视频流中的帧进行目标检测(YOLO-lite)并基于pyecharts进行实时可视化;

2. 项目目录

点我查看

│  app.py  # Flask app
│  config.ini  # 配置文件
│  pthreadGC2.dll   #yolo-lite darknet动态链接库
│  pthreadVC2.dll   #yolo-lite darknet动态链接库
│  README.md  
│  requirement.txt   # 环境需要的package
│  run_app.bat       # 批处理文件
│  yolo_cpp_dll.dll  #yolo-lite darknet动态链接库 GPU
│  yolo_cpp_dll_no_gpu.dll #yolo-lite darknet动态链接库 CPU
│
├─model  # 模型及配置文件
│      tiny-yolov2-trial13-noBatch.cfg
│      tiny-yolov2-trial13_noBatch.weights
│      voc.data
│      voc.names
│
├─static  # 静态资源文件
│  ├─css
│  │      bootstrap.css
│  │      font-awesome.min.css
│  │      style.css
│  │
│  ├─fonts
│  │      fontawesome-webfont.eot
│  │      fontawesome-webfont.svg
│  │      fontawesome-webfont.ttf
│  │      fontawesome-webfont.woff
│  │      fontawesome-webfont.woff2
│  │      FontAwesome.otf
│  │      Microsoft-Yahei-UI-Light.ttc
│  │
│  ├─images
│  │      1.jpg
│  │
│  └─js
│          echarts.min.js
│          jquery-3.4.1.min.js
│
└─templates  # 模板文件
        index.html

运行项目需要环境:

  • python 3.6 或 python 3.7
  • pip install -r requirement.txt

运行程序:

python app.py --ip 0.0.0.0 --port 8080

run_app.bat

3.演示

demo

url: https://v.qq.com/txp/iframe/player.html?vid=r3024vzzzsp

4.TODO

  1. 训练更复杂的目标检测模型: SSD,RetinaNet,YOLOV3, or Anchor Free...;
  2. Nigix部署该Web服务;

opencv-flask's People

Contributors

dataxujing 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

Watchers

 avatar

opencv-flask's Issues

error: no libdarknet.so

when i run the app , it gives me a error info lack of the libdarknet.so

then i try to compile a libdarnet.so from the official website example instuctions with gpu enable.

it gives me a error : ./libdarknet.so: undefined symbol: copy_image_from_bytes

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.