BedsideBot is an advanced patient care system that uses multiple recognition technologies including hand sign detection, voice recognition, emotion detection, and eye gaze tracking to help bedridden and physically disabled patients communicate their needs effectively.
- Hand Sign Detection: Use finger gestures (1-5 fingers) to select patient needs
- Voice Recognition: Natural speech processing for voice commands
- Emotion Detection: Facial emotion analysis for patient monitoring
- Eye Gaze Tracking: Eye movement tracking for interface control(in progress)
- Call Nurse - Request nursing assistance
- Water - Request water or hydration
- Food - Request food or meals
- Bathroom - Request bathroom assistance
- Emergency - Emergency alert system
- Landing Page: Introduction and system overview
- Hospital Registration: Register healthcare facility
- Staff Registration: Register medical staff and nurses
- Patient Registration: Register patients with communication preferences
- Caregiver Registration: Register family members and caregivers
- Module Selection: Choose active recognition modules
- Patient Interface: Real-time monitoring and communication
- Python 3.8 or higher
- Webcam/Camera for video processing
- Microphone for voice recognition (optional)
-
Clone or Download the Project
cd BedsideBot_Integrated -
Create Virtual Environment
python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate
-
Install Dependencies
pip install -r requirements.txt
-
Environment Configuration
- Copy
.env.exampleto.env - Configure your email and SMS settings in
.env:
EMAIL_SENDER=your_email@gmail.com EMAIL_PASSWORD=your_app_password CAREGIVER_EMAIL=caregiver@hospital.com TWILIO_ACCOUNT_SID=your_twilio_account_sid TWILIO_AUTH_TOKEN=your_twilio_auth_token TWILIO_PHONE=+1234567890 CAREGIVER_PHONE=+0987654321 - Copy
-
Run the Application
python app.py
-
Access the System
- Open your web browser
- Navigate to
http://localhost:5000 - Start with the landing page and follow the registration process
- Landing Page (
/) - System overview and introduction - Hospital Registration (
/hospital) - Register your healthcare facility - Staff Registration (
/staff) - Add medical staff and nurses - Patient Registration (
/patient) - Register patients with their communication needs - Caregiver Registration (
/caregiver) - Add family members and caregivers - Module Selection (
/modules) - Choose which recognition systems to activate
- Patient Interface (
/interface) - Real-time monitoring system - Enter patient name and bed number
- Select active recognition features
- Start monitoring with live video feed
- Monitor patient requests and actions
- Receive real-time notifications
- Hand Gestures: Hold up 1-5 fingers to select options
- Voice Commands: Say "water", "food", "nurse", "bathroom", or "emergency"
- Emotion Detection: Automatic detection of patient emotions
- Eye Gaze: Look left, right, or center to select options
POST /api/register/hospital- Register hospitalPOST /api/register/staff- Register staff memberPOST /api/register/patient- Register patientPOST /api/register/caregiver- Register caregiver
GET /video_feed- Live video streamPOST /start_monitoring- Start patient monitoringGET /get_selected_button- Get current patient selectionPOST /set_button- Set patient selectionPOST /listen_voice- Voice recognition endpointPOST /stop_monitoring- Stop monitoring
The patient interface includes a real-time console panel that displays:
- System initialization status
- Module loading information
- Patient registration events
- Recognition system activities
- Error messages and warnings
- Monitoring status updates
BedsideBot supports multiple notification methods:
- Email Notifications: Sent to configured caregiver email
- SMS Notifications: Sent via Twilio to caregiver phone
- Real-time Interface: Live updates on the monitoring screen
-
Camera Not Working
- Ensure webcam is connected and not used by other applications
- Check camera permissions in your operating system
-
Voice Recognition Not Working
- Ensure microphone is connected and working
- Check microphone permissions
- Verify SpeechRecognition library is properly installed
-
Email/SMS Not Sending
- Verify email and Twilio credentials in
.envfile - Check internet connection
- Ensure email app passwords are configured correctly
- Verify email and Twilio credentials in
-
Module Import Errors
- Ensure all dependencies are installed:
pip install -r requirements.txt - Try reinstalling specific packages that are failing
- Ensure all dependencies are installed:
- For better performance, ensure good lighting for camera-based recognition
- Use a high-quality webcam for better hand gesture and emotion detection
- Ensure stable internet connection for notifications
- Close unnecessary applications to free up system resources
- All patient data is stored locally during the session
- Use HTTPS in production environments
- Secure your
.envfile and never commit it to version control - Regularly update dependencies for security patches
For technical support or questions:
- Check the console panel for real-time system status
- Review error messages in the browser console
- Ensure all dependencies are properly installed
- Verify camera and microphone permissions