Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/midusi/cctv_analysis
https://github.com/midusi/cctv_analysis
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/midusi/cctv_analysis
- Owner: midusi
- Created: 2020-08-28T19:09:39.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-15T00:13:16.000Z (over 3 years ago)
- Last Synced: 2024-10-13T12:00:00.244Z (3 months ago)
- Language: Python
- Size: 6.61 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CCTV analysis.
A cctv analysis server to asynchronously analyse videos for objects such as persons or cars in cctv camera feeds.
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](LICENSE)## Introduction.
Ready to run flask cctv_analysis server .
The server uses KERAS model implementation of YOLOv3 (Tensorflow backend) inspired by [allanzelener/YAD2K](https://github.com/allanzelener/YAD2K) and openCV model (dnn module) implementation of YOLOv3---
## Requirements.
-Python3
-Pip3## Initial setup for model.
1. Install the PyPi cctv_analysis library:
$ pip3 install cctv_analysis
2. Run the server module localy:
$ python3 -m cctv_analysis.run_server
3. Server runs at http://127.0.0.1:5000/ localy, there are 2 options for excuting the models. Synchronous through the browser or asynchronous through an endpoint.3.1 Synchronous: Go to http://127.0.0.1:5000/ in the browser, then use the "seleccionar archivo" button, select the video, once the video is selected click at the "enviar" button, after procesing the video you will be redirected and the output will be shown.
3.2 asynchronous: To use the resource in a asynchronous way you have to send your post request to de endpoint "/model_request" and you must set up a endpoint in the client server so the data can be sended once is procesed. When you make the request to de server you must send the file and the url+endpoint in the post request with this format.
e.g:datas = {'urlCliente' : 'http://127.0.0.1:5001/client_response'} #1
files = [
('file', ('../people3.mp4', open('../people3.mp4', 'rb'), 'application/octet')), #2
('datas', ('datas', json.dumps(datas), 'application/json')),
]
url = 'http://127.0.0.1:5000/model_request' #local url + endpoint
r = requests.post(url, files=files)#1 you have to update the 'urlCLiente' value in datas with your url+endpoint
#2 you have to update '../people3.mp4' with the path of your video