iVS3D v2.0.0
Loading...
Searching...
No Matches
inference_embedding.cpp File Reference

Example for performing image embedding using a neural network model like CosPlace or EigenPlaces. More...

#include <string>
#include <vector>
#include <iostream>
#include <chrono>
#include <memory>
#include <filesystem>
#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/imgproc.hpp>
#include "NeuralNetFactory.h"
#include "NeuralUtil.h"
#include "cxxopts.hpp"
#include "helpers.hpp"

Functions

int main (int argc, char **argv)
 Main function for embedding inference example.
 

Detailed Description

Example for performing image embedding using a neural network model like CosPlace or EigenPlaces.

This example demonstrates how to load an embedding model, perform inference on one or more input images, and save the embedding results. It supports GPU inference if available.

Author
Dominik Wüst (domin.nosp@m.ik.w.nosp@m.uest@.nosp@m.iosb.nosp@m..frau.nosp@m.nhof.nosp@m.er.de)
Date
June 2025

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Main function for embedding inference example.

This example demonstrates how to load an embedding model, perform inference on one or more input images, and save the embedding results. It also supports GPU inference if available.

Usage: ./inference_embedding –model <model_path> –input <image_path> [–gpu <gpu_id>]

The model needs to be an embedding model in onnx format.