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
Copy file name to clipboardExpand all lines: README.md
+41Lines changed: 41 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -95,6 +95,47 @@ Click the links below to download the checkpoint for the corresponding model typ
95
95
*`vit_l`: [ViT-L SAM model.](https://dl.fbaipublicfiles.com/segment_anything/sam_vit_l_0b3195.pth)
96
96
*`vit_b`: [ViT-B SAM model.](https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth)
97
97
98
+
## Dataset
99
+
See [here](https://ai.facebook.com/datasets/segment-anything/) for an overview of the datastet. The dataset can be downloaded [here](https://ai.facebook.com/datasets/segment-anything-downloads/). By downloading the datasets you agree that you have read and accepted the terms of the SA-1B Dataset Research License.
100
+
101
+
We save masks per image as a json file. It can be loaded as a dictionary in python in the below format.
102
+
103
+
104
+
```python
105
+
{
106
+
"image" : image_info,
107
+
"annotations" : [annotation],
108
+
}
109
+
110
+
image_info {
111
+
"image_id" : int, # Image id
112
+
"width" : int, # Image width
113
+
"height" : int, # Image height
114
+
"file_name" : str, # Image filename
115
+
}
116
+
117
+
annotation {
118
+
"id" : int, # Annotation id
119
+
"segmentation" : dict, # Mask saved in COCO RLE format.
120
+
"bbox" : [x, y, w, h], # The box around the mask, in XYWH format
121
+
"area" : int, # The area in pixels of the mask
122
+
"predicted_iou" : float, # The model's own prediction of the mask's quality
123
+
"stability_score" : float, # A measure of the mask's quality
124
+
"crop_box" : [x, y, w, h], # The crop of the image used to generate the mask, in XYWH format
125
+
"point_coords" : [[x, y]], # The point coordinates input to the model to generate the mask
126
+
}
127
+
```
128
+
129
+
Image ids can be found in sa_images_ids.txt which can be downloaded using the above [link](https://ai.facebook.com/datasets/segment-anything-downloads/) as well.
See [here](https://github.com/cocodataset/cocoapi/blob/master/PythonAPI/pycocotools/mask.py) for more instructions to manipulate masks stored in RLE format.
137
+
138
+
98
139
## License
99
140
The model is licensed under the [Apache 2.0 license](LICENSE).
0 commit comments