MedLens is a medical-focused smart glasses system designed to assist healthcare professionals and patients by recognizing people's faces and retrieving relevant medical information in real-time. The system demonstrates face recognition technology through an intuitive web interface, enabling secure access to patient data, medical history, and emergency contacts.
- Medical Identity Recognition: Instantly identify patients and medical personnel from face images
- Patient Profile Management: Securely manage medical history, emergency contacts, and personal data
- Real-time Processing: Fast face detection and matching for immediate information retrieval
- Secure Access Control: Role-based access (Doctors, Patients, Admins) ensuring data privacy
- Intuitive Dashboard: React-based interface for managing connections and medical records
- Frontend: React (Vite) with modern UI components
- Backend: Python FastAPI with face recognition capabilities
- Database: Supabase (PostgreSQL) for data persistence and image storage
- AI/ML: OpenCV and face_recognition library for facial analysis
MedLens/
├── frontend/ # React web application
├── backend/ # Python FastAPI server with face recognition
├── database/ # Supabase configuration and setup
└── README.md # This file
Before setting up the project, ensure you have the following installed:
- Node.js (v18 or higher) and npm/yarn
- Python (v3.9 or higher) and pip
- Git for version control
- Supabase Account for database and storage services
git clone <repository-url>
cd MedLensNavigate to the database/ folder and follow the instructions in its README.md to:
- Create a Supabase project
- Configure environment variables
- Set up database tables
cd database
# See database/README.md for detailed setup instructionsDetailed Instructions: database/README.md
Navigate to the backend/ folder and follow the instructions in its README.md to:
- Install Python dependencies
- Configure environment variables
- Start the FastAPI server
cd backend
# See backend/README.md for detailed setup instructionsDetailed Instructions: backend/README.md
Navigate to the frontend/ folder and follow the instructions in its README.md to:
- Install Node.js dependencies
- Configure environment variables
- Start the development server
cd frontend
# See frontend/README.md for detailed setup instructionsDetailed Instructions: frontend/README.md
After completing the setup for all components:
- Start the backend server (runs on http://localhost:8000)
- Start the frontend application (runs on http://localhost:3000 or http://localhost:5173)
- Open your browser and navigate to the frontend URL
- Register a new user with a face image
- Test recognition by uploading another image
The system follows a three-tier architecture:
- Frontend Layer: React-based web interface for user interactions
- Backend Layer: FastAPI server with face recognition engine and local JSON caching
- Data Layer: Supabase for persistent storage of user data, face encodings, and images
POST /api/register- Register a new user with face imagePOST /api/recognize- Recognize a face from uploaded imageGET /api/health- Check system health status
- Make changes to the relevant component (frontend/backend/database)
- Test locally using the development servers
- Ensure all tests pass before committing
- Follow the contribution guidelines for pull requests
- Face not detected: Ensure the image has good lighting and a clear frontal face
- Multiple faces detected: Upload an image with only one person
- Connection errors: Verify Supabase credentials and network connectivity
- Dependencies issues: Check that all prerequisites are installed correctly
For detailed information about each component, refer to the README.md files in their respective folders:
For issues or questions, please refer to the component-specific README files or create an issue in the repository.
