Spaces:
Sleeping
NeuroSight - AI-Powered Brain Disease Detection
π§ NeuroSight is an advanced AI-powered platform for detecting brain diseases including Alzheimer's, Dementia, Multiple Sclerosis, and Stroke using deep learning models.
π Features
- Multi-Disease Detection: Alzheimer's, Dementia, Multiple Sclerosis, Stroke
- AI-Powered Analysis: State-of-the-art deep learning models
- User Authentication:
- Google OAuth integration
- Email/Password with OTP verification
- Professional Onboarding: Doctor credentials and hospital information
- Scan History: Track and review previous diagnoses
- PDF Reports: Generate detailed medical reports
- Secure & Compliant: Email verification, secure authentication
π Quick Start
Prerequisites
- Python 3.8+
- pip
- Virtual environment (recommended)
Installation
Clone the repository
git clone <your-repo-url> cd "final year aiml project"Create virtual environment
python -m venv .venv .venv\Scripts\activate # Windows # source .venv/bin/activate # Linux/MacInstall dependencies
pip install -r requirements.txtSet up environment variables Create a
config.pyfile with:# Email Configuration MAIL_SERVER = 'smtp.gmail.com' MAIL_PORT = 587 MAIL_USERNAME = '[email protected]' MAIL_PASSWORD = 'your-app-password' # Google OAuth GOOGLE_CLIENT_ID = 'your-client-id' GOOGLE_CLIENT_SECRET = 'your-client-secret'Download AI Models Due to file size limitations, AI models are not included in the repository. Download from [Google Drive/OneDrive link] and place in project root:
alzhimermodel.pthdementia_detection_model_2.h5multiple_sclerosis.pthstroke.pth
Run the application
python neurosight_app_with_auth.pyAccess the application Open your browser and navigate to
http://localhost:5000
π Project Structure
final year aiml project/
βββ neurosight_app_with_auth.py # Main application
βββ models.py # Database models
βββ auth_utils.py # Authentication utilities
βββ requirements.txt # Python dependencies
βββ templates/ # HTML templates
β βββ login.html
β βββ register.html
β βββ verify_email.html
β βββ dashboard.html
β βββ detect.html
β βββ ...
βββ static/ # Static assets
β βββ css/
β βββ js/
β βββ images/
βββ instance/ # Database files
π Authentication Flow
Email/Password Registration
- User registers with email and password
- System sends 6-digit OTP to email
- User verifies OTP
- User completes onboarding
- Access granted to dashboard
Google OAuth
- User clicks "Continue with Google"
- Google authentication
- User completes onboarding (if first time)
- Access granted to dashboard
π§ͺ Testing
Email System
python test_email.py
Database Management
python db_manager.py
π§ Email Configuration
The application uses Gmail SMTP for sending emails:
- OTP verification codes
- Welcome emails
- Password reset emails
Setup Gmail App Password:
- Enable 2-Factor Authentication on your Google account
- Generate an App Password
- Use the App Password in
config.py
π οΈ Database Management
View Database
python view_db.py
Manage Users
python db_manager.py
Run Migrations
python migrate_otp_fields.py
π Security Features
- β OTP email verification (10-minute expiry)
- β Password strength validation
- β Attempt limiting (5 max OTP attempts)
- β TLS email encryption
- β Secure session management
- β Google OAuth integration
π Supported Diseases
- Alzheimer's Disease
- Dementia
- Multiple Sclerosis
- Stroke
π€ Contributing
This is a final year AIML project. For questions or contributions, please contact the project team.
π License
See LICENSE file for details.
π₯ Team
Final Year AIML Project Team
π Support
For issues or questions:
- Check the documentation
- Review the walkthrough guides
- Contact the development team
Built with β€οΈ using Flask, TensorFlow, and modern web technologies