Thomasbehan / LesNet

LesNet (Lesion Net) is an open-source project for AI-based skin lesion detection. It aims to create a reliable tool and foster community involvement in critical AI problems. Contributions are welcome!
Mozilla Public License 2.0
12 stars 2 forks source link

Model V0.1.5 upgrade #26

Closed Thomasbehan closed 1 year ago

Thomasbehan commented 1 year ago

Major Changes:

  1. Model Architecture: The model has been updated to be transformer-based, providing a robust and efficient architecture for sequence understanding and transduction models​.
  2. Performance Metrics: Added various metrics including F1-score, Specificity, and AUC-ROC to the model evaluation process, providing a comprehensive view of the model's performance​1​.
  3. Training Parameters: The training parameters were updated for better optimization and quicker training​.
  4. Quantization: The model now supports quantization, enhancing model efficiency without significant loss in model performance​.

Improvements:

  1. The GPU memory usage has been optimized by reducing the batch size and image size, and implementing mixed precision training​​.
  2. The data scraper has been optimized to balance the data before training​.
  3. The predict view has been improved to automatically select the latest model available in the models folder, and to automatically load in the TFLite model if the system is resource-limited​.

Bug Fixes:

  1. Fixed a bug that was causing the test data to not load correctly​.
  2. Fixed a bug related to the model parameters​.
  3. Fixed a bug that occurred when loading the model with custom metrics​

Other Changes:

  1. Adjusted the hyperparameters to mitigate overfitting and enhance the learning rate adaptation. A cooldown period was also introduced to the ReduceLROnPlateau callback for more stable training​​.
  2. Replaced custom precision and recall metrics with TensorFlow's Precision and Recall, while keeping F1 score and specificity as custom metrics due to the absence of direct TensorFlow functions​​.
  3. Refactored the SkinCancerDetector class for improved readability and modularity, and to fix a TensorFlow variable error​.
  4. Added a print of the model summary on the load of the predict view​.
  5. Updated the README.md to include the latest model information