Skip to content

sd2001/EpilepsyEye.ai

Repository files navigation






Earlier in March 2017, there was a lot of news coverage about an incident in the social media. Journalist Kurt Eichenwald received a tweet that stated "YOU DESERVE A SEIZURE FOR YOUR POSTS". The Journalist who suffered from epilepsy, got a seizure by looking at the image.

This incident has shown how social media could potentially be used as a terror weapon to inflict immediate physical pain and suffering to unsuspecting victims. Email, websites with user generated content are equally vulnerable to such attacks. In 2008 a hacker defaced the website of the Epilepsy Foundation and inserted flashing images which caused multiple health incidents to unsuspecting victims.

It is important for sites with user generated content to acknowledge this and take preventive action. Machine Learning can be applied to automatically detect images causing strobe behavior and block them.









EpilepsyEye.ai is available under MIT License, read the LICENSE file for more info









Python 3.7 and above

Get it from: <https://www.python.org/downloads/>


git clone https://github.com/<your-username>/EpilepsyEye.ai.git   
cd EpilepsyEye.ai
pip install virtualenv
python -m venv env
source env/bin/activate
pip install -r requirements.txt
bash run.sh

Python

 - OpenCV
 - Tensorflow
 - youtube_dl
 - Streamlit
Technical Details
--
TensorFlow is a an open source library for building machine learning models. In our case we will use an existing model and retrain it to detect seizure inducing images.This is called transfer learning. The popular Inception v3 model trained on [ImageNet](http://image-net.org/) is used as the base model.

1. TensorFlow is installed on docker. the image used is gcr.io/tensorflow/tensorflow:latest-devel
2. Use [Fatkun Batch Image downloader](https://chrome.google.com/webstore/detail/fatkun-batch-download-ima/nnjjahlikiabnchcpehcpkdeckfgnohf?hl=en) for chrome to search and download images of flashing strobe lighting.
3. Follow the instructions in [Google Code Labs](https://codelabs.developers.google.com/codelabs/tensorflow-for-poets) to retrain your model.
* With 500 Iterations, Final test accuracy was 86.8%
* With 4000 Iterations, Final test accuracy improved to 91.5% and that is the model uploaded here as [retrained_graph.pb](https://github.com/asasidh/Seizure-Detection-Tensor-Flow/blob/master/retrained_graph.pb)
4. Download test images to validate the trained model. Since I used google images to batch download training images, I decided to use bing image search for the test images. Couple of test images are uploaded under the `test_images` folder.



Indira Dutta

Indira

ML Developer

Sneha Patnaik

Sneha

ML Developer

Srijarko Roy

Srijarko

ML Developer

Swarnabha Das

Swarnabha Das

ML | Backend


Contributions are always welcome! Please check out this doc here for Contribution Guidelines.


Credits

About

Project for NTL Hack 2022

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published