---
# System prepended metadata

title: Electric usha

---

# Electric usha

## Objective:
The aim is to create an application which can detect a person in real-time using CCTV cameras in a hallway and switch the lights ON/OFF accordingly using a Rasberry Pi and a Deep Learning model deployed on the cloud.

## ML Model Used:
This is an application of Person detection using Histogram of Oriented Gradients (HOG) as features and Support Vector Machines (SVM) as the classifier.

This process is implemented in python, the following libraries are required:

- Scikit-learn (For implementing SVM)
- Scikit-image (For HOG feature extraction)
- OpenCV (for testing)
- PIL (Image processing library)
- Numpy (matrix multiplication)
- Imutils for Non-maximum suppression

### How to Run the ML Module : 
- Run the cmd : python app_test.py
- With localhost URL, Enter the following to test script : 

```
http://127.0.0.1:5000/abc12/test/vid1.mp4

```
- NOTE : 
    - where -> http://127.0.0.1:5000 is local host generated
    - abc12 -> Random User ID String -> Pass anything
    - test/vid1.mp4 -> Pass the path of video file stored

- For ```RTSP``` Link : 

```
http://127.0.0.1:5000/abc12/rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4

where -> rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 is DEMO RTSP Link
```





