/ Модель

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

Лицензия
Своя лицензия
Архитектура
superpoint · dense
Опубликована
13 мар 2024

superpoint

Классификация и разметка3 профессии

SuperPoint обнаруживает устойчивые ключевые точки на изображениях и вычисляет их дескрипторы для сопоставления изображений и оценки геометрических преобразований.

18 785скачиваний за 30 дней28лайковвеса обновлены1 янв 2025

Бенчмарки

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

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

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

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

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

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

SuperPoint — свёрточная модель компьютерного зрения, описанная Дэниелом ДеТоном, Томашем Малишевичем и Эндрю Рабиновичем. Она совместно обнаруживает ключевые точки на изображении и вычисляет дескриптор для каждой точки за один проход. Модель обучалась с самоконтролем и использует полностью свёрточную архитектуру.

SuperPoint предназначена для извлечения устойчивых особенностей, полезных при сопоставлении изображений и решении задач многовидовой геометрии. Её можно применять для оценки гомографии, поиска соответствий между изображениями и как экстрактор признаков для других задач компьютерного зрения. В статье описан подход Homographic Adaptation для повышения повторяемости точек при гомографических преобразованиях и адаптации между доменами.

Модель принимает изображения и выдаёт координаты ключевых точек с дескрипторами. В карточке указана лицензия other; конкретные условия использования в доступных данных не раскрыты.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

SuperPoint

Overview

The SuperPoint model was proposed in SuperPoint: Self-Supervised Interest Point Detection and Description by Daniel DeTone, Tomasz Malisiewicz and Andrew Rabinovich.

This model is the result of a self-supervised training of a fully-convolutional network for interest point detection and description. The model is able to detect interest points that are repeatable under homographic transformations and provide a descriptor for each point. The use of the model in its own is limited, but it can be used as a feature extractor for other tasks such as homography estimation, image matching, etc.

The abstract from the paper is the following:

This paper presents a self-supervised framework for training interest point detectors and descriptors suitable for a large number of multiple-view geometry problems in computer vision. As opposed to patch-based neural networks, our fully-convolutional model operates on full-sized images and jointly computes pixel-level interest point locations and associated descriptors in one forward pass. We introduce Homographic Adaptation, a multi-scale, multi-homography approach for boosting interest point detection repeatability and performing cross-domain adaptation (e.g., synthetic-to-real). Our model, when trained on the MS-COCO generic image dataset using Homographic Adaptation, is able to repeatedly detect a much richer set of interest points than the initial pre-adapted deep model and any other traditional corner detector. The final system gives rise to state-of-the-art homography estimation results on HPatches when compared to LIFT, SIFT and ORB.

Demo notebook

A demo notebook showcasing inference + visualization with SuperPoint can be found here.

How to use

Here is a quick example of using the model to detect interest points in an image:

from transformers import AutoImageProcessor, SuperPointForKeypointDetection
import torch
from PIL import Image
import requests

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

processor = AutoImageProcessor.from_pretrained("magic-leap-community/superpoint")
model = SuperPointForKeypointDetection.from_pretrained("magic-leap-community/superpoint")

inputs = processor(image, return_tensors="pt")
outputs = model(**inputs)

The outputs contain the list of keypoint coordinates with their respective score and description (a 256-long vector).

You can also feed multiple images to the model. Due to the nature of SuperPoint, to output a dynamic number of keypoints, you will need to use the mask attribute to retrieve the respective information :

from transformers import AutoImageProcessor, SuperPointForKeypointDetection
import torch
from PIL import Image
import requests

url_image_1 = "http://images.cocodataset.org/val2017/000000039769.jpg"
image_1 = Image.open(requests.get(url_image_1, stream=True).raw)
url_image_2 = "http://images.cocodataset.org/test-stuff2017/000000000568.jpg"
image_2 = Image.open(requests.get(url_image_2, stream=True).raw)

images = [image_1, image_2]

processor = AutoImageProcessor.from_pretrained("magic-leap-community/superpoint")
model = SuperPointForKeypointDetection.from_pretrained("magic-leap-community/superpoint")

inputs = processor(images, return_tensors="pt")
outputs = model(**inputs)

We can now visualize the keypoints.

import matplotlib.pyplot as plt
import torch

for i in range(len(images)):
    image = images[i]
    image_width, image_height = image.size  

    image_mask = outputs.mask[i]
    image_indices = torch.nonzero(image_mask).squeeze()

    image_scores = outputs.scores[i][image_indices]
    image_keypoints = outputs.keypoints[i][image_indices]
    
    keypoints = image_keypoints.detach().numpy()
    scores = image_scores.detach().numpy()

    valid_keypoints = [
        (kp, score) for kp, score in zip(keypoints, scores)
        if 0 <= kp[0] < image_width and 0 <= kp[1] < image_height
    ]

    valid_keypoints, valid_scores = zip(*valid_keypoints)
    valid_keypoints = torch.tensor(valid_keypoints)
    valid_scores = torch.tensor(valid_scores)

    print(valid_keypoints.shape)

    plt.axis('off')
    plt.imshow(image)
    plt.scatter(
        valid_keypoints[:, 0], 
        valid_keypoints[:, 1], 
        s=valid_scores * 100, 
        c='red'
    )
    plt.show()

This model was contributed by stevenbucaille. The original code can be found here.

@inproceedings{detone2018superpoint,
  title={Superpoint: Self-supervised interest point detection and description},
  author={DeTone, Daniel and Malisiewicz, Tomasz and Rabinovich, Andrew},
  booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition workshops},
  pages={224--236},
  year={2018}
}

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

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

GPU в ailist

Универсальный рантайм · keypoint-detection

Можно запустить

Подбираем GPU…

Класс архитектуры
SuperPointModel
Ревизия весов
734450e

0 моделей