Skip to content

sak007/Door-Status-Detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: MIT version DOI GitHub issues GitHub closed issues Github pull requests Github closed pull requests

Content

S.No Title Hyperlink
1. Background click here
2. Setup Instructions click here

Background

Machine Learning Code

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

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.

Raspberry Pi in the door

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).

Monitor

This device receives information from the classifier and displays the state of the door in the terminal.

Setup Instructions

Classifier

  • run pip3 install -r requirements.txt from the project root directory.
  • Update appId, key and token in application.yaml inside code/classifier directory.
  • run python3 subscriber.py from code/classifier directory to start the model.

Raspberry Pi in the door

  • 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.txt from the project root directory.
  • Update orgId, typeId, deviceId and token in device.yaml inside code/door directory.
  • run python doorEventDetect.py from code/door directory.

Monitor

  • update device info in properties.json
  • run pip3 install -r requirements.txt from the project root directory.
  • Update orgId, typeId, deviceId and token in device.yaml inside code/monitor directory.
  • run python3 wiotpClient.py from code/monitor for displaying the door status in the terminal.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors