Skip to content

Webapp interface to Evaluate chest x-ray image for pneumonia using Trained CNN model

License

Notifications You must be signed in to change notification settings

Super-EvilTeam/Pneumonia-Evaluation-webapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pneumonia-Evaluation-webapp

Webapp interface to Evaluate chest x-ray image for pneumonia using Trained CNN model.

Demonstration-:

2022-11-22.20-47-43.mp4

SOFTWARE REQUIRNMENTS:

  1. Visual studio code
  2. python 3.10

LIBRARY REQUIRNMENTS:

  1. flask - pip install flask
  2. flask_mysqldb - pip install flask_mysqldb
  3. TensorFlow - pip install tensorflow==2.10
  4. OpenCV - pip install opencv-python
  5. Matplotlib - pip install matplotlib

How to setup -:

  1. clone repository.

  2. keep the structure of directories same do not change names of 'staticFiles' and 'templates' folder unless you know what you are doing.

  3. Download p1.h5 model file and add it to any directory on your pc.

  4. Give path to the p1.h5 file in following codeline (main.py)

    model = tf.keras.models.load_model('path here')

  5. Download and install MySQL, you can Refer to this guide if you dont know what options to choose during installation.

  6. Open MySQL Workbench login to localhost and run following command in Query tab.

     CREATE DATABASE IF NOT EXISTS `pythonlogin` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
     USE `pythonlogin`;
    
     CREATE TABLE IF NOT EXISTS `accounts` (
         `id` int(11) NOT NULL AUTO_INCREMENT,
         `username` varchar(50) NOT NULL,
         `password` varchar(255) NOT NULL,
         `email` varchar(100) NOT NULL,
         PRIMARY KEY (`id`)
     ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
    
     INSERT INTO `accounts` (`id`, `username`, `password`, `email`) VALUES (1, 'test', 'test', 'test@test.com');
    
  7. Put your MySQl database password in app.config(main.py).

     # Enter your database connection details below
     app.config['MYSQL_HOST'] = 'localhost'
     app.config['MYSQL_USER'] = 'root'
     app.config['MYSQL_PASSWORD'] = 'Your password here'
     app.config['MYSQL_DB'] = 'pythonlogin'
    
  8. Run main.py

References

https://stackoverflow.com/questions/23327293/flask-raises-templatenotfound-error-even-though-template-file-exists

https://thinkinfi.com/upload-and-display-image-in-flask-python/

https://flask.palletsprojects.com/en/2.2.x/patterns/fileuploads/

https://codeshack.io/login-system-python-flask-mysql/

About

Webapp interface to Evaluate chest x-ray image for pneumonia using Trained CNN model

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published