Revolutionary breast cancer detection online.
Our project revolves around the development of a cutting-edge breast cancer detection website. Harnessing the power of Convolutional Neural Networks (CNN), the platform is designed to analyze medical images, specifically those of breast tissue, with the goal of swiftly and accurately identifying potential tumors. This technological innovation has the potential to significantly improve the early detection of breast cancer, offering a valuable tool for individuals alike.
The primary purpose of our project is to contribute to the early detection of breast cancer, a crucial factor in improving patient outcomes. By leveraging advanced algorithms, we aim to automate the analysis of breast tumor characteristics, classifying them as malignant, benign, or normal. Our goals include providing a user-friendly platform that simplifies the detection process, ensuring accessibility for the general public. Through this project, we aspire to make a meaningful impact on the efficiency and accuracy of breast cancer diagnosis, ultimately leading to better prognosis and timely medical interventions.
- Go to https://git.chalmers.se/courses/dit826/2023/group1/dit826-group1-part2
- Clone the project into a directory of your choosing using either SSH or HTTPS
- To run the project, open the project on terminal and run the following steps:
cd projectOne
python manage.py runserver
- Operating System: Windows 10, macOS 10.14, Ubuntu 18.04 LTS, or a compatible OS
- Processor: Dual-core processor, 2.0 GHz
- RAM: 4 GB
- Storage: 20 GB available space
- Internet Connection: Required for initial setup and updates
- Operating System: Windows 10, macOS 10.15, Ubuntu 20.04 LTS, or a compatible OS
- Processor: Quad-core processor, 3.0 GHz
- RAM: 8 GB or higher
- Storage: 50 GB available space (SSD recommended for faster performance)
- Graphics: Dedicated graphics card with 2 GB VRAM
- Internet Connection: Required for regular updates and access to online features
- Python 3.8 or higher
- Docker (optional, for containerized deployment)
-
Django and Web Framework:
- Django==4.2.7
- django-environ>=0.7,<1.0
- django-bootstrap-v5==1.0.11
- django-bootstrap5
- djangorestframework-simplejwt
- djangorestframework
- django-cors-headers
-
Model Dependencies:
- cppimport
- pybind11
- seaborn
- scikit-learn
- numpy
- pandas
- matplotlib
- eli5
- pydot
- tensorflow
- opencv-python
To ensure smooth execution of the project, follow these steps:
-
Install Python and pip: Make sure you have Python and pip installed on your system.
-
Create a Virtual Environment: It's recommended to use a virtual environment to isolate your project dependencies. Run the following commands:
python -m venv venv source venv/bin/activate #On Windows, use `venv\Scripts\activate`
-
Install Dependencies: Install the required Python packages using pip:
pip install -r requirements.txt
-
Database Migrations (Django Only): If you're using Django, perform the database migrations:
python manage.py migrate
-
Now you're all set! Your environment should be ready to run the project smoothly.
-
Head over to our website
-
On the main page click on LOGIN button if you already have an account, otherwise REGISTER yourself
-
On the prediction page, click on the
choose file
to upload your ultrasonic picture of your breast (.png) and the click onshow result
to see the result Our website provides Explainable AI, enhancing the clarity of prediction outcomes for a deeper understanding of situations. This involves presenting an array with three distinct classifications. Our objective is to elucidate the decision-making process of the model, ensuring that each prediction is accompanied by an explanation. As seen in the displayed image, the highlighted yellow area indicates the prediction identified as malignant (High Risk). -
On the user dashboard page, you can view the upload history of your images, including associated date and corresponding results Clicking on the pink box on the left side of the page will navigate you to the prediction page, allowing you to upload additional images
On the admin dashboard page, administrators have three options that contribute to model retraining, ultimately enhancing model accuracy. Additionally, the administrator can choose the model to operate with.
-
Upload image(s): On the left side, you have the option to upload images. Images can be uploaded either in batches or as individual files. If you choose to upload a batch of images, they should be in the form of zip files. For single-image uploads, ensure the image is in the PNG file format
NOTE: The zip file you wish to upload must contain PNG files exclusively. If there are any other image formats inside, the website will only unzip the PNG files and proceed with the upload.
-
Retrain: After uploading images, in the middle section of the page, the admin can choose to click on 'Retrain' the model.
-
Table of models: You can explore various models and select one based on your preference, also viewing each model's accuracy.
The project primarily comprises two components: cnnModel, responsible for designing the model and handling training and prediction, and groupOneApp, where the database structure, frontend, and backend of the website are defined.
In the image provided, you will discover our database design, illustrating the relationships between entities. This offers a comprehensive overview of the project.
- Go to our Google Drive and download
kaggle_image_data.zip
inside kaggle_image_data folder - Navigate to the project and create a folder named kaggle_image_data within the projectOne > cnnModel directory
- Extract the contents of the zip file. Upon extraction, you will find three distinct directories: Malignant, Benign, Normal. Move these directories into the folder
kaggle_image_data
recently established withinprojectOne > cnnModel
-
here you can install the gcloud cli tool required to access gcloud from the terminal
-
here you can install kubectl, and it provides guidance on all the necessary installations required for using kubectl with the cluster
-
Sign into gcloud with
gcloud init
- Please make sure the administrator has added you to the cluster so that you can select the correct project for cluster access
- Navigate to the Google Cloud dashboard and locate the deployed pod
- Use
kubectl get pods
and take the name displayed in the cmd line
-
kubectl exec -it POD-NAME -- /bin/bash -c "cd /projectOne && python manage.py createsuperuser"
-
When inside the base directory (dit-group1-part2/)
cd projectOne/cnnModel && kubectl cp kaggle_image_data POD-NAME:/projectOne/cnnModel/kaggle_image_data
-
Connecting to the pod lets you check files, upload files and transfer files to local machines
kubectl exec -it POD-NAME -- bash -c "cd /projectOne && /bin/bash"
-
kubectl get pods | grep -e "Running" | awk '{print $1}'
In the prerequisites, it demonstrates the process of logging into gcloud and installing kubectl.
In Kubernetes, applications reside in temporary units called pods, each getting a new IP address when launched. These pods are regularly recreated during updates. Without Kubernetes service, keeping track of pod IP addresses would be challenging, especially as our application scales up, risking downtime.
Kubernetes service simplifies this by creating an abstraction that represents one or more pods. Other applications can access the service using its name, eliminating the need to know individual pod IP addresses. External users can also access these services if they are publicly exposed on the internet.
Excerpt From https://www.densify.com/kubernetes-autoscaling/kubernetes-service-load-balancer/
After checking kubectl get pods
you can find the name of the current pod and using kubectl delete POD-NAME
it will delete the pod and kuberenetes will re-pull the image and re-deploy the new image.
Another way to re-deploy is to create a tag with the schema: v1 where the numbering depends on the developer. This will invoke the deploy stage in the gilab-ci and do the steps mentioned above automatically as well as re-building the image to the container registry.
If you have any technical or general questions, suggestions, or concerns about the project, feel free to contact the project developers via email.
- AGATA CIUCHTA - gusciuag@student.gu.se
- BARDIA FOROORAGHI - gusforoba@student.gu.se
- GEORG ZSOLNAI - guszsoge@student.gu.se
- JOHN CHRISTOPHER WEBB - guswebbjo@student.gu.se
- SEJAL ULHAS KANASKAR - guskanase@student.gu.se