XFeat

XFeat: Accelerated Features for Lightweight Image Matching

This is a task focused on enhancing the efficiency of image matching by leveraging lightweight yet highly discriminative features. XFeat employs optimized feature extraction techniques to identify key points and patterns in images, making it suitable for fast and accurate image comparison.

Apache-2.0
Image Feature Extraction
PyTorch
English
by @AIOZAI
202
6

Last updated: 6 months ago


Generic badge Generic badge

XFeat: Accelerated Features for Lightweight Image Matching

Summary

Introduction

The task of Accelerated Features for Lightweight Image Matching introduces a cutting-edge approach to swiftly and efficiently matching images by utilizing accelerated features. This innovative method enhances the speed and accuracy of image matching processes, making it ideal for applications where real-time or rapid image analysis is crucial.

By harnessing accelerated features, this task revolutionizes the traditional image matching workflow, offering a streamlined and high-performance solution for various image processing applications. Whether used for object recognition, image retrieval, or visual search tasks, the accelerated features employed in this task significantly reduce computational overhead while maintaining robust matching capabilities.

Parameters

Inputs

  • input_1 and input_2 - (image -.png|.jpg|.jpeg): This input data of the model is images of the same objects viewed from different angles.

Output

  • output - (image -.png): This output data of the model is a composite image from the input information, representing the points that are supposed to exist between the two inputs.

Examples

input_1input_2output

Usage for developers

Please find below the details to track the information and access the code for processing the model on our platform.

Requirements

python~=3.10
torch~=2.0.0
numpy
Pillow
opencv-python

Code based on AIOZ structure

import cv2, os
import numpy as np

from .modules.xfeat import XFeat
from .utils import visualize_matches

...

def find_matches(image_0, image_1, model_path):
    ...
    
def do_ai_task(
        input_1: Union[str, Path],
        input_2: Union[str, Path],
        model_storage_directory: Union[str, Path],
        device: Literal["cpu", "cuda", "gpu"] = "cpu",
        *args, **kwargs) -> Any:
        
        model_id = os.path.abspath(model_storage_directory + /...)
        out = find_matches(cv2.imread(input_1), cv2.imread(input_2), model_storage_directory)
        cv2.imwrite("output.png", out)
        output = open("output.png", "rb")  # io.BufferedReader
    return output

Reference

This repository is based on and inspired by VeRLab's work. We sincerely appreciate their generosity in sharing the code.

License

We respect and comply with the terms of the author's license cited in the Reference section.

Citation

@INPROCEEDINGS{potje2024cvpr,
  author={Guilherme {Potje} and Felipe {Cadar} and Andre {Araujo} and Renato {Martins} and Erickson R. {Nascimento}},
  booktitle={2024 IEEE / CVF Computer Vision and Pattern Recognition (CVPR)}, 
  title={XFeat: Accelerated Features for Lightweight Image Matching}, 
  year={2024}
 }