Skip to content

This project develops a near-infrared (NIR) device for real-time artery detection and blood flow assessment in microvascular surgeries, especially oral and reconstructive. Featuring a cloud server and a UI, it enhances precision, monitors perfusion, and improves outcomes post-surgery.

License

Notifications You must be signed in to change notification settings

cepdnaclk/e20-3yp-Vescueye

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🩺 Vescueye – Vein Health Monitoring with Raspberry Pi & Cloud

Vescueye is a real-time vein monitoring system designed to assist surgeons in tracking facial artery conditions using near-infrared imaging and temperature sensors. It integrates a Raspberry Pi-based embedded system, AWS cloud services, and cross-platform applications for data visualization and management.


πŸ”§ Features

  • Real-time Monitoring: Continuous vein imaging and temperature capture via Raspberry Pi
  • Cloud Integration: AWS IoT Core for secure device-cloud communication
  • Data Storage: Image and data storage in AWS S3 and MongoDB
  • Admin Dashboard: Web-based interface for device and patient management
  • Mobile Interface: Dedicated app for doctors to view patient flap conditions
  • Vein Analysis: Automated vein continuity scoring using computer vision (OpenCV)

πŸ–ΌοΈ High-Level Architecture

High Level Architecture


🧠 Technologies Used

Layer Technology
Hardware Raspberry Pi 3B, MLX90614, VL53L0X, Pi NoIR
Backend Server Node.js, Express
Database MongoDB (Atlas)
Cloud Platform AWS S3, AWS IoT Core
Web Frontend React (Admin Dashboard)
Mobile App React Native (Doctor Interface)
Image Processing Python (OpenCV, NumPy)

πŸ§ͺ System Testing

βœ… Software Testing

  • Unit Testing: Comprehensive testing using the Jest framework for backend logic and validation functions
  • API Testing: Thorough endpoint testing with Postman to verify functionality, authentication, and data flow

βœ… Hardware Testing

MLX90614 Temperature Sensor

  • Tested with human hand and hot mug scenarios
  • Real-time sensor values logged via Python
  • Accuracy verified against digital thermometer (Β±0.5Β°C)

VL53L0X Distance Sensor

  • Tested at 10cm and 20cm object distances
  • Readings verified under multiple lighting conditions
  • Consistent performance across various environments

βœ… Vein Continuity Score Testing

  • Human Hand Test: Achieved scores above 8.5, demonstrating clear and connected vein patterns
  • Low-Vein Object Test: Skin areas like back of arm or wrist yielded scores below 3, confirming system sensitivity

πŸ“Έ Vein Continuity Detection Method

Vein Continuity Process

Detection Process:

  1. Pink Region Detection – Color filtering to isolate skin region
  2. Vein Pattern Detection – Adaptive thresholding for dark vein visibility
  3. Mask Generation – Morphological operations to connect broken lines

Continuity Score Formula: Number of vein lines + their connectedness
(Fewer broken segments β†’ higher score)


πŸš€ Getting Started

Prerequisites

  • Raspberry Pi 3B or higher
  • Node.js (v14 or higher)
  • Python 3.7+
  • AWS Account with IoT Core setup
  • MongoDB Atlas account

Raspberry Pi Setup

# Clone the repository on Raspberry Pi
git clone https://github.com/cepdnaclk/e20-3yp-Vescueye.git
cd vescueye/pi

# Install Python dependencies
pip install -r requirements.txt

# Configure AWS IoT certificates
# Place your certificates in the certs/ directory

# Run the main script
python3 main.py

Node.js Server Setup

# Navigate to backend directory
cd backend

# Install dependencies
npm install

# Configure environment variables
cp .env.example .env
# Edit .env with your AWS and MongoDB credentials

# Start development server
npm run dev

React Admin Panel Setup

# Navigate to frontend directory
cd frontend

# Install dependencies
npm install

# Start the development server
npm start

React Native Mobile App Setup

# Navigate to mobile directory
cd mobile

# Install dependencies
npm install

# Start Expo development server
npx expo start

πŸ“‚ Project Structure

code/
β”œβ”€β”€ backend/        # Node.js server code
β”‚   β”œβ”€β”€ controllers/
β”‚   β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ middleware/
β”‚   └── test/
β”œβ”€β”€ web-frontend/       # React admin dashboard
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   └── services/
β”‚   β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ context/
β”‚   └── styles/
β”œβ”€β”€ mobile/         # Doctor mobile app
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ screens/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   └── navigation/
β”‚   └── assets/
β”œβ”€β”€ firmware/             # Raspberry Pi code
β”‚   β”œβ”€β”€ test/
β”‚   └── scripts/
β”œβ”€β”€ images/         # Architecture diagrams, testing screenshots
└── README.md

πŸ” Security Measures

  • AWS IoT Core: Secure device communication using X.509 certificates
  • Data Encryption: Data encrypted at rest on S3 and MongoDB
  • Authentication: JWT-based authentication for web and mobile access
  • HTTPS: All API communications secured with SSL/TLS

πŸ“Š API Documentation

Authentication Endpoints

  • POST /api/auth/login - User login
  • POST /api/auth/forgot-password - Password Reset
  • POST /api/auth//signup - User Signup

Patient Data

  • GET /api/users/patients - List patients
  • POST /api/users/patient/register - Add new patient
  • GET /api/users/patient/:id - Get patient by id
  • GET /api/users/flap/search/:id - Get Flap data

Doctor Data

  • GET /api/users/doctors - List patients
  • POST /api/users/doctor/register - Add new patient
  • POST /api/users/assign-patient - Assign new patient
  • POST /api/users/doctors/patients - Get Assigned patients

🧩 Hardware Components

Component Purpose Interface
MLX90614 Non-contact temperature sensing I2C
VL53L0X Distance measurement I2C
Pi NoIR Camera Near-infrared imaging CSI
Raspberry Pi 3B Main processing unit GPIO/I2C/CSI

πŸ”§ Configuration

Environment Variables

# Backend Configuration
PORT=3000
NODE_ENV=development
JWT_SECRET=your_jwt_secret

# Database
MONGODB_URI=mongodb+srv://username:[email protected]/vescueye

# AWS Configuration
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_IOT_ENDPOINT=your_iot_endpoint

# S3 Configuration
S3_BUCKET_NAME=vescueye-images

πŸ› Troubleshooting

Common Issues

  1. Camera not detected: Ensure Pi NoIR camera is properly connected to CSI port
  2. Sensor reading errors: Check I2C connections and addresses
  3. AWS IoT connection failed: Verify certificates and endpoint configuration
  4. Database connection issues: Check MongoDB Atlas whitelist and credentials

Debug Commands

# Check I2C devices
i2cdetect -y 3

# Test camera
raspistill -o test.jpg

# Check IoT connectivity
python3 /test/<test_module>.py

πŸ“ˆ Performance Metrics

  • Image Processing Speed: ~1-2 seconds per frame
  • Temperature Reading Frequency: 0.2Hz
  • Distance Sensor Accuracy: Β±3mm
  • Vein Detection Accuracy: (Not Done Properly Yet)

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/new-feature)
  3. Commit your changes (git commit -m 'Add new feature')
  4. Push to the branch (git push origin feature/new-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘₯ Team


πŸ“ž Support

For support and questions:

  • Create an issue on GitHub
  • Contact the development team

Β© 2025 Vescueye Team. All rights reserved.

About

This project develops a near-infrared (NIR) device for real-time artery detection and blood flow assessment in microvascular surgeries, especially oral and reconstructive. Featuring a cloud server and a UI, it enhances precision, monitors perfusion, and improves outcomes post-surgery.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •