Project Info
An AI-powered platform helping Alzheimer's patients reconnect with their past through natural conversations and AI-generated visuals. ๐ Elevator Pitch MemoryVault is an innovative AI platform designed to help Alzheimer's patients preserve and relive their cherished memories. Through advanced AI, it enables natural conversations about past experiences while generating visuals that enhance recollection. Families can actively contribute, creating a collaborative space for memory preservation. By combining interactive dialogue with AI-generated imagery, MemoryVault strengthens emotional connections and improves well-being. ๐ก The Problem It Solves Alzheimerโs disease gradually erases memories, leaving patients feeling lost and disconnected. Traditional solutions like photo albums and reminders are passive and lack interaction. MemoryVault solves this by: โ Enabling conversational memory retrieval โ Creating AI-generated visual representations โ Providing an immersive and interactive experience โ Encouraging family participation in memory preservation โ Supporting emotional well-being through engagement ๐
Inspiration
The heartbreaking impact of Alzheimer's inspired us to go beyond traditional memory aids. We envisioned a platform that not only stores memories but brings them to lifeโhelping patients maintain their identity and connections with loved ones. โ๏ธ How We Built It ๐น Technical Architecture ๐น Backend (Flask + Python): RESTful API for memory management SentenceTransformer for vector embeddings Pinecone vector database for storage Google Gemini Pro for natural language processing FLUX API for image generation ๐น Memory Processing Pipeline: Text chunking & optimization Vector embedding creation Metadata management Efficient storage & retrieval ๐น Core Features: ๐ฃ๏ธ Conversational memory retrieval ๐จ AI-powered visual generation ๐ก Family memory contribution ๐ Interactive memory exploration ๐ง Challenges We Faced 1๏ธโฃ Vector Database Implementation โ Optimizing memory storage & retrieval ๐ 2๏ธโฃ AI Integration โ Coordinating multiple AI models for natural flow ๐ค 3๏ธโฃ User Experience โ Designing an intuitive interface for elderly users ๐ต๐ป๐ด๐ป ๐ Accomplishments โ Successfully integrated multiple AI technologies into one platform โ Built an efficient vector-based memory storage & retrieval system โ Implemented context-aware natural conversation capabilities โ Developed a scalable architecture for multiple users โ Created a user-friendly interface accessible to elderly users ๐ What We Learned ๐ Vector database optimization & memory retrieval ๐ Large Language Model (LLM) integration ๐ AI-powered image generation techniques ๐ Scalable Flask application development ๐ Cross-platform integration strategies ๐ What's Next for MemoryVault ๐ Enhanced Features ๐๏ธ Voice interaction capabilities ๐ Advanced memory organization tools ๐ถ๏ธ Virtual reality (VR) integration ๐ฑ Mobile application development ๐ Platform Expansion ๐ฅ Healthcare provider partnerships ๐ Research institution collaboration ๐ Multi-language support ๐ Enhanced security features โค๏ธ Community Development ๐จโ๐ฉโ๐ฆ Family account management ๐ Memory sharing capabilities ๐ค Support group integration ๐ฉโโ๏ธ Professional caregiver tools ๐ Built With: Flask โข Python โข Pinecone โข Google Gemini Pro โข FLUX API ๐ MemoryVault โ Because every memory matters.
๐ง MemoryVault: Compassionate AI Memory Companion
An AI-powered assistant for Alzheimer's and Dementia patients Built with Generative AI, Face Recognition, RAG, and Emotional Intelligence
๐ Overview
MemoryVault is a powerful, emotionally aware AI system designed to help patients with Alzheimerโs and Dementia recall memories, recognize loved ones, and reduce feelings of loneliness and confusion. The system combines Generative AI, Facial Recognition, Text-to-Speech/Speech-to-Text, Pinecone Vector DB, and RAG (Retrieval Augmented Generation) to bring a personalized, compassionate memory companion to life.
๐ Key Features
| Feature | Description |
|---|---|
| ๐ค Facial Recognition | Identifies the person speaking using camera input |
| ๐ง Memory Recall (RAG) | Fetches relevant personal memories using vector search |
| ๐ฌ Gemini AI Chatbot | Provides emotionally intelligent, memory-based responses |
| ๐ฃ๏ธ STT + TTS | Converts voice-to-text (Speech Recognition) and back to audio replies |
| ๐ผ๏ธ Flux API (Image Gen) | Generates memory-related visuals from chat context |
| ๐ Chat Summary & Narrative | Summarizes the conversation into a personal life story |
| ๐ Memory Vault | Securely stores and manages multimedia memory data |
โ๏ธ Tech Stack
| Component | Technologies Used |
|---|---|
| Frontend | React, Tailwind CSS |
| Backend | FastAPI (face + voice), Flask (memory chatbot) |
| Vector DB | Pinecone |
| Embeddings | SentenceTransformers (mpnet) |
| Image Gen | HuggingFace Flux API |
| Chat AI | Gemini 2.0 Flash (Google Generative AI) |
| Voice | gTTS, SpeechRecognition |
| Face Matching | face_recognition, OpenCV |
| Storage | JSON (chat), Pickle (face data), Local FS (images/audio) |
๐ง System Architecture
๐น 1. Face Recognition Module (FastAPI)
-
Uses
face_recognitionlib to detect and encode known faces -
Stores encodings using
pickleinEncodeFile.p -
When a user interacts (via webcam or uploaded photo), the system:
- Preprocesses image โ locates face โ encodes โ compares with stored faces
- If matched โ returns name and confidence
- If unknown โ stores in
UnknownImages/
๐น 2. Gemini Chatbot & Text-to-Speech
- User input (text or speech) is converted and passed to Gemini
- A custom prompt instructs Gemini to behave like an empathetic memory companion
- Gemini responds with a brief, caring message
- The reply is converted to speech using
gTTSand sent as an MP3 audio file
๐น 3. Chat History Management
- Conversations are stored in
chat_history.json - Each message has
role,content,timestamp, andUUID - A
/get-narrativeendpoint crafts a summary life story from the chat using Gemini
๐น 4. RAG MemoryVault Module (Flask + Pinecone)
-
Users add personal memories using
/postMemory- Text is split into overlapping chunks
- Each chunk is vectorized using SentenceTransformer
- Metadata (e.g., source, topic) is attached
- Vectors are stored in Pinecone
-
When user asks a question:
- Query is embedded and matched against Pinecone
- Top 5 matching memory chunks are used as context for Gemini
- Gemini generates a context-aware response (no reference to AI or search)
๐น 5. Image Generation (FLUX API)
-
When asked for visualizations:
- First memory chapter is extracted
- A prompt is sent to FLUX to generate a nostalgic, warm image
- The image is stored locally and returned with the story
๐ Working Flow
๐งน Module 1: RecallMe (FastAPI)
sequenceDiagram
User --> React UI: Starts Conversation
React UI --> FastAPI: Uploads Face + Audio
FastAPI --> face_recognition: Matches Face
FastAPI --> gTTS: Converts Gemini Reply to Audio
FastAPI --> Gemini API: Generates Response using Face Context + Chat History
FastAPI --> UI: Sends Audio URL + Text Reply + Chat History
๐งน Module 2: MemoryVault RAG (Flask)
sequenceDiagram
User --> React UI: Adds Memory
React UI --> Flask API: POST /postMemory
Flask --> Pinecone: Store Vector + Metadata
User --> React UI: Asks Memory-Based Question
React UI --> Flask: GET /query?query=...
Flask --> Pinecone: Find Relevant Memory Chunks
Flask --> Gemini: Prompt with Memory Context
Flask --> UI: Memory-Based Response
๐ฎ Future Enhancements
| Feature | Description |
|---|---|
| Emotion Detection | Detect facial emotion and adjust tone accordingly |
| Caregiver Dashboard | Live chat monitor and memory update portal |
| Mobile App Integration | Android + iOS app for accessibility |
| Cloud Sync | Secure memory cloud with multi-user support |
| AR/VR Walkthrough | โWalk Through Your Memoriesโ visual experience |
| Multi-Language Support | Translate voice + chat to native language |
๐งโโ๏ธ Real Impact
Helps elderly individuals with memory loss:
- Reconnect with their identity
- Feel emotionally supported
- Communicate with empathy
- Recall specific moments with visuals and warmth
โ Run Locally
๐น RecallMe (FastAPI)
cd RecallMe
pip install -r requirements.txt
python main.py
๐น MemoryVault RAG (Flask)
cd MemoryVault-RAG
pip install -r requirements.txt
python app.py
Ensure your
.envhas:
PINECONE_API_KEY=your_key_here
GOOGLE_API_KEY=your_key_here
Analysis
View
Metric
No commits on this project resolved to a GitHub account.
Technology
- CSSIn code
- FlaskIn code
- HTMLIn code
- JavaScriptIn code
- LangChainIn code
- PythonIn code
- ReactIn code
7 of 7 appear in the indexed code.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
210 KB
Source files
39
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
Monishg2004/MemoryVault
86 files ยท 20.4 MB ยท @ 61c015d
Structure
Interface
6 files ยท 7%Screens, components and styles rendered to the user.
Application logic
30 files ยท 35%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here โ open the file browser to check anything the diagram implies.
Languages
- JavaScript62%
- CSS22%
- Python12%
- Markdown3%
- HTML1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
Frontend/package.json
npm ยท 14- @testing-library/jest-dom
- @testing-library/react
- @testing-library/user-event
- axios
- framer-motion
- lucide-react
- react
- react-dom
- react-frontend
- react-icons
- react-router-dom
- react-scripts
- react-webcam
- web-vitals
Backends/requirements.txt
pypi ยท 8- base64io
- Flask
- Flask-Cors
- groclake
- langchain
- logging
- requests
- uuid
Declared in the repositoryโs manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This projectโs features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.