This is a collection of tools that integrate the RaspberryPi computer, the Open-CV library, Apple Shortcuts, and either Apache web server or GitHub pages (depending on your preference) to take a picture of you, analyze three points on your shirt for color, and make that color avaialble to the Apple Shortcut to read and change your watch face to match.
The setup can be as efficient as standing in front of the camera and saying Hey Siri, change your face to have your watch face match your outfit every day
- Raspberry Pi (Any model should do)
- USB Camera
This version hosts a local web server that executes the camera, analysis, and results all locally. This is the most efficient version which uses an Apple Watch shortcut to initialize the camera, take a photo, analyze, retrieve the results, and change the watch face in one efficient shortcut.
- Run
git clone https://github.com/organic-penguin/AppleWatchFaceAIColorPicker.git
from your RaspberryPi - Change directories into the newly created folder -
cd AppleWatchFaceAIColorPicker
- Run the make file configuration for the local web server installation -
make local_web
- Download the 'Change Your Face WEB' shortcut to your iPhone using this QR:
This version uses a physical button to execute the camera, analysis, and push the results to a GitHub repo page. The Apple Watch shortcut will then have to be executed to retrieve the results from the GitHub page and change your watch face.
- From your internet browser, log into GitHub
- Navigate to 'Your repositories'
- Click 'New'
- Enter a repository name
- Click 'Create Repository'
- Copy your new repositories .git url
- Move on to the next section
- Run
git clone https://github.com/organic-penguin/AppleWatchFaceAIColorPicker.git
from your RaspberryPi - Change directories into the newly created folder -
cd AppleWatchFaceAIColorPicker
- Edit the makefile to include your new github repo url in line 13 under 'add-to-repo:'
- Save and close the makefile
- Config your git global variables with your information
$ git config --global user.name "John Doe" $ git config --global user.email [email protected]
- Run the make file configuration for the GitHub installation -
make git
- Push a commit -
git push origin
- Enter your username and password (This will be saved locally so that the script can continually push to your repo)
This step will setup your GitHub page so that the results pushed to your repo will be displayed as a webpage
- Return to your repo's settings tab
- Scroll down to 'GitHub Pages'
- Set the Source to your main branch
- Click 'Save'
Use your favorite starting framework to run the initializeButton.py
on boot. The button is defaulted to pin GPIO pin 21
EX: rc.local
- Edit rc.local -
sudo nano /etc/rc.local
- Add
sudo python <path to initializeButton.py
to the second to last line beforeexit 0
- Reboot to test button function
This shortcut will reachout to your GitHub page and analyze the results generated by the camera's execution button. Based upon the results it will set your watch to the appropriate face
- Download the 'Change Your Face GIT' shortcut to your iPhone using this QR:
- Color identification isn't 100% accurate in differentiating between similar colors
- Color identification is very dependent upon the quality of camera and lighting. If the image the camera captures shows a dark color, it may be interpreted as black (e.g. a blue shirt in dim lighting looks black in the captured image, but blue when in good light)
The OpenCV development community Murtaza Hassan's introductory courses