Mission Objective
The Goal: To create a custom Artificial Intelligence (AI) model that can instantly recognize specific types of hands (Fire, Earth, Air, Water) through a web browser camera.
Why We Are Doing This: Traditional palmistry relies on analyzing the shape of the palm relative to the length of the fingers. By teaching a computer to recognize these shapes, we can offer users an immediate, "magical" insight into their elemental nature without needing a human reader present 24/7.
The Tech Advantage: Most AI runs on powerful, expensive servers. We are building a "Tiny ML" model that is small enough to run inside the user's phone or laptop browser. This guarantees 100% Privacy (no photos are ever sent to us) and Zero Latency (it works instantly).
The Science of Hand Shapes
To train the model accurately, you need to know what you are looking for. We categorize hands into four elements:
Initialize Project
Go to the official Google tool. No login required, but saving to Drive is recommended so you don't lose progress.
- Navigate to teachablemachine.withgoogle.com.
- Click Get Started.
- Select Image Project box.
- Select Standard Image Model.
Define Your Classes
"Classes" are the categories the AI will learn. Rename the default "Class 1" boxes to the following:
**Crucial:** "No Hand" teaches the AI what it looks like when nobody is there, preventing false positives.
Record Samples
This is the teaching phase. For each class, click "Webcam" and hold the button to record images.
- Quantity: Aim for 100-200 images per class.
- Variety: Move your hand slightly. Rotate it. Move closer and further away. Change angles.
- "No Hand": Record the empty room background for 5-10 seconds.
- Pro Tip: Try to mimic the hand shapes described in the Objective section (e.g., extend fingers for Water/Air, curl slightly for Fire/Earth).
Train & Test
Once all classes have data:
- Click the big Train Model button.
- Wait (do not close the tab). It takes about 30-60 seconds.
- Test: Use the "Preview" panel on the right. Show your hand to the camera. Does the bar correctly jump to "Fire Hand" or "Water Hand"?
- If it's confused, add more sample images to the confusing classes and Train again.
Export & Deploy
Get the brain files for our website.
Click "Export Model"
Located above the preview window.
Select "TensorFlow.js"
Ensure this tab is selected.
Choose "Upload" (Easier)
Click "Upload my model". Google will host it for free. Copy the Sharable Link provided.
Final Step: Send to Dev Team
Send the link (or the downloaded ZIP files) to the technical lead. They
will plug it into the palmistry_portal.html code.
Further Study Resources
"The Laws of Scientific Hand Reading"
Free eBook by William G. Benham. This is the definitive "textbook" on analyzing hand shapes and mounts accurately.
Visual Quick-Ref (WikiHow)
Surprisingly good for clear, simple diagrams of lines and shapes to help you label your training data.
Your Palmistry Deck
Use your physical cards! Draw a card, look at the hand shape it describes, and try to find a real hand (or Google Image) that matches it to train the AI.
Hand Shape Cheat Sheet
- Earth: Square palm, short fingers (Practical)
- Air: Square palm, long fingers (Intellectual)
- Fire: Long palm, short fingers (Energetic)
- Water: Long palm, long fingers (Emotional)