Spaces:
Sleeping
Sleeping
Updated README and setup.py
Browse files- .gitignore +5 -0
- README.md +61 -0
- safetycam/sentiment.py +4 -0
- setup.py +11 -0
.gitignore
CHANGED
@@ -1,3 +1,8 @@
|
|
1 |
# files meant to exist locally only
|
2 |
env/
|
3 |
scratch/
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# files meant to exist locally only
|
2 |
env/
|
3 |
scratch/
|
4 |
+
*.egg-info/*
|
5 |
+
|
6 |
+
# python related files
|
7 |
+
*.pyc
|
8 |
+
**/__pycache__/
|
README.md
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Safety Cam
|
2 |
+
Safety Cam is a project developed by the Artificial Intelligence Club (AI Club) at Michigan State University (MSU). The goal of this project is to develop a camera capable of detecting dangers using camera visuals and sound detection.
|
3 |
+
|
4 |
+
## How it Works
|
5 |
+
The Safety Cam uses a combination of computer vision and sound detection algorithms to identify potentially dangerous situations.
|
6 |
+
The camera captures live footage and processes it in real-time using various computer vision techniques such as object detection and tracking.
|
7 |
+
At the same time, the camera also analyzes the sound in the environment and identifies sounds and speeches that potentially signify dangers.
|
8 |
+
If the camera detects a dangerous situation, it alerts the user through a mobile app and sends an emergency alert to predefined contacts.
|
9 |
+
|
10 |
+
## Getting Started
|
11 |
+
To get started with the Safety Cam, you will need the following:
|
12 |
+
- A computer with a camera and microphone
|
13 |
+
- Python 3.10 or later installed
|
14 |
+
- Git
|
15 |
+
|
16 |
+
To set up the Safety Cam, follow the steps below:
|
17 |
+
1. Clone the Safety Cam repository to your computer using the following command:
|
18 |
+
```
|
19 |
+
git clone https://github.com/MSU-AI/safety-camera.git
|
20 |
+
```
|
21 |
+
2. Install the required dependencies by running the following command in the Safety Cam directory:
|
22 |
+
```
|
23 |
+
pip install -r requirements.txt
|
24 |
+
```
|
25 |
+
3. Start the Safety Cam by running:
|
26 |
+
```
|
27 |
+
cd app/
|
28 |
+
streamlit run main.py
|
29 |
+
```
|
30 |
+
4. The Safety Cam web app will open in your default web browser.
|
31 |
+
5. Click on the "Start" button to start the camera stream.
|
32 |
+
6. The camera will start capturing footage and processing it in real-time.
|
33 |
+
7. If the Safety Cam detects a potentially dangerous situation, it will display an alert on the screen.
|
34 |
+
8. To stop the camera stream, click on the "Stop Stream" button.
|
35 |
+
|
36 |
+
## Contributing
|
37 |
+
We welcome contributions to the Safety Cam project. If you would like to contribute, please follow the steps below:
|
38 |
+
1. Set up a virtual environment named `env`:
|
39 |
+
```
|
40 |
+
python -m venv env
|
41 |
+
```
|
42 |
+
2. Activate the virtual environment. On Windows, run:
|
43 |
+
```
|
44 |
+
env\Scripts\activate
|
45 |
+
```
|
46 |
+
On Linux or macOS, run:
|
47 |
+
```
|
48 |
+
source env/bin/activate
|
49 |
+
```
|
50 |
+
3. Install the required dependencies by running the following command in the Safety Cam directory:
|
51 |
+
```
|
52 |
+
pip install -r requirements.txt
|
53 |
+
```
|
54 |
+
4. Install `safetycam` as a local editable package:
|
55 |
+
```
|
56 |
+
pip install -e .
|
57 |
+
```
|
58 |
+
|
59 |
+
## License
|
60 |
+
The Safety Cam project is licensed under the MIT License.
|
61 |
+
See the [LICENSE](LICENSE) file for more information.
|
safetycam/sentiment.py
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python
|
2 |
+
|
3 |
+
def dummy(msg):
|
4 |
+
return msg.upper()
|
setup.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python
|
2 |
+
from distutils.core import setup
|
3 |
+
|
4 |
+
setup(
|
5 |
+
name='Safety Cam',
|
6 |
+
version='0.1',
|
7 |
+
author='MSU AI Club (Spring 2023)',
|
8 |
+
packages=[
|
9 |
+
'safetycam',
|
10 |
+
]
|
11 |
+
)
|