/ Модель

Характеристики

Лицензия
Своя лицензия
Библиотека
onnx
Опубликована
7 окт 2026

OpenSfM

Сегментация изображенийИзображение → mask3 профессии

Набор экспортированных моделей SAM 3 и LaMa для сегментации изображений по текстовым подсказкам и заполнения удалённых объектов в фотограмметрическом конвейере OpenSfM.

39скачиваний за 30 дней0лайковвеса обновлены19 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Репозиторий YanNoun/OpenSfM содержит модели, которые OpenSfM загружает по запросу для сегментации изображений и восстановления областей ортофотопланов. В семейство SAM 3 входят экспортированные из официального чекпойнта Meta текстово-направляемые модели сегментации: текстовые подсказки задают классы таксономии, а изображения могут быть наземными, вертикальными или наклонными аэрофотоснимками. В семейство также входит big-Lama для заполнения замаскированных областей изображения.

Модели экспортированы в ONNX и Core ML. SAM 3 принимает изображения размером 1008 × 1008 и текстовые подсказки, а LaMa обрабатывает 512 × 512 фрагменты и маску областей для заполнения. Набор предназначен для этапов сегментации и удаления объектов в фотограмметрическом конвейере OpenSfM; README приводит замеры скорости и сравнения с исходными реализациями на конкретном оборудовании, которые не гарантируют такую же производительность на других устройствах.

Для SAM 3 действует лицензия SAM License, которую README требует сохранять при распространении; LaMa распространяется по Apache-2.0. Метаданные указывают лицензию репозитория как other, поэтому условия использования отдельных семейств следует проверять по соответствующим файлам лицензий.

Сценарии применения

  • сегментация зданий и крыш на аэрофотоснимках по текстовым меткам
  • создание карт классов для наземных и наклонных снимков
  • удаление автомобилей и их теней с ортофотопланов
  • восстановление замаскированных областей ортофотоснимка

Ограничения

SAM 3 рассчитана на входные изображения 1008 × 1008, а LaMa — на фрагменты 512 × 512; результаты и производительность зависят от реализации и оборудования. Лицензии у семейств различаются: SAM License для SAM 3 и Apache-2.0 для LaMa.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

OpenSfM models

Models used by OpenSfM at run time, downloaded on demand. Each family lives in its own folder with its licence (sam3/: SAM License, lama/: Apache-2.0); manifest.json at the root lists every file with its size, SHA-256 and interface, and OpenSfM pins a revision of this repository.

sam3/: text-prompted semantic segmentation

Meta's SAM 3 (Segment Anything with Concepts), exported for OpenSfM's segment step: images, from street level to nadir and oblique aerial, are labelled with the classes of a taxonomy, each class being a list of text prompts ("building", "roof", ...). The models are independent of the taxonomy: the text embeddings are an input, computed once per prompt.

Derived from the official SAM 3 checkpoint (sam3.pt) and distributed under the SAM License (sam3/LICENSE), which must accompany any redistribution.

Files

