| S.No | Title | Hyperlink |
|---|---|---|
| 1. | Background | click here |
| 2. | Setup Instructions | click here |
Found in code/ML
Data2.ipynb - Python notebook for processing the training data for the machine learning model
Model2.ipynb - Python notebook for creating the machine learning model, after training is complete, a folder called models is created, containing the checkpoint model for each epoch, the best epoch is selected and copy and pasted to code/ML/myModel, renaming the checkpoint folder name to myModel, additionally, it is to be copied to /code/classifier/myModel
myModel directory - the saved machine learning model
predict.py - python script to load the machine learning model and make predictions on data
pretty.py - used to generate confusion matrix for model training
Classifier should be executed in a server so that it can receive the data from the Raspberry Pi attached in the door and run the classification algorithm. The result from the classifier is then sent to the monitor device.
The role of the Raspberry Pi attanched in the door is to send the data stream to the classifier whenever an even occurs (whenever a movement is detected).
This device receives information from the classifier and displays the state of the door in the terminal.
- run
pip3 install -r requirements.txtfrom the project root directory. - Update appId, key and token in
application.yamlinside code/classifier directory. - run
python3 subscriber.pyfrom code/classifier directory to start the model.
- Enable I2C in the RaspberryPi.
- Set I2C speed to 400KHz (Click here for instructions)
- update device info in
properties.json - run
pip3 install -r requirements.txtfrom the project root directory. - Update orgId, typeId, deviceId and token in
device.yamlinside code/door directory. - run
python doorEventDetect.pyfrom code/door directory.
- update device info in
properties.json - run
pip3 install -r requirements.txtfrom the project root directory. - Update orgId, typeId, deviceId and token in
device.yamlinside code/monitor directory. - run
python3 wiotpClient.pyfrom code/monitor for displaying the door status in the terminal.