Skip to content

smri29/SafeSkinAI

Repository files navigation

πŸ›‘οΈ SafeSkin AI v2.0

The Premium Standard for Cosmetic Safety Intelligence

SafeSkin AI is a cutting-edge computational toxicology application designed to screen cosmetic ingredients for hidden health risks. Leveraging a rigorously curated database of over 11,500 chemical structures, it utilizes advanced ensemble machine learning to predict Carcinogenicity and Reproductive Toxicity in real-time.

πŸ“Έ App Interface

✨ v2.0 Features

πŸ’Ž Premium Glassmorphism UI: A sophisticated "Deep Ocean" aesthetic featuring translucent glass cards, dynamic gradients, and smooth animations.

🧠 Advanced Analytics Dashboard:

Interactive Gauge Charts: Visualizing risk probabilities with dynamic color coding.

Chemical Property Radar: A 6-axis spider chart comparing physicochemical properties against cosmetic standards.

Molecular Structure Rendering: High-resolution 2D visualization of the analyzed ingredient.

🎲 Smart "Surprise Me" Engine: Integrated database of 50+ real-world cosmetic ingredients (Retinol, Parabens, Vitamin C, etc.) with context regarding their role and safety profile.

⚑ Dual-Endpoint Prediction:

Carcinogenicity: XGBoost classifier optimized for structural alerts.

Reproductive Toxicity: Random Forest model detecting endocrine disruption potential.

πŸ“„ Report Generation: Instantly download a text-based analysis report for any screened molecule.

πŸ“Š Project Intelligence Hub: Dynamic section displaying training metrics (ROC-AUC scores) and dataset statistics.

πŸš€ Installation & Setup

Follow these steps to run SafeSkin AI on your local machine.

Prerequisites

Python 3.8 or higher

VS Code (recommended)

  1. Clone the Repository

git clone https://github.com/smri29/SafeSkinAI.git cd SafeSkinAI

  1. Install Dependencies

pip install -r requirements.txt

  1. Verify System Artifacts

Ensure the following model files are present in the root directory:

cancer_model.pkl

repro_model.pkl

scaler.pkl

app_metadata.json

model_stats.json

  1. Launch the App

streamlit run app.py

The application will launch automatically in your browser at http://localhost:8501.

πŸ“‚ Project Structure

safeskin-ai/ β”œβ”€β”€ app.py # Main v2.0 application source code β”œβ”€β”€ requirements.txt # Python dependencies (Streamlit, RDKit, Plotly, etc.) β”œβ”€β”€ cancer_model.pkl # Trained XGBoost model (Cancer Endpoint) β”œβ”€β”€ repro_model.pkl # Trained Random Forest model (Repro Endpoint) β”œβ”€β”€ scaler.pkl # StandardScaler object for feature normalization β”œβ”€β”€ app_metadata.json # Feature mapping configuration β”œβ”€β”€ model_stats.json # Validation metrics (AUC/Accuracy) β”œβ”€β”€ SafeSkin AI 01.png # Screenshot β”œβ”€β”€ SafeSkin AI 02.png # Screenshot β”œβ”€β”€ SafeSkin AI 03.png # Screenshot β”œβ”€β”€ SafeSkin AI 04.png # Screenshot └── README.md # Documentation

🧬 Scientific Methodology

SafeSkin AI represents a significant leap in in silico screening:

Data Curation: Aggregated 11,555 unique structures from high-confidence sources:

US EPA ToxCast (High-throughput screening data)

NIH Tox21 (Toxicology in the 21st Century)

PubChem (Structural resolution)

Feature Engineering: Extracts 2,069 molecular features per chemical, combining:

Morgan Fingerprints: 2048-bit structural vectors.

Physicochemical Descriptors: LogP, Molecular Weight, TPSA, Lipinski Violations, etc.

Imbalance Handling: Utilized ADASYN (Adaptive Synthetic Sampling) to oversample rare toxicity events, preventing model bias towards safe classes.

Validation: Models achieved rigorous validation scores (see "Project Intelligence" inside the app for live metrics).

⚠️ Disclaimer

SafeSkin AI is a predictive research tool. While it achieves high statistical accuracy based on historical data, in silico predictions should not replace standardized laboratory testing or regulatory safety assessments.

Developed by Shah Mohammad Rizvi | SafeSkin AI v2.0 | Powered by Streamlit, RDKit & Plotly

About

πŸ›‘οΈ The Premium Standard for Cosmetic Safety Intelligence. An advanced ML-powered app to predict carcinogenicity and reproductive toxicity in cosmetic ingredients using Deep Learning and Chemical Fingerprinting.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages