Git Product home page Git Product logo

smart-cams's Introduction

Automated CCTV surveillance with Machine Learning

๐Ÿค” Problem

Cameras are everywhere but most of them are dumb devices that simply record the videos. But we can make them smart with computer vision. With CV, cameras can detect people based on their faces, recognize body posture to identify the activities and send alerts for malicious behaviours.

โœจ Features

  • Web/Mobile Dashboard to display all the collected data from different devices.
  • Django application for data collection from public CCTV cameras
  • Alerts when blacklisted/unknown people are detected
  • Tech Stack : React, maybe Flutter/Kotlin, Django and lots of ML stuff

Maintainers


smart-cams's People

Contributors

kshivendu avatar sky-2002 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

smart-cams's Issues

Properly use DRF to create/update/stop stream recording workers/threads

We need to be able to control the stream using the REST APIs.
These APIs are already functional and can be found in StreamAPI

Your task is to refactor the code.

At the end we should have API endpoints like this:

  • GET /stream/ : Responds with a list(array) of all the active streams
  • POST /stream/ : Starts a new recording
  • GET /stream/<id> : Responds with all the details of the stream with id=<id>
  • UPDATE /stream/<id> : Allows users to play/pause the recorder for the stream with id=<id>
  • DELETE /stream/<id> : Allows users to remove the stream with id=<id>

We should have a proper DRF(Django rest framework) style response in the browser.

For reference, you may look at the code of OpenLake/Leaderboard-Pro/views.py

Explore similar projects for inspiration

We need to discover similar projects and look at their design as well as features. So start searching the internet for similar projects and mention their URL and design, unique features, architecture, and limitations in the comments below:

Remember to describe only one project in one comment. If you've found more than one, make sure you put them in different comments.

Write a python script to record video stream from mobile camera

Since we're going to record CCTV footages, we want to have a data source. There are many public CCTV cameras online but for ease of testing and control we can start with our mobile phones. For this you need to find a way to record data directly from your mobile camera (maybe using the local network)

So write a python script that can take data from your mobile camera and store it in files.

Script to detect faces from a video using pre-trained models

We want to detect faces(and other features) from the video stream that is being recorded.
But doing it near-real-time will be difficult and that's why we want to gradually move towards that.

Your task is to write a python script that uses pre-trained Facenet(or its variants) to detect faces in a given video file.

Improving the Implementation of the stop_key of Video_Recorder

Currently there are two issues with the stop_key:
1.) When stop_key corresponding to a stream is pressed it stops the recording but it does not change the enabled property of that stream to False in the database.
2.)The stop_key is assigned by converting the id of the stream to which it corresponds, into a string. Now this stop_key is compared with cv2.waitKey(1) to check if user has pressed the key to stop that stream. The problem occurs when the id becomes 2-digit. Now the mentioned comparison is between a string of length two and a character which causes an error.

Steps to reproduce 1:
1.)Create a stream/Enable an existing stream. The recording will start and a window showing the stream will appear
2.)Now stop the stream by pressing the corresponding stop_key(For eg: if stream_id=1 then press the numeric key 1 on keyboard).
The stream stops but in the database the enabled property of that stream is still True.

Steps to reproduce 2:
Create new streams till the stream_id becomes a 2-digit number. As soon as this happens error will occur at the comparison mentioned above.

Possible Fixes for 1:
When the stop_key is pressed a put request can be made to update the enabled property of the stream that is being stopped or if stream instance is passes to the Video_Recorder then the property can be updated directly from there.

Possible Fixes for 2:
Implement a feature where user can enter the id of the stream and press enter to close it or even can use the mouse to close the window.

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.