Code Monkey home page Code Monkey logo

breast-cancer-detection's Introduction

Breast-Cancer-Detection

Overview

Among many cancers, breast cancer is the second most common cause of death in women. Early detection and early treatment reduce breast cancer mortality. Mammography plays an important role in breast cancer screening because it can detect early breast masses or calcification regions.

Signs of Breast Cancer:

1. Weight loss

2. Skin changes

3. Pain

4. Breast changes

This project uses mammograms for breast cancer detection using deep learning techniques.

For the diagnosis of breast cancer doctors often use additional tests to find or diagnose breast cancer. A mammogram is an X-ray picture of the breast. Doctors use a mammogram to look for early signs of breast cancer. Regular mammograms are the best tests doctors have to find breast cancer early, sometimes up to three years before it can be felt. A mammogram shows how dense the breasts are. Women with dense breasts have a higher risk of getting breast cancer.

Dataset

The dataset contains breast mammography images(224,224,3). With labels of:

1. Density

The levels of density are: A: (1) Almost entirely fatty indicates that the breasts are almost entirely composed of fat. About 1 in 10 women has this result. B: (2) Scattered areas of fibroglandular density indicates there are some scattered areas of density, but the majority of the breast tissue is nondense. About 4 in 10 women have this result. C: (3) Heterogeneously dense indicates that there are some areas of nondense tissue, but that the majority of the breast tissue is dense. About 4 in 10 women have this result. D: (4) Extremely dense indicates that nearly all of the breast tissue is dense. About 1 in 10 women has this result.

2. Tumour

A: Benign (noncancerous) B: Malignant (cancerous)

Training Images for each Class

Benign

alt text

Malignant

alt text

Image Processing

Since the mammograms looks blury and dull, image preprocessing has been done to increase the sharpness and contrast of the image. atl text

Why Deep-Learning?

AI system studying X-ray mammograms was shown to be better than human experts when it came to predicting whether or not a patient has breast cancer. More specifically, the model was found to be as good as two doctors looking at the images, and better at spotting cancer than a single doctor, while also reducing the number of “false-negative” results. Such systems will never replace medical staff, but would serve as an extra set of eyes, while also being able to work 24/7 without getting tired or making mistakes.

Model Deployment using Gradio

!git clone https://github.com/hrsht-13/Breast-Cancer-Detection.git

%cd Breast-Cancer-Detection/

pip install -r requirements.txt

!python app.py

Open the link to use the app

App Display

1. Web Page

atl text

2. Prediction

atl text

3. Prediction after cropping image (in the app itself)

atl text

Author

breast-cancer-detection's People

Contributors

hrsht-13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

breast-cancer-detection's Issues

Corrupt App.py File

I hope this email finds you well. I encountered an issue with the main file (app.py) of our Breast Cancer Detection project. It seems that the file is corrupt and showing the following error:-
Traceback (most recent call last):
File "app.py", line 4, in
from weights import download_weights
File "E:\PROJECT2\Breast-Cancer-Detection\weights.py", line 1, in
from google_drive_downloader import GoogleDriveDownloader as gdd
ModuleNotFoundError: No module named 'google_drive_downloader'

dataset

i want to know where is the csv files that you used in the code when you imported from the drive .

Issue with app.py

Hi,
the app.py is working, but the cancer results are always the same for different images. Can you please help us in resolving the issue.

density2_malignant
desity4_benign

Help with the Breast-Cancer-Detection weights file

Hi there, I'm a graduate student and my assignment is to use a pretrained model to evaluate an image, after loading and preprocessing it. Your code is great, except I can't access the weights file properly. (I have verified that I downloaded it and the file exists, etc.) Is it possible to send me a copy of the weights file directly? IF so, I would really appreciate! Or I can email you directly. Thanks very much! PlainJanePeck

ImportError: cannot import name 'ParamSpec' from 'typing_extensions'

(env) root@felipe:~/Breast-Cancer-Detection# python3 app.py                     2022-06-05 06:05:49.297118: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2022-06-05 06:05:49.297168: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
  File "app.py", line 7, in <module>
	import gradio as gr
  File "/root/Breast-Cancer-Detection/env/lib/python3.8/site-packages/gradio/__init__.py", line 3, in <module>
	import gradio.components as components
  File "/root/Breast-Cancer-Detection/env/lib/python3.8/site-packages/gradio/components.py", line 28, in <module>
	from gradio.blocks import Block
  File "/root/Breast-Cancer-Detection/env/lib/python3.8/site-packages/gradio/blocks.py", line 14, in <module>
	from fastapi.concurrency import run_in_threadpool
  File "/root/Breast-Cancer-Detection/env/lib/python3.8/site-packages/fastapi/__init__.py", line 7, in <module>
	from .applications import FastAPI as FastAPI
  File "/root/Breast-Cancer-Detection/env/lib/python3.8/site-packages/fastapi/applications.py", line 15, in <module>
	from fastapi import routing
  File "/root/Breast-Cancer-Detection/env/lib/python3.8/site-packages/fastapi/routing.py", line 22, in <module>
	from fastapi.datastructures import Default, DefaultPlaceholder
  File "/root/Breast-Cancer-Detection/env/lib/python3.8/site-packages/fastapi/datastructures.py", line 3, in <module>
	from starlette.datastructures import URL as URL  # noqa: F401
  File "/root/Breast-Cancer-Detection/env/lib/python3.8/site-packages/starlette/datastructures.py", line 7, in <module>
	from starlette.concurrency import run_in_threadpool
  File "/root/Breast-Cancer-Detection/env/lib/python3.8/site-packages/starlette/concurrency.py", line 11, in <module>
	from typing_extensions import ParamSpec
ImportError: cannot import name 'ParamSpec' from 'typing_extensions' (/root/Breast-Cancer-Detection/env/lib/python3.8/site-packages/typing_extensions.py)

how can show all tags?

SNAG-0896

class_name=['Benigno con densidad=1','Maligno con densidad=1','Benigno con densidad=2','Maligno con densidad=2','Benigno con densidad=3','Maligno con densidad=3','Benigno con densidad=4','Maligno con densidad=4']

is not showing density and number completly

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.