-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ππ§β¨π§ͺπ - Major enhancements and fixes across the application
- π Fixed bugs in feature extraction service and several test cases. - π§ Reduced model complexity and updated learning rates to prevent overshoots. - β¨ Updated tests and implemented command scripts for improved data scraping. - π§ͺ Adjusted metric priorities for better alignment with diagnostic importance. - π Enhanced model architecture with complex residual models and feature extraction. - π Adjusted model architecture and hyperparameters according to best-performing settings. - β¨π§ Added Hyperparameter Tuning Module and enhanced the DataScraper for more efficient data handling.
- Loading branch information
1 parent
6e70372
commit 4f6f64b
Showing
32 changed files
with
978 additions
and
497 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,5 @@ test | |
# prevent models being commited to github | ||
**/*.h5 | ||
*.h5 | ||
**/*.tflite | ||
*.tflite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
## Roadmap | ||
|
||
Our development roadmap is designed to iteratively enhance our AI's capabilities, focusing on improving its accuracy, scalability, and robustness. Each model iteration (M1 through M5) represents a step towards achieving our ultimate goal: developing an AI system with the highest possible F1 score, ensuring balanced precision and recall for critical applications in skin cancer detection and beyond. Here's a brief overview of the planned roadmap: | ||
|
||
### M1: Proof of Concept | ||
- **Objective:** Establish a foundational AI model using the ViT (Vision Transformer) as a base. The primary aim is to set up the necessary tools and framework for AI development within our project. | ||
- **Dataset:** Train on a dataset of 10,000 images to validate the concept and the underlying infrastructure. | ||
- **Focus:** Laying down the groundwork for future iterations by validating the initial model architecture and data processing pipelines. | ||
|
||
### M2: Initial Deployment | ||
- **Objective:** Build upon the proof of concept by increasing the dataset size and refining the model based on initial learnings. | ||
- **Dataset:** This iteration is trained on 40,194 images, significantly expanding its learning capacity and generalization capabilities. | ||
- **Focus:** Enhance model accuracy and establish a benchmark for performance improvements in subsequent versions. | ||
|
||
### M3: Expanded Dataset | ||
- **Objective:** Further increase the dataset size to improve the model's ability to generalize and accurately identify skin cancer from a wider variety of images. | ||
- **Dataset:** Utilize a dataset of 73,196 images, aiming for broader coverage and improved detection capabilities. | ||
- **Focus:** Target substantial improvements in model performance, particularly in handling diverse and challenging cases. | ||
|
||
### M4: Advanced Features and Security | ||
- **Objective:** Introduce natural language processing capabilities to interpret textual data alongside images and implement features to detect and reject non-skin images used to deceive the AI. | ||
- **Focus:** Enhance the AI's versatility and robustness, making it more adaptable to real-world applications and resistant to manipulation. | ||
|
||
### M5: Security Enhancement | ||
- **Objective:** Strengthen the model's security features to prevent tricking the AI into false predictions, ensuring the system's integrity and reliability. | ||
- **Focus:** Concentrate on making the AI system as foolproof as possible against attempts to exploit its weaknesses, further solidifying its application in sensitive fields. | ||
|
||
### Importance of Focusing on the F1 Score | ||
The ultimate goal of achieving the highest possible F1 score is crucial because it signifies a balanced approach to precision (the model's ability to identify true positives from all positive predictions) and recall (the model's success in identifying all actual positives). This balance is especially important in medical applications, like skin cancer detection, where the cost of false negatives (failing to identify a condition) can be as critical as the cost of false positives (incorrectly identifying a condition). A high F1 score ensures that our AI system is both accurate and reliable, minimizing the risk of misdiagnosis and making it a valuable tool in clinical support. | ||
|
||
### Future Plans | ||
Beyond M5, we aim to explore additional innovations that will push the boundaries of what our AI can achieve, constantly seeking to improve its accuracy, efficiency, and applicability in real-world scenarios. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
train_dir = 'data/train' | ||
val_dir = 'data/validation' | ||
test_dir = 'data/test' | ||
val_dir = test_dir |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import argparse | ||
from skinvestigatorai.models.downloader import downloader | ||
|
||
|
||
def main(): | ||
parser = argparse.ArgumentParser(description="Download a specific AI model.") | ||
parser.add_argument("-m", "--modelname", required=True, help="The name of the model to download.") | ||
|
||
args = parser.parse_args() | ||
|
||
model_name = args.modelname | ||
if downloader(model_name): | ||
print(f"Successfully downloaded the model: {model_name}") | ||
else: | ||
print(f"Failed to download the model: {model_name}") | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import argparse | ||
from skinvestigatorai.services.data_scaper_service import DataScraper | ||
|
||
|
||
def main(): | ||
parser = argparse.ArgumentParser( | ||
description="Download images from ISIC Archive and split into training and testing sets.") | ||
parser.add_argument("-p", "--pages", type=int, default=-1, | ||
help="Number of pages to download. Default is -1, which downloads all pages.") | ||
args = parser.parse_args() | ||
|
||
scraper = DataScraper(max_pages=args.pages) | ||
scraper.download_and_split_images() | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
Oops, something went wrong.