segment_anything

  • Descriptif :

SA-1B Télécharger

Segment Anything 1 Billion (SA-1B) est un ensemble de données conçu pour former des modèles de segmentation d'objets à usage général à partir d'images du monde ouvert. L'ensemble de données a été présenté dans l'article "Segment Anything" .

L'ensemble de données SA-1B se compose de 11 millions d'images diverses, haute résolution, sous licence et protégeant la confidentialité, ainsi que de 1,1 milliard d'annotations de masque. Les masques sont donnés au format RLE (Run-Length Encoding) COCO et n'ont pas de classes.

La licence est personnalisée. Veuillez lire les termes et conditions complets sur https://ai.facebook.com/datasets/segment-anything-downloads

Toutes les fonctionnalités sont dans l'ensemble de données d'origine sauf image.content (contenu de l'image).

Vous pouvez décoder les masques de segmentation avec :

import tensorflow_datasets as tfds

pycocotools = tfds.core.lazy_imports.pycocotools

ds = tfds.load('segment_anything', split='train')
for example in tfds.as_numpy(ds):
  segmentation = example['annotations']['segmentation']
  for counts, size in zip(segmentation['counts'], segmentation['size']):
    encoded_mask = {'size': size, 'counts': counts}
    mask = pycocotools.decode(encoded_mask)  # np.array(dtype=uint8) mask
    ...
Diviser Exemples
'train' 11 185 362
  • Structure des fonctionnalités :
FeaturesDict({
    'annotations': Sequence({
        'area': Scalar(shape=(), dtype=uint64),
        'bbox': BBoxFeature(shape=(4,), dtype=float32),
        'crop_box': BBoxFeature(shape=(4,), dtype=float32),
        'id': Scalar(shape=(), dtype=uint64),
        'point_coords': Tensor(shape=(1, 2), dtype=float64),
        'predicted_iou': Scalar(shape=(), dtype=float64),
        'segmentation': FeaturesDict({
            'counts': string,
            'size': Tensor(shape=(2,), dtype=uint64),
        }),
        'stability_score': Scalar(shape=(), dtype=float64),
    }),
    'image': FeaturesDict({
        'content': Image(shape=(None, None, 3), dtype=uint8),
        'file_name': string,
        'height': uint64,
        'image_id': uint64,
        'width': uint64,
    }),
})
  • Documentation des fonctionnalités :
Fonctionnalité Classe Forme Type D Description
FonctionnalitésDict
annotations Séquence
annotations/zone Scalaire uint64 La zone en pixels du masque.
annotations/bbox Fonctionnalité BBox (4,) flotteur32 Le cadre autour du masque, au format TFDS.
annotations/crop_box Fonctionnalité BBox (4,) flotteur32 Le recadrage de l'image utilisée pour générer le masque, au format TFDS.
annotations/identifiant Scalaire uint64 Identifiant de l'annotation.
annotations/point_coords Tenseur (1, 2) flotteur64 Les coordonnées du point entrées dans le modèle pour générer le masque.
annotations/predicted_iou Scalaire flotteur64 La propre prédiction du modèle sur la qualité du masque.
annotations/segmentation FonctionnalitésDict Masque de segmentation encodé au format COCO RLE (dict avec size et counts clés).
annotations/segmentation/comptes Tenseur chaîne
annotations/segmentation/taille Tenseur (2,) uint64
annotations/stabilité_score Scalaire flotteur64 Une mesure de la qualité du masque.
image FonctionnalitésDict
image/contenu Image (Aucun, Aucun, 3) uint8 Contenu de l'image.
image/nom_fichier Tenseur chaîne
hauteur de l'image Tenseur uint64
image/image_id Tenseur uint64
Largeur de l'image Tenseur uint64
@misc{kirillov2023segment,
  title={Segment Anything},
  author={Alexander Kirillov and Eric Mintun and Nikhila Ravi and Hanzi Mao and Chloe Rolland and Laura Gustafson and Tete Xiao and Spencer Whitehead and Alexander C. Berg and Wan-Yen Lo and Piotr Dollár and Ross Girshick},
  year={2023},
  eprint={2304.02643},
  archivePrefix={arXiv},
  primaryClass={cs.CV}
}