Masthishq is a multimodal AI agent designed to act as an external memory for patients with Alzheimer's and Dementia. It uses Face Recognition, Vector Search (Qdrant), and LLMs (Llama 3 via Groq) to identify people, objects, and provide context-aware conversations.
Before running the project, ensure you have the following installed:
- Python 3.10+
- Node.js 18+ & npm
- Qdrant Cloud API Key (or local Qdrant instance).
- Groq API Key (for Llama 3 & Whisper).
git clone https://github.com/krishk2/Masthishq.git
cd MasthishqCreate a virtual environment and install dependencies.
# Windows
python -m venv venv
venv\Scripts\activate
# Mac/Linux
python3 -m venv venv
source venv/bin/activate
# Install Dependencies
pip install -r requirements.txtInstall the node modules.
cd frontend
npm install
cd ..Create a .env file in the root directory by copying the example.
cp .env.example .envOpen .env and fill in your keys:
# Qdrant (Memory)
QDRANT_MODE=server
QDRANT_URL=https://xyz.qdrant.tech, QDRANT_API_KEY=your_key
# Groq (AI Model)
GROQ_API_KEY=gsk_your_groq_api_key_here
Why is the Qdrant API Key provided? The project comes connected to a cloud Qdrant instance pre-loaded with VoxCeleb embeddings. This allows you to test the retrieval and recognition features immediately without spending hours enrolling data.
Using Your Own Data: If you prefer to start fresh or use your own faces:
- Change the
QDRANT_URLandQDRANT_API_KEYin.envto your own instance. - The database will be empty initially.
- Go to the Caregiver Dashboard (
/caregiver) and upload photos/details for the people you want the AI to remember. - Once enrolled, the Memory Chat and Camera will start recognizing these new individuals.
for Qdrant Cloud, ensure the URL/Key are in .env.
Open a terminal in the root folder (ensure venv is active):
uvicorn app.main:app --reload --port 8000The API will be available at http://localhost:8000
Open a new terminal, navigate to frontend:
cd frontend
npm run devThe App will be available at http://localhost:5173
- Caregiver Dashboard: Enroll faces and objects (
/remember/patient). - Memory Chat: Speak to the Avatar to ask "Who is this?" or "Where are my keys?".
- Object Scan: Use the camera to detect objects (Keys, Medicine).
- "Qdrant Connection Refused": Ensure Docker is running or your Cloud URL is correct.
- "Groq Error": Check your API Key quota.
- Frontend API Error: Ensure Backend is running on port
8000.