Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bmalbusca/facialrecognition_rmsf
Python + OpenCV + Flutter project: Smart Door Lock with Facial Recognition, Event Detection and Remote Control over mobile App (Flutter)
https://github.com/bmalbusca/facialrecognition_rmsf
facial-recognition flask flutter opencv opencv-python raspberry-pi-3 raspberry-pi-camera rest-api smart-door
Last synced: 3 months ago
JSON representation
Python + OpenCV + Flutter project: Smart Door Lock with Facial Recognition, Event Detection and Remote Control over mobile App (Flutter)
- Host: GitHub
- URL: https://github.com/bmalbusca/facialrecognition_rmsf
- Owner: bmalbusca
- Created: 2020-03-05T23:46:49.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-06T21:05:49.000Z (9 months ago)
- Last Synced: 2024-10-11T16:41:55.647Z (3 months ago)
- Topics: facial-recognition, flask, flutter, opencv, opencv-python, raspberry-pi-3, raspberry-pi-camera, rest-api, smart-door
- Language: Python
- Homepage:
- Size: 18.3 MB
- Stars: 18
- Watchers: 4
- Forks: 6
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Smart Door Lock
## Architecture
- Micro-service (Flask): REST End-points; Handles the interaction between the User and the Smart Door; Also, Verifies and validates the service registration
- SmartLock (Raspberry Pi 3, PiCam, OpenCV): API Requests to send (status and camera's images data) and receive (remote operations) ; Facial Recognition with OpenCV; Circuit Lock control
- User Client App (Flutter): Remote control; Streaming viewer service; Event notification
```bash
.
├── App
│ ├── README.md
│ ├── android
│ │ ├── app
├── PyOpenCV
│ ├── FacialRecognition
│ │ ├── camDetect.py
│ │ ├── dataset
│ │ ├── faceRecog.py
│ │ ├── haarcascade_frontalface_default.xml
│ │ └── trainer
│ │ └── trainer.yml
│ └── environment.yml
├── README.md
└── uservice
├── app.yaml
├── database.log
├── main.py
├── requirements.txt
└── templates
└── index.html```
## How to run this in your local machine?- Microservice (Local computer or cloud service):
1. install requirements (using `requirements.txt` and python) or just install manually the required packages
2. run the application: `python3 main.py`
- Facial Recogn App (Raspberry Pi 3 B+):
1. install requirements (`requirements.yml`)
2. run `python3 camDetect.py` to collect images (dataset). The default user is "Bruno".You can import the `Detection object` from `camDetect.py` and run it in your python console.
```
''' example '''
a=Detection()
a.parse_data() #if dataset folder exists will collect infoa.capture("Bruno",5, nclips=60) #name is "Bruno", ID=5 and number of captures is 60
```
3. run `python3 faceRecog.py` to train and for image classification
If you notice, the `faceRecog.py` is responsable to classify the capture, sending resquests to the microservice and opening the door. In this version, the door is simulated with a [LED circuit connected to GPIO 17](https://github.com/bmalbusca/FacialRecognition_RMSF/blob/5458f2e687a75e4a3331f75037c7bec8538f5523/PyOpenCV/FacialRecognition/faceRecog.py#L11) (Uncomment and try it). The service should the registered at the microservice,this means if the `service_id` does not exists in your microservice, the raspberry pi will not receive/send requests.