/Eyes-Protector

help the computer users protect their eyes from eyestrain, dry eyes, and myopia.

Primary LanguagePythonApache License 2.0Apache-2.0

Eye-Protectors (Homepage)

Feature

⇾ ⇾ 完整中文介紹請點這邊 ⇽ ⇽

How to install

Windows : download the Eye protector.exe file here and execute it.

  1. Since the program is built by Pyinstaller and does not certificate by an official organization, the windows defender will be alert about it. Just click "trust the program" and give permission to it! Reference
  2. If you install the program under C:\Program Files, please right click the eye.exe file and run as administrator.

MacOS : download the Eye protector.exe file here and execute it.

  1. Type "sudo spctl –master-disable" in the terminal and choose "allow apps downloaded from anywhere" in the Security & Privacy panel. tutorial
  2. Make the file executable by typing chmod 755 "path to the file" in the terminal. EX: chmod 755 /Users/alwaysmle/Downloads/eye.
  3. Simply execute the program after changing the type of program.

Run Python File Directly

  1. pip install -r requirements.txt
  2. python eye.py

How to use?

Main program

  1. Add user: type your name (do not use numbers or symbols). The program will save the name, threshold, and daily usage of eyes in the database of this user. This step can be ignored if you had added the user previously. The default user is "None" if one does not want to add any user.
  2. Choose user: choose the user you want to save the data to.
  3. Confirm: the program will read the threshold and line token(if one had saved preciously) from the database
  4. Use Line(Optional) : check the box if you want the program to send the notification to Line as a message. Line token for individual users is needed (Line token 申請教學 ,Line notification api)
  5. Initialize: the program detects the eye aspect ratio, relative distance, and relative brightness of the environment. As a result, one should set the standard distance, brightness, and eye aspect ratio so that the program can find a reasonable threshold for each user.
  6. Modify the threshold: the user can still modify the threshold to an appropriate value after initialization.
  7. Set the working time and resting time.
  8. Exercise: Select the exercise you want to do during the resting time.
  9. Start: The program will start to count down the working time.

Analysis

  1. Choose the user
  2. Choose the date
  3. The user's state, environmental brightness, blink frequency, and eye distance will be shown in the right channel. In the line chart of the user's state, 2 stands for working time, 1 stands for "not detect people", and 0 stands for resting time.

Demo (click the image and transfer to youbute)

IMAGE ALT TEXT

Donation

It has taken me a long time to develop this program. Your kind donation of a cup of coffee will go a long way in helping me improve the program. Donation Link is here, thanks!