This project is a multi-modal web application designed to assist in the detection of Autism Spectrum Disorder (ASD). It provides three different methods of prediction using machine learning, all served through a user-friendly Flask web interface.
Note: This tool is for informational and educational purposes only. It is not a substitute for professional medical diagnosis.
This application integrates three distinct machine learning models for ASD detection:
- Quiz-Based Screening: A logistic regression model that predicts the likelihood of ASD based on user responses to a 10-question questionnaire, along with inputs for age, gender, and jaundice history.
- Image-Based Detection: A Convolutional Neural Network (CNN) built with Keras/TensorFlow that classifies uploaded facial images, predicting "Autism Detected" or "No Autism Detected".
- Text-Based Analysis: A model utilizing BERT embeddings to analyze user-provided text. It predicts whether autistic traits are "likely" or "unlikely" based on linguistic patterns and provides a confidence score.
- Backend: Flask
- ML (Quiz & Text Models): Scikit-learn (via
joblib) - ML (Image Model): TensorFlow, Keras
- NLP Vectorization: BERT (via
vectorizer_module.py) - Data Handling: NumPy
- Frontend: HTML/CSS (served by Flask templates)
-
Clone the Repository
git clone [your-repository-url] cd Autism-Spectrum-Disorder-ASD-Detection -
Install Dependencies It's recommended to use a virtual environment.
pip install flask numpy tensorflow scikit-learn # You will also need your custom BERTVectorizer dependencies (e.g., transformers) pip install transformers -
Ensure Model Files are Present This application requires several pre-trained models to be in the correct directories:
autism_classification_model.kerasmodels/logistic_model.pklmodels/scaler.pklmodels/autism_model.pklmodels/bert_vectorizer.pkl
-
Create Uploads Folder The image classification route requires an
uploadsdirectory to temporarily store images.mkdir uploads
-
Run the Application
python app.py
The application will be accessible at
http://127.0.0.1:5000/.
/: Homepage/test: The 10-question quiz for ASD screening./cnn_input: Page to upload an image for CNN prediction./text_input: Page to enter text for NLP-based prediction./contact: A contact form.