I have always wondered what would happen if the students in our school consume food that they are severely allergic to? What if they were not aware that the food contains those harmful ingredients? These thoughts came across to me when I faced up a disappointing news article talking about a student passing out from allergens. This is when I decided to take action about the circumstance and create a system that would prevent these incidents from happening.
-
Install required python library modules
a) open cv (pip install opencv-python)
b) numpy (pip install numpy)
c) pillow (pip install pillow)
d) requests (pip install requests)
e) tkinter (pip install tk)
-
Download four python files on the file list
-
Create a folder and name it as you want
-
In that folder, add all the files that you have downloaded
-
Create an empty folder called "dataset" and "trainer"
Open a terminal, change the working directory to the folder and run the following command:
'file name / folder name' | pbcopy
This line of code allow you to copy the path of certain file or folder (useful when you use terminal as output)
-
Edit the first "face initialisation" file by copying the path of algorithm file and pasting it on line 4
-
Change line 33 to the path of your dataset folder
-
Move on to the second file and change line 6 to path of dataset folder
-
Change line 9 to algorithm file path and line 38 to path of trainer and add /trainer.yml at the end
-
Carry on to the third file and edit line 10 and 13 to "trainer.yml" path and algorithm file respectively
-
Change the host as your current IP address ($ipconfig getifaddr en0 for mac), same for the next file
-
and.. you are ready!