You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. Replace `qupath-extension-sam-x.y.z.jar` with [the latest version of the extension file](https://github.com/ksugar/qupath-extension-sam/releases/download/v0.3.0/qupath-extension-sam-0.3.0.jar).
27
+
2. Replace `qupath-extension-sam-x.y.z.jar` with [the latest version of the extension file](https://github.com/ksugar/qupath-extension-sam/releases/download/v0.4.0/qupath-extension-sam-0.4.0.jar).
28
28
3. Restart QuPath application.
29
29
30
-
Please note that you need to also update the [samapi](https://github.com/ksugar/samapi/tree/v0.3.0) server.
30
+
Please note that you need to also update the [samapi](https://github.com/ksugar/samapi/tree/v0.4.0) server.
31
31
To keep updated with the latest samapi server, follow the instructions [here](https://github.com/ksugar/samapi#update).
32
32
33
33
## Usage
@@ -36,18 +36,20 @@ To keep updated with the latest samapi server, follow the instructions [here](ht
36
36
37
37
#### Rectangle (BBox) prompt
38
38
39
-
1. Select `Extensions` > `SAM` > `SAM prompt` from the menu bar.
40
-
2. Select a rectangle tool by clicking the icon.
41
-
3. Add rectangles.
42
-
4. Select rectangles to process. (`Alt` + `Ctrl` + `A`: Select all annotation objects `Ctrl` or `⌘` + left click: Select multiple objects)
43
-
5. Press the `Run for selected` button.
44
-
6. If you activate `Live mode`, SAM predicts a mask every time you add a rectangle.
39
+
1. Select `Extensions` > `SAM` from the menu bar.
40
+
2. Select the `Prompt` tab in the `Segment Anyghing Model` dialog.
41
+
3. Select a rectangle tool by clicking the icon.
42
+
4. Add rectangles.
43
+
5. Select rectangles to process. (`Alt` + `Ctrl` + `A`: Select all annotation objects `Ctrl` or `⌘` + left click: Select multiple objects)
44
+
6. Press the `Run for selected` button.
45
+
7. If you activate `Live mode`, SAM predicts a mask every time you add a rectangle.
| SAM type | One of `vit_h (huge)`, `vit_l (large)`, `vit_b (base)`, or `vit_t (mobile)`. |
67
+
| SAM weights | The SAM weights to use. The options are automatically fetched from the server. |
64
68
| Output type | If `Single Mask` is selected, the model will return single masks per prompt. If `Multi-mask` is selected, the model will return three masks per prompt. `Multi-mask (all)` keeps all three masks. One of the three masks is kept if the option `Multi-mask (largest)`, `Multi-mask (smallest)`, or `Multi-mask (best quality)` is selected. |
65
69
| Display names | Display the annotation names in the viewer. (this is a global preference) |
66
70
| Assign random colors | If checked and no path class is set in `Auto set` setting, assign random colors to new (unclassified) objects created by SAM. |
@@ -70,14 +74,18 @@ To keep updated with the latest samapi server, follow the instructions [here](ht
70
74
71
75
### SamAutomaticMaskGenerator
72
76
73
-
Select `Extensions` > `SAM` > `SAM auto mask` from the menu bar.
77
+
1. Select `Extensions` > `SAM` from the menu bar.
78
+
2. Select the `Auto mask` tab in the `Segment Anyghing Model` dialog.
| SAM model | One of `vit_h (huge)`, `vit_l (large)`, `vit_b (base)`, or `vit_t (mobile)`. |
87
+
| SAM type | One of `vit_h (huge)`, `vit_l (large)`, `vit_b (base)`, or `vit_t (mobile)`. |
88
+
| SAM weights | The SAM weights to use. The options are automatically fetched from the server. |
81
89
| Assign random colors | If checked and no path class is set in `Auto set` setting, assign random colors to new (unclassified) objects created by SAM. |
82
90
| Assign names | If checked, assign names to identify new objects as created by SAM, including quality scores. |
83
91
| Keep prompts | If checked, keep the foreground prompts after detection. If not checked, these are deleted. |
@@ -95,6 +103,22 @@ Select `Extensions` > `SAM` > `SAM auto mask` from the menu bar.
95
103
| min_mask_region_area | If >0, postprocessing will be applied to remove disconnected regions and holes in masks with area smaller than min_mask_region_area. Requires opencv. |
96
104
| output_type | If 'Single Mask' is selected, the model will return single masks per prompt. If 'Multi-mask' is selected, the model will return three masks per prompt. 'Multi-mask (all)' keeps all three masks. One of the three masks is kept if the option 'Multi-mask (largest)', 'Multi-mask (smallest)', or 'Multi-mask (best quality)' is selected. |
97
105
| include_image_edge | If True, include a crop area at the edge of the original image. |
106
+
### Register SAM weights from URL
107
+
108
+
1. Select `Extensions` > `SAM` from the menu bar.
109
+
2. Press the `Register` button in the `Segment Anyghing Model` dialog.
The weights file is downloaded from the URL and registered on the server. After the registration, you can select the weights from the `SAM weights` dropdown menu.
| SAM type | One of `vit_h (huge)`, `vit_l (large)`, `vit_b (base)`, or `vit_t (mobile)`. |
120
+
| Name | The SAM weights name to register. It needs to be unique in the same SAM type. |
121
+
| URL | The URL to the SAM weights file. |
98
122
99
123
### Tips
100
124
@@ -104,6 +128,9 @@ If you select a class in `Auto set` in the Annotations tab, it is used for a new
104
128
105
129
## Updates
106
130
131
+
### v0.4.0
132
+
- Support for registering SAM weights from URL. [ksugar/qupath-extension-sam#8](https://github.com/ksugar/qupath-extension-sam/issues/8)[ksugar/samapi#11](https://github.com/ksugar/samapi/pull/11) by [@constantinpape](https://github.com/constantinpape)
133
+
107
134
### v0.3.0
108
135
109
136
- Support for both point and rectangle foreground prompts by [@petebankhead](https://github.com/petebankhead)
0 commit comments