Skip to content

bundasmanu/ProjetoMestrado

Repository files navigation

ProjetoMestrado

What is DiagnosisViewer and what is it for?

DiagnosisViewer is a web application designed using the Django framework, which aims to promote an intuitive and simple approach to sharing knowledge among the community of data scientists.

The platform promotes the submission and the use of convolutional models, created in response to multiple benchmarks, in the diagnosis of biomedical samples.

The user has total freedom to insert datasets (nominal definition only) and convolutional models in the platform, for consequent use in diagnosis.

The user-friendly interface of DiagnosisViewer facilitates the process of managing models and datasets, allowing them to be easily removed, changed or filtered. Users can only remove or change the datasets and models that they have submitted.

The app is robust and fast, with diagnostic results being presented in a time interval of less than 10s. Unlike other applications, the models are not trained on the platform, i.e., they are compiled according to the base settings defined by the users, thus providing freedom for the submission of models with different development approaches, such as: adopted to different training techniques, different sample dimensions, different class category mapping results (to integer values), etc. This approach removes the hardware dependencies that are normally required in browser-based training of CNN networks.

The biggest advantage of the app, compared to the other apps, is that it allows the diagnostic functionality to be used in a high number of benchmarks, since the higher the number of models and benchmarks submitted the greater the offer available. The remaining app's focus exclusively on the study of 1-3 benchmarks.

The application also provides a diagnosis history, for this purpose provides interactively information about the most commonly used datasets and models by the community, and the most used by the logged-in user.

Important: The wider level of content made available on the platform by users, the more information is available for access (and diagnosis) and for the dissemination of new knowledge.

Project Setup:

The steps required for the correct configuration of the platform are listed below.

  1. You need to previously install the SGDB PostgreSQL in order to support database operations;
  2. Clone this repository (root folder of project need to be Projeto_Mestrado, if you want to change this name you need to change some flags in settings.py files: STATIC_ROOT and DATASET_PATH with your root folder name);
  3. Change settings.py file, in concordance with your PostgreSQL credentials (or you should create a secrets.py file with credentials and SECRET_KEY of project);
  4. Install requirements: pip install -r requirements.txt;
  5. Apply migrations to database (to create tables): python manage.py migrate;
    • If you have problems in this step, one workaround can be:
      1. Drop all migrations files;
      2. Run makemigrations command, in order to create migration files of all app's of project: python manage.py makemigrations;
      3. Now run again python manage.py migrate;

Optimized models

The results obtained for each optimized architecture are described below, in accordance with the problems being solved. There are also available links to download the models.

Results - Breast Histopathology:

Model Memory Macro Average F1Score Macro Average Recall Accuracy File
AlexNet 14,6 MB 90.2% 89.7% 92.1% AlexNet h5 File
VGGNet 13,1 MB 90.5% 89.6% 92.4% VGGNet h5 File
ResNet 29,9 MB 90.4% 90.2% 92.2% ResNet h5 File
DenseNet 10,3 MB 89.8% 89.4% 91.7% DenseNet h5 File
Ensemble Average All Models 22,8 MB 91.1% 90.7% 92.9% Ensemble h5 File

Results - Skin Mnist:

Model Memory Macro Average F1Score Macro Average Recall Accuracy File
AlexNet 7,8 MB 65.4% 63.5% 81.1% AlexNet h5 File
VGGNet 12,9 MB 64.8% 62.3% 80.8% VGGNet h5 File
ResNet 39,8 MB 66.5% 64.2% 81.3% ResNet h5 File
DenseNet 4,4 MB 67.6% 65.4% 81.6% DenseNet h5 File
Ensemble Average All Models 21,8 MB 68.5% 65.2% 83.0% Ensemble All Models h5 File
Ensemble Average Alex + VGG + Dense 17,5 MB 69.2% 66.5% 83.1% Ensemble Best Combination h5 File

Results - Colorectal Histopathology:

Model Memory Macro Average F1Score Accuracy File
AlexNet 19,0 MB 94.2% 94.3% AlexNet h5 File
VGGNet 15,5 MB 94.5% 94.6% VGGNet h5 File
ResNet 11,4 MB 95.5% 95.7% ResNet h5 File
DenseNet 17,9 MB 96.0% 96.1% DenseNet h5 File
Ensemble Average All Models 21,4 MB 95.5% 95.6% Ensemble All Models h5 File
Ensemble Average Res+ Dense 9,9 MB 96.6% 96.6% Ensemble Best Combination h5 File

Limitations of Project

  • Plataform now only supports cnn models (HDF5 files) created using Keras with tensorflow backend;
  • It is planned to increase the number of features available, such as: discussion forum, message sharing between users, etc;
  • No hosting service available (I plan to quickly support this limitation);

Licence

GPL-3.0 License
I am open to new ideas and improvements to the current repository. However, until the defense of my master thesis, I will not accept pull request's.