FileRole
onnx/sam3-image-encoder-1008-fp16.onnx (+ .onnx.data)Image encoder. pixel_values [1,3,1008,1008] fp16 (RGB / 255, mean 0.5, std 0.5) → fpn_feat_0..2 [1,256,288²/144²/72²] (+ constant fpn_pos_0..2)
onnx/sam3-text-encoder-ctx32-fp16.onnxText encoder. input_ids [N,32] int64 (CLIP BPE, start 49406, end 49407, padded with 0), attention_mask [N,32] int64 → text_features [32,N,256], text_mask [N,32] bool (True = padding)
onnx/sam3-decoder-1008-p16-top64-fp16.onnxPrompted decoder, 16 prompt slots (pad by repeating a prompt). fpn_feat_0..2, text_features [32,16,256], text_mask [16,32] bool → prompt_scores [16,288,288] (per prompt: max over the detections of score × mask, and the semantic map × presence), scores [16,200], boxes [16,200,4] (cx, cy, w, h normalised)
onnx/sam3-decoder-1008-p16-top64-inst-fp16.onnxPrompted decoder with instances (used by OpenSfM since this revision): as above, but → prompt_scores [16,288,288], instance_index [16,288,288] (per prompt and pixel, the detection 0..63 whose mask wins the pixel, -1: none), instance_scores [16,64] (the 64 best detections' scores, 0 below 0.3), instance_boxes [16,64,4] (cx, cy, w, h normalised)
coreml/sam3-image-encoder-1008-fp16.mlpackageImage encoder, Core ML ML program (macOS 15+); same interface, outputs fpn_feat_0..2
coreml/sam3-decoder-1008-p16-top64-fp16.mlpackagePrompted decoder, Core ML; as the ONNX one with text_mask as fp16 (1 = padding)
coreml/sam3-decoder-1008-p16-top64-inst-fp16.mlpackagePrompted decoder with instances, Core ML; as the ONNX one with text_mask as fp16
embeddings/sam3-text-ctx32-fp16.npzPrecomputed prompts: prompts [N], features [N,32,256], mask [N,32]
tokenizer/sam3-clip-bpe-tokenizer.jsonCLIP BPE tokenizer (Hugging Face tokenizers)

Naming: <model>-<component>-<input size>[-<variant>]-<precision>.<format> (p16: 16 prompt slots, top64: masks computed for the 64 best detections per prompt, inst: instance outputs, ctx32: 32 text tokens).

Export

Exported with the Ultralytics SAM 3 implementation and the export patches of greenjava/sam3-onnx, plus: 1008 px input, the per-prompt score maps merged in the graph, masks for the 64 best detections only, window partitioning and mask products rewritten for Core ML (rank ≤ 5, matmul), opset 18. The Core ML encoder is ONNX Runtime's ML-program conversion with its constants moved to the weight blob; the Core ML decoder is converted from PyTorch with coremltools. The inst decoders select the 64 best detections with a one-hot matmul over the detections' ranks rather than topk, whose indices come out wrong on Apple GPUs (the older decoders lose detections there).

On an Apple M5 Pro (Core ML, CPU + GPU): encoder 0.42 s and decoder 0.8 s per image; label maps agree with the PyTorch reference (transformers Sam3Model, 1008 px) on ~97% of the pixels.

The ONNX decoders then have their large attentions computed by query chunks (tools/chunk_attention.py <in> <out> 16 scan): the fusion encoder's six image self-attentions, [16 prompts × 8 heads, 5184, 5184] score matrices (6.4 GiB each in fp16), run as a Scan over 16 chunks of 324 queries, one chunk's scores at a time, the query scale inside the loop. Softmax normalises each query on its own, so this is exact: the outputs are bit-identical to the unchunked graph on ONNX Runtime CUDA (1.31.1), with standard operators only. Decoder memory on an RTX 5090 (ONNX Runtime CUDA, arena grown as requested, no memory pattern): ~15 GB → ~7 GB (~25 GB → ~7 GB with ONNX Runtime's defaults), 211 ms per decode (221 ms before); on the CPU it now runs in ~12 GB of RAM (over 24 GB before). The Core ML decoders are unchanged.

lama/: inpainting, for object removal in the orthophoto

LaMa (Resolution-robust Large Mask Inpainting with Fourier Convolutions, Suvorov et al., WACV 2022), the big-lama checkpoint, used by OpenSfM to fill the pixels of removed objects (vehicles and their shadows) in orthophotos: 512 × 512 crops of the orthophoto, every pixel to fill masked at once.

Distributed under the Apache License 2.0 (lama/LICENSE), the licence of the LaMa code and released checkpoints. The checkpoint was trained by its authors on Places2.

Files

FileRole
onnx/big-lama-512-fp32.onnxInpainter. image [1,3,512,512] float32 (RGB / 255), mask [1,1,512,512] float32 (1 = pixel to fill) → output [1,3,512,512] float32 (RGB in [0,1]; outside the mask, the input image)
coreml/big-lama-512-fp16.mlpackageInpainter, Core ML ML program (macOS 15+), fp16; same interface

Export

Both from the big-lama TorchScript checkpoint (big-lama.pt, SHA-256 344c77bb…9ea9), traced at 512 px:

  • ONNX (opset 17): the traced graph as is, its Fourier units' rfftn / irfftn (2D, ortho norm) exported as exact DFT matrix products, complex values as a trailing axis of 2. The graph has standard operators only (no DFT), so every ONNX Runtime execution provider runs it. Matches PyTorch to < 0.01 / 255.
  • Core ML: converted from PyTorch with coremltools (native FFT operators), fp16. Matches PyTorch to 0.8 / 255 on average inside the masks.

On an Apple M5 Pro, per 512 crop: Core ML (CPU + GPU) 52 ms, Core ML Neural Engine 127 ms, ONNX Runtime CPU 0.47 s.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · onnx

Нельзя запустить

Модель выложена только в формате ONNX, рантайм загружает PyTorch-веса.

Ревизия весов
22443d1

0 моделей