实战小项目之基于深度学习的在线目标检测系统

  将之前的的两个小功能做了一次封装,并完善视频推流的功能,实现从摄像头/文件/网络流获取视频流,解码显示,编码之后推流或者保存成文件。具体如readme

                    Online Object Detection System Based On Deep Learning
    This project is a system for objects detection based on deep learning(darknet --yolo),and include some parts as list:
    1.video stream detect
    using ffmpeg,finished functions that:
     1) get video stream from camera/file/net video stream
     2) decode and display with opencv
     3) encode video with h264 in flv format
     4) push video through rtmp protocol to nginx stream media server or save as file

    the main work of ./client/ObjectDetector:
    pusher:
        get video from camera-->decode and display with opencv -->encode in h264as flv --> push stream to nginx server
    puller:
        get video from nginx server-->decode and display with opencv -->encode in h264as flv --> save as file

    the main work of ./server/video
    get video from nginx server--> decode and dislay with opencv --> detect whih yolo -->display detect results --> encode in h264 as flv --> push stream to nginx server(another channel)

    2.image detect
    tranport image or json with http,using libevent to listen http in server,using libcurl as client

    the main work of ./client/imagedemo/curlclient
    read a image file --> transport in http with libcurl ----waiting for reback-- get json stream -->decode json

    the main work of ./server/image
    libevent as http server in child process--- wait for client --- get a request --> write image stream as file --> signal to main process and yolo read file and detect -->write detect results in a json file --> fifo to wake up child process --> read json file and sent to client with http


CAUSTION:
    when use code in server folder,you must configure darknet already,then you can put these files in src,and replace default Makefile with my Makefile.Also, you have to configure libs I have used.

 

图片检测

 

视频检测

  与之前相比,新增检测之后的视频流回推,就是再推流,然后去接收

 

code

posted @ 2017-06-20 19:16  tla001  阅读(4492)  评论(12编辑  收藏  举报
个人网站 www.tla001.cn