Skip to content

arshnoor14/Autism-ASD-Detection

Repository files navigation

Autism Spectrum Disorder (ASD) Detection

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.

Features

This application integrates three distinct machine learning models for ASD detection:

  1. 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.
  2. Image-Based Detection: A Convolutional Neural Network (CNN) built with Keras/TensorFlow that classifies uploaded facial images, predicting "Autism Detected" or "No Autism Detected".
  3. 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.

Technology Stack

  • 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)

How to Run

  1. Clone the Repository

    git clone [your-repository-url]
    cd Autism-Spectrum-Disorder-ASD-Detection
  2. 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
  3. Ensure Model Files are Present This application requires several pre-trained models to be in the correct directories:

    • autism_classification_model.keras
    • models/logistic_model.pkl
    • models/scaler.pkl
    • models/autism_model.pkl
    • models/bert_vectorizer.pkl
  4. Create Uploads Folder The image classification route requires an uploads directory to temporarily store images.

    mkdir uploads
  5. Run the Application

    python app.py

    The application will be accessible at http://127.0.0.1:5000/.

Application Routes

  • /: 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.

About

This project is a multi-modal Flask web app that uses quiz, image, and text-based machine learning models to assist in Autism Spectrum Disorder (ASD) detection.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors