|
--- |
|
license: apache-2.0 |
|
language: |
|
- en |
|
library_name: transformers |
|
pipeline_tag: image-segmentation |
|
tags: |
|
- medical |
|
- segmentation |
|
datasets: |
|
- nielsr/breast-cancer |
|
--- |
|
|
|
## Description : |
|
|
|
**Breast cancer segmentation** is the task of identifying and segmenting the breast tumor region in **medical images**, |
|
such as mammograms and ultrasound images. This is an important task in the diagnosis and treatment of breast cancer, |
|
as it helps clinicians to better understand the extent of the disease and plan appropriate interventions. |
|
|
|
**The Segment Anything Model (SAM)** is a state-of-the-art deep learning model for image segmentation. |
|
SAM is a vision transformer-based model that has been shown to achieve excellent performance on a |
|
variety of natural image segmentation tasks. |
|
|
|
## Base Model: |
|
|
|
**The Segment Anything Model (SAM)** produces high-quality object masks from input prompts such as points or boxes, |
|
and it can be used to generate masks for all objects in an image. It has been trained on a dataset of 11 million |
|
images and 1.1 billion masks and has strong zero-shot performance on a variety of segmentation tasks. |
|
**https://github.com/facebookresearch/segment-anything** |
|
|
|
|
|
## Get Started with the Model |
|
``` python |
|
device = "cuda" if torch.cuda.is_available() else "cpu" |
|
processor = SamProcessor.from_pretrained("wanglab/medsam-vit-base") |
|
model = SamModel.from_pretrained("ayoubkirouane/Breast-Cancer_SAM_v1").to(device) |
|
``` |