This project is an interactive AI-powered application using a webcam to recognize hand gestures and trigger an AI model to solve math problems based on specific gestures. It integrates OpenCV for webcam capture, cvzone for hand tracking, Streamlit for a user interface, and Google’s Generative AI for answering math problems.
- Hand Gesture Recognition: Recognizes specific hand gestures to draw on a virtual canvas.
- AI Math Problem Solver: Sends captured gestures to an AI model, triggering it to solve math problems.
- Real-Time Interface: Displays live video feed, gesture-based drawing, and AI-generated responses.
- Python 3.7+
- Webcam-enabled device
-
Clone the repository:
git clone https://github.com/WazDevZm/ZedMathAI.git cd your-repo-name -
Set up a virtual environment (optional but recommended):
python -m venv env source env/bin/activate # On macOS/Linux .\env\Scripts\activate # On Windows
-
Install the required libraries:
pip install -r requirements.txt
-
Set up your API key for Google Generative AI:
- Add your Google Generative AI API key where
genai.configure(api_key="YOUR_API_KEY")appears in the code.
- Add your Google Generative AI API key where
-
Place the Hand Detection Image:
- Ensure
Zed Math AI.pngis in the project directory, or replace with a suitable image path.
- Ensure
Here's a list of libraries used in this project:
cv2(OpenCV) for real-time video capturecvzonefor hand gesture detectionstreamlitfor creating the user interfacegoogle.generativeaifor AI-driven responsesPIL(Pillow) for image handlingnumpyfor array operations
If you don't have cvzone installed, you can get it directly:
pip install cvzone