- Introduction
- Repository contents
- Flow Diagram
- What goes in?
- What comes out?
- Dependencies
- For Embedded Linux platforms
- Docker Image
-
This repository contains a fun application made on python3 intended to dispense sweets to individuals based on their choice.
-
Before running the codes, we need to install all the prerequisites.
-
Have made a requirements.txt for the same.
-
Use
pip3 install -r requirements.txt
to install prerequisites. -
Can be executed on x86 and ARM architecture systems.
-
Have also created a Dockerfile and docker image for the application.
-
requirements.txt - contains all the prerequisites required for the functioning of the application.
-
models - conatins trained models required for face inference.
Note: The voice model has been pre-trained using several voice samples.
-
utils - contains the all dependencies that the main codes require.
-
words - contains the voice input given by user which will be used to get the label.
-
scripts - contains script files to perform various actions using Arduino GPIO pins.
-
arduino-codes - codes for some action to be performed.
-
Dockerfile - dockerfile for the application
***
- Run
python3 input.py
for face input and then voice input for choice of sweet (laddu/modak/pedha). - LEDs can be used to display the status to a user. (see ./Scripts)
- The faces in the frame are first detect, aligned and croppped.
- Then the features of the face are extracted and converted to 128D embeddings.
- The user says the speech of their choice, which is saved to a
.wav
format and given to the speech model. - The label from the audio file is saved along with the embeddings of the person in the database.
- Run
python3 recognition.py
- When a face is detected, the features of the face are extracted.
- The system verifies if the person exists in the database.
- On recognition, the corresponding label is displayed (person name/unknown)
- Dispenses the sweet as per the registered person's choice.
- Both the codes (input.py and recognition.py) can be executed simultaneously.
All the required dependencies can be install by running the command pip install -r requirements.txt
- Connect 2 USB/CSI cameras (as per availability) and a mic for voice input
- Install drivers if required using
insmod [driver location]
- Check the device IDs for the connected peripherals in
/proc/asound/
- Make changes in .asoundrc accordingly.
-
Install docker using
sudo apt-get install docker.io
and assign sudo permission to it. -
You can find the readymade image that I've already built using
docker pull darpanjain/ai-input
-
Visit My DockerHub Profile
-
Run the image using
docker run -it --rm ai-input
-
You can use the provided Dockerfile to build your own image.
- Clone the repo to your system
- Build your image using
sudo docker build -t application:v1 .