All Projects → Fireboltz → Psychic-CCTV

Fireboltz / Psychic-CCTV

Licence: other
A video analysis tool built completely in python.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Psychic-CCTV

MIRNet-Keras
Keras Implementation of MIRNet - SoTA in Image Denoising, Super Resolution and Image Enhancement - CVPR 2020
Stars: ✭ 21 (+0%)
Mutual labels:  resolution, super-resolution
Paddlegan
PaddlePaddle GAN library, including lots of interesting applications like First-Order motion transfer, wav2lip, picture repair, image editing, photo2cartoon, image style transfer, and so on.
Stars: ✭ 4,987 (+23647.62%)
Mutual labels:  resolution, super-resolution
libsrcnn
Super-Resolution imaging with Convolutional Neural Network library for G++, Non-OpenCV model.
Stars: ✭ 14 (-33.33%)
Mutual labels:  resolution, super-resolution
SR Framework
A generic framework which implements some famouts super-resolution models
Stars: ✭ 54 (+157.14%)
Mutual labels:  super-resolution
kapao
KAPAO is an efficient single-stage human pose estimation model that detects keypoints and poses as objects and fuses the detections to predict human poses.
Stars: ✭ 604 (+2776.19%)
Mutual labels:  yolo
ScaledYOLOv4
Scaled-YOLOv4: Scaling Cross Stage Partial Network
Stars: ✭ 1,944 (+9157.14%)
Mutual labels:  yolo
WebSight
Aiding the visually impaired through real time augmented reality, AI object detection, WebGL shaders effects such as edge detection, and colour adjustments.
Stars: ✭ 26 (+23.81%)
Mutual labels:  yolo
JARVIS
Jarvis is a simple Chatbot with a GUI capable of chatting and retrieving information and daily news from the internet for it's user using python.
Stars: ✭ 49 (+133.33%)
Mutual labels:  pysimplegui
etiketai
Etiketai is an online tool designed to label images, useful for training AI models
Stars: ✭ 63 (+200%)
Mutual labels:  yolo
PNG-Upscale
AI Super - Resolution
Stars: ✭ 116 (+452.38%)
Mutual labels:  super-resolution
SRGAN-PyTorch
An Unofficial PyTorch Implementation for Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network
Stars: ✭ 52 (+147.62%)
Mutual labels:  super-resolution
datumaro
Dataset Management Framework, a Python library and a CLI tool to build, analyze and manage Computer Vision datasets.
Stars: ✭ 274 (+1204.76%)
Mutual labels:  yolo
JSON2YOLO
Convert JSON annotations into YOLO format.
Stars: ✭ 222 (+957.14%)
Mutual labels:  yolo
yolo v1 pytorch
PyTorch implementation of YOLO-v1 including training
Stars: ✭ 89 (+323.81%)
Mutual labels:  yolo
vrpdr
Deep Learning Applied To Vehicle Registration Plate Detection and Recognition in PyTorch.
Stars: ✭ 36 (+71.43%)
Mutual labels:  yolo
resolutions-2019
A list of data mining and machine learning papers that I implemented in 2019.
Stars: ✭ 19 (-9.52%)
Mutual labels:  resolution
ESRGAN-tensorflow
Enhanced SRGAN. Champion PIRM Challenge on Perceptual Super-Resolution
Stars: ✭ 33 (+57.14%)
Mutual labels:  resolution
ImageDownloader
A program for downloading and filtering images based on their resolution.
Stars: ✭ 60 (+185.71%)
Mutual labels:  resolution
tf-bsrn-sr
Official implementation of block state-based recursive network (BSRN) for super-resolution in TensorFlow
Stars: ✭ 28 (+33.33%)
Mutual labels:  super-resolution
ECBSR
Edge-oriented Convolution Block for Real-time Super Resolution on Mobile Devices, ACM Multimedia 2021
Stars: ✭ 216 (+928.57%)
Mutual labels:  super-resolution

Psychic-CCTV

Our Motivation 😎

Recently, one of our team members, @abhijitramesh has his bicycle stolen 🛵. He had gone shopping, parked his bicycle outside the store, and by the time he returned his bicyle was missing 🚳. Gathering his wits, Abhijit looked around and saw a CCTV camera of the store which would have caught the footage of the theft. So he went in and requested the store owners to let him see the footage 📹. The footage was there, but it's resolution was not good enough for Abhijit to get any useful information.

So Abhijit returned home, walking 🚶, thinking 🤔 that CCTV feeds are basically not very useful. Being a computer science student working with image processing, computer vision and deep learning, an idea struck him 💡. He called two of his other friends and laid down his plan so that the CCTV feeds like those could actually serve some purpose.

And that idea, led to us building Psychic CCTY, a tool to make use of videos from CCTV feeds, as well as other kinds of videos, captured by people at a crime scene ℹ️.

