jadechoghari commited on
Commit
79cf2c7
1 Parent(s): 1b15d03

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -4
README.md CHANGED
@@ -24,7 +24,6 @@ Segment Anything Model (SAM) has emerged as a transformative approach in image s
24
 
25
  Our method leverages the pre-trained SAM model with only marginal parameter increments and computational requirements. The additional parameters of RobustSAM can be optimized within 30 hours on eight GPUs, demonstrating its feasibility and practicality for typical research laboratories. We also introduce the Robust-Seg dataset, a collection of 688K image-mask pairs with different degradations designed to train and evaluate our model optimally. Extensive experiments across various segmentation tasks and datasets confirm RobustSAM's superior performance, especially under zero-shot conditions, underscoring its potential for extensive real-world application. Additionally, our method has been shown to effectively improve the performance of SAM-based downstream tasks such as single image dehazing and deblurring.
26
 
27
- <img width="1096" alt="image" src="figures/architecture.jpg">
28
 
29
  **Disclaimer**: Content from **this** model card has been written by the Hugging Face team, and parts of it were copy pasted from the original [SAM model card](https://github.com/facebookresearch/segment-anything).
30
 
@@ -46,8 +45,8 @@ import requests
46
  from transformers import AutoProcessor, AutoModelForMaskGeneration
47
 
48
  # load the RobustSAM model and processor
49
- processor = AutoProcessor.from_pretrained("jadechoghari/robustsam-vit-base")
50
- model = AutoModelForMaskGeneration.from_pretrained("jadechoghari/robustsam-vit-base")
51
 
52
  # load an image from a url
53
  img_url = "https://huggingface.co/ybelkada/segment-anything/resolve/main/assets/car.png"
@@ -83,7 +82,7 @@ The pipeline is made for automatic mask generation. The following snippet demons
83
  from transformers import pipeline
84
 
85
  # initialize the pipeline for mask generation
86
- generator = pipeline("mask-generation", model="jadechoghari/robustsam-vit-base", device=0, points_per_batch=256)
87
 
88
  image_url = "https://huggingface.co/ybelkada/segment-anything/resolve/main/assets/car.png"
89
  outputs = generator(image_url, points_per_batch=256)
@@ -120,6 +119,8 @@ plt.axis("off")
120
  plt.show()
121
  ```
122
 
 
 
123
  ## Comparison of computational requirements
124
  <img width="720" alt="image" src='figures/Computational requirements.PNG'>
125
 
 
24
 
25
  Our method leverages the pre-trained SAM model with only marginal parameter increments and computational requirements. The additional parameters of RobustSAM can be optimized within 30 hours on eight GPUs, demonstrating its feasibility and practicality for typical research laboratories. We also introduce the Robust-Seg dataset, a collection of 688K image-mask pairs with different degradations designed to train and evaluate our model optimally. Extensive experiments across various segmentation tasks and datasets confirm RobustSAM's superior performance, especially under zero-shot conditions, underscoring its potential for extensive real-world application. Additionally, our method has been shown to effectively improve the performance of SAM-based downstream tasks such as single image dehazing and deblurring.
26
 
 
27
 
28
  **Disclaimer**: Content from **this** model card has been written by the Hugging Face team, and parts of it were copy pasted from the original [SAM model card](https://github.com/facebookresearch/segment-anything).
29
 
 
45
  from transformers import AutoProcessor, AutoModelForMaskGeneration
46
 
47
  # load the RobustSAM model and processor
48
+ processor = AutoProcessor.from_pretrained("jadechoghari/robustsam-vit-large")
49
+ model = AutoModelForMaskGeneration.from_pretrained("jadechoghari/robustsam-vit-large")
50
 
51
  # load an image from a url
52
  img_url = "https://huggingface.co/ybelkada/segment-anything/resolve/main/assets/car.png"
 
82
  from transformers import pipeline
83
 
84
  # initialize the pipeline for mask generation
85
+ generator = pipeline("mask-generation", model="jadechoghari/robustsam-vit-large", device=0, points_per_batch=256)
86
 
87
  image_url = "https://huggingface.co/ybelkada/segment-anything/resolve/main/assets/car.png"
88
  outputs = generator(image_url, points_per_batch=256)
 
119
  plt.show()
120
  ```
121
 
122
+ <img width="1096" alt="image" src="figures/architecture.jpg">
123
+
124
  ## Comparison of computational requirements
125
  <img width="720" alt="image" src='figures/Computational requirements.PNG'>
126