Revolutionizing drug discovery through AI-powered phytochemical analysis and molecular modeling
π Demo β’ π Documentation β’ π οΈ Installation β’ π‘ Features β’ π€ Contributing
Leveraging cutting-edge AI to predict phytochemical bioactivity for oral cancer treatment discovery
FYP-PHYTOSENSE is an advanced AI-powered platform that combines computer vision, machine learning, and computational chemistry to revolutionize phytochemical drug discovery. The system identifies medicinal plants from leaf images and predicts the bioactivity of their phytochemicals against oral cancer targets using state-of-the-art QSAR modeling.
- π€ Multi-Modal AI: Combines image classification with molecular property prediction
- 𧬠QSAR Modeling: Advanced XGBoost-based prediction of bioactivity, drug-likeness, and toxicity
- π― Cancer-Focused: Specialized for oral cancer drug discovery with EGFR inhibition analysis
- π¬ Molecular Visualization: Interactive 3D molecular structures and docking simulations
- β‘ Real-Time Analysis: Instant predictions with comprehensive drug development assessments
- Deep Learning Models: EfficientNet-B0, ResNet50, and MobileNetV2 ensemble
- 80+ Medicinal Plants: Comprehensive database of traditional medicinal plants
- High Accuracy: 95%+ classification accuracy with confidence scoring
- 2000+ Compounds: Extensive phytochemical database with SMILES notation
- Molecular Descriptors: 2057 features including RDKit descriptors and Morgan fingerprints
- Property Prediction: Bioactivity, drug-likeness, and toxicity assessment
- XGBoost Regression: State-of-the-art gradient boosting for property prediction
- Multi-Target Prediction: Simultaneous prediction of multiple molecular properties
- Feature Importance: Interpretable model with feature ranking
- 3D Structures: Interactive molecular visualization using 3Dmol.js
- Docking Simulation: AutoDock Vina integration for protein-ligand docking
- Binding Analysis: Comprehensive binding affinity and selectivity assessment
- AI-Powered Assessment: GPT-4 integration for detailed drug development analysis
- Lipinski's Rule: Drug-likeness evaluation with oral bioavailability prediction
- Safety Profile: Toxicity assessment and ADMET analysis
- Clinical Readiness: Comprehensive evaluation of therapeutic potential
# Quick Start
git clone https://github.com/nimshafernando/FYP-PHYTOSENSE.git
cd FYP-PHYTOSENSE
python flask_app.py
# Visit http://localhost:5000- Python 3.12+
- Git
- 8GB+ RAM (for AI models)
- GPU Support (optional, for faster inference)
# Clone the repository
git clone https://github.com/nimshafernando/FYP-PHYTOSENSE.git
cd FYP-PHYTOSENSE
# Create virtual environment
python -m venv .venv
.venv\Scripts\activate # Windows
# source .venv/bin/activate # Linux/Mac
# Install dependencies
pip install -r config/flask_requirements.txt
pip install -r config/qsar_requirements.txt
# Configure environment
cp config/.env.example config/.env
# Edit config/.env with your API keysπ Step-by-Step Installation Guide
git clone https://github.com/nimshafernando/FYP-PHYTOSENSE.git
cd FYP-PHYTOSENSE# Create virtual environment
python -m venv .venv
# Activate environment
# Windows:
.venv\Scripts\activate
# Linux/macOS:
source .venv/bin/activate# Flask application dependencies
pip install -r config/flask_requirements.txt
# QSAR modeling dependencies
pip install -r config/qsar_requirements.txt
# Molecular docking (optional)
pip install -r config/vina_requirements.txtModels are included in the repository:
models/efficientnet_b0_ensemble.pth(17MB)models/mobilenetv2_ensemble.pth(10MB)models/resnet50_ensemble.pth(92MB)models/XGBoost_model.pkl(Auto-loaded)
# Copy template
cp config/.env.example config/.env
# Edit configuration
nano config/.envRequired environment variables:
# OpenAI API (for drug assessments)
OPENAI_API_KEY=your-openai-api-key-here
# Flask Configuration
FLASK_ENV=development
FLASK_DEBUG=Truepython flask_app.pyVisit http://localhost:5000 to access FYP-PHYTOSENSE!
FYP-PHYTOSENSE/
βββ π― flask_app.py # Main Flask application
βββ π api/ # QSAR & API integrations
β βββ qsar_validator.py # External QSAR validation
β βββ autodock_vina_integration.py# Molecular docking
βββ π§ͺ tests/ # Comprehensive testing suite
β βββ functional_tests.py # API & integration tests
β βββ test_reports/ # Testing documentation
βββ βοΈ config/ # Configuration management
β βββ .env # Environment variables
β βββ *_requirements.txt # Dependency specifications
βββ π€ models/ # Pre-trained AI models
β βββ efficientnet_b0_ensemble.pth # Plant classification
β βββ mobilenetv2_ensemble.pth # Alternative classifier
β βββ XGBoost_model.pkl # QSAR prediction
βββ π data/ # Datasets and mappings
β βββ phytochemical_mapping.json # Plant-compound database
βββ π¨ templates/ # Frontend templates
β βββ index.html # Main interface
β βββ components/ # Modular UI components
βββ π§ scripts/ # Utility scripts
β βββ performance_monitor.py # System monitoring
β βββ security_test.py # Security validation
βββ π docs/ # Documentation
β βββ TESTING_FRAMEWORK_README.md # Testing guide
βββ π static/ # Static assets (CSS, JS)
- PyTorch - Deep learning framework for plant classification
- XGBoost - Gradient boosting for QSAR modeling
- RDKit - Cheminformatics and molecular descriptor calculation
- OpenAI GPT-4 - Natural language drug development assessments
- Ensemble Learning - Multiple model voting for robust predictions
- Flask - Lightweight Python web framework
- Werkzeug - WSGI web application library
- RESTful APIs - Clean API design for frontend integration
- 3Dmol.js - Interactive 3D molecular visualization
- HTML5/CSS3 - Modern responsive web interface
- JavaScript - Dynamic frontend interactions
- Bootstrap - UI components and responsive design
- AutoDock Vina - Molecular docking simulations
- SMILES Notation - Molecular structure representation
- QSAR Analysis - Quantitative structure-activity relationships
- Molecular Descriptors - 2000+ computed molecular properties
- Postman - API testing and validation
- Pytest - Comprehensive testing framework
- Git - Version control and collaboration
- Performance Monitoring - Load testing and optimization
- Navigate to the main interface
- Upload a clear image of a medicinal plant leaf
- Support for PNG, JPG, JPEG, WEBP formats
- Ensemble of 3 deep learning models classifies the plant
- Confidence scores and alternative predictions provided
- Access to 80+ medicinal plants in the database
- Automatic retrieval of associated phytochemicals
- Chemical structures displayed with SMILES notation
- Molecular properties and descriptors calculated
- XGBoost model predicts bioactivity, drug-likeness, toxicity
- Feature importance analysis for interpretability
- Interactive 3D molecular structure visualization
- AutoDock Vina docking simulation (optional)
- Binding affinity and selectivity analysis
- AI-powered evaluation of therapeutic potential
- Lipinski's Rule of Five compliance checking
- Comprehensive safety and ADMET profiling
- π― Plant Classification Accuracy: 95.2%
- β‘ Response Time: <3 seconds average
- π§ QSAR Model RΒ²: 0.847
- π Throughput: 100+ predictions/minute
- π Uptime: 99.9% availability
FYP-PHYTOSENSE includes a comprehensive testing framework:
# Run all tests
python -m pytest tests/
# Run specific test categories
python tests/functional_tests.py # API testing
python tests/performance_tests.py # Load testing
python tests/security_tests.py # Security validation
# Generate test reports
python tests/generate_html_report.py- Unit Tests: 95% code coverage
- Integration Tests: Full API workflow validation
- Performance Tests: Load testing up to 1000 concurrent users
- Security Tests: OWASP compliance validation
We welcome contributions from the community! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow PEP 8 style guidelines
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting
- π§ͺ New Plant Species: Expand the plant database
- π Drug Targets: Add new therapeutic targets
- π€ Model Improvements: Enhance ML model performance
- π¨ UI/UX: Improve user interface and experience
- π Validation: Add experimental validation data
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2026 Nimsha Fernando
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
AI Researcher & Bioinformatics Specialist
"Bridging the gap between traditional medicine and modern AI for drug discovery"
- π¬ Research Focus: AI-driven drug discovery and phytochemical analysis
- π Specialization: Computational biology and machine learning in healthcare
- π― Mission: Democratizing access to AI-powered drug discovery tools
Special thanks to:
- π« Academic Supervisors - For guidance and mentorship
- π± Traditional Medicine Practitioners - For valuable domain knowledge
- π₯ Open Source Community - For amazing libraries and tools
- π§ͺ Researchers - For experimental validation data
- π» Contributors - For continuous improvement and feedback
- π± Mobile App - Native iOS/Android applications
- βοΈ Cloud Deployment - Scalable cloud infrastructure
- π€ Advanced AI - Transformer-based molecular models
- π Multi-Language - International language support
- π¬ Wet Lab Integration - Automated experimental validation
- π Clinical Trial Support - Regulatory compliance tools
- π€ Collaboration Platform - Multi-user research environment
- π Real-Time Analytics - Advanced usage analytics
- π§ Email Support: nimsha.riveen@gmail.com
- π Bug Reports: GitHub Issues
- π‘ Feature Requests: GitHub Discussions
- π Documentation: Wiki
Made with β€οΈ by Nimsha Fernando
FYP-PHYTOSENSE - Transforming Traditional Medicine with AI πΏπ€