Based on a true story

What does Psychic CCTV do?

Psychich CCTV will help you analyse a video using the following methods:

  • You have a video(even a low resolution one), and you're sure you might find some object of interest in the video, but you're too busy to sit and watch the entire video. Even if you sit and watch the video, you might skip something by mistake, becuase after all, you're human. So we have provided an option to perform object detection on the entire video, in real time which stores all frames with objects of interest.

  • Now, you did get an object of interest, but since you're not a computer, you still feel it could have a higher resolution. So used those saved frames and increase their resolution using our super-resolution technique. It works almost in real time, taking just 4-6 seconds to perform the operation on frame.

  • You already have a few images you want to analyse. Select them and run the super resolution on your own custom images 🖼️.

  • And finally, you might have a video recording with sound in it too. Now there's a lot of interference in the background, a lot of sound sources 🔉. So, select the video and Psychich CCTV will extract the audio and split in into sources so you can clearly hear the vocals 🗣️ and well as the background noise separately and gather useful information from it 📢.

How does Psychic CCTV work? 💭

Super Resolution

In order to enhance the quality of images, we are using super resolution. Super resolution has been implemented by us from scratch completely in PyTorch. After researching a bit, we found two methods:

  • Using SRResnet
  • Using SRGAN

So we decided to go ahead and implement both the methods. Once we had trained model for both, we ran them on a few photos and in the end, came the conclusion that SRGAN performs better than the SRResnet.

Well, so this is the code. Now let's see how our super resolution models actually perform.

Input Image SRGAN Output

Being Halo fans, we first tried it out on a Halo poster, and voila! The output given by SRGAN is visibly more clear than the original input image.

Next, we tried this on the legendary Insterstallar.

Input Image SRGAN Output

Here the results are clearly visible. The SRGAN output is far clearer than the input image.

By now it was clear that the mode does work, but we just decided to do try it out on a photo of Lena.

Input Image SRGAN Output

And here, again the model did the work well.

Next, we decided to try it out on a real CCTV feed. The next two exmaples are from a couple of CCTV photos that we found.

Input Image SRGAN Output
Input Image SRGAN Output

Again, the results are way clearer and provide more visiblity than the input images. Had Abhijit been able to access this tool earlier, he might have been able to find some useful information from the CCTV feed and would still have his bicycle.

Object Detection

Abhijit just needed the super resolution technique to have a fix to his problem, but since we started out with the project, we decided to expand the functionality a bit. We added an option to detect objects in video feeds as well. For this, we have used YOLO Object Detection, again implemented from scratch in PyTorch.

A few sample outputs that we ran on a video:

1 2 3
4 5 6

This feed detected monitors that weren't even turned on as were not in the focus on the camera. It detected a person as well whose back was turned. The method used will automatically detect objects in a video feed and save all frames in which a new object might be detected. This will make it easier for a person to go through objects of interest that might be present in a video feed without sitting and wathcing the entire feed themselves.

Separating Soundtracks

In videos that might be recorded at crime scenes such as accidents, hit and run cases, snatch thefts on roads, etc sound tracks play a very important role in addition to the video. Mostly when such a thing happens, someone or the other will end up recording a video on their phones. Now this video might be blurry, unstable, not of a high quality and all this is handled by our above mentioned steps, but at the same time the audio might also not be clear. If audio could be split into vocals and other categories, it would be much easier to understand what happened. The sound of the car going away in a hit and run case in which the car directly isn't very visible would help in determining the model and make of the car. On the spot, people might exclaim and say some important visual details regarding a crime, but without the authorities being present. More such things can be caught on video. In order to improve the process of analysing the audio, we extract the audio from a given video and split it into vocal and non-vocal using deep learning models.

How accessible is the tool? 🎢

Now all of this work has been done in python. But an officer who might be going through these videos might not be experinced enough in python to install alll the packages and libraries needed and then run the code.

So, we developed a desktop app while provides all the needed functionality in a GUI format. Our GUI is made using PySimpleGUIQt. This makes the application windows resize automatically, the appearence does not depend on the screen resolution.

In order to simplify the process even more, we can provide packages for every OS, Windows, Linux and MacOS by packaging the entire application using PyInstaller. That way an initial set up using a requirements.txt is also not required.

Screenshots of the application:

Screenshot_20200825_190901 Screenshot_20200825_190941
Object Detection Screen Dialog to allow user to choose the video to analyse
Screenshot_20200825_190958 Screenshot_20200825_191034
Sound Extraction Frames with objects of interest displayed along with the option to perform super resolution

Running the Project

To run the project, just execute the psychichCCTY.py script. Rest of the files were the ones used to do the intial groundwork of training models and getting them ready by testing them.

python psychichCCTV.py

Project Creators: 🎓

Vishwaak Chandaran

Abhijit Ramesh

Yash Khare

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].