<metaproperty="og:description" content="COLMAP supports multiple feature extraction and matching algorithms. This page describes how to switch between them using the command-line interface or the graphical user interface. Feature Extract..." />
<metaname="description" content="COLMAP supports multiple feature extraction and matching algorithms. This page describes how to switch between them using the command-line interface or the graphical user interface. Feature Extract..." />
<liclass="breadcrumb-item active" aria-current="page"><spanclass="ellipsis">Feature Extraction and Matching</span></li>
</ul>
</nav>
</div>
</div>
</div>
</div>
<divid="searchbox"></div>
<articleclass="bd-article">
<sectionid="feature-extraction-and-matching">
<spanid="features"></span><h1>Feature Extraction and Matching<aclass="headerlink" href="#feature-extraction-and-matching" title="Link to this heading">#</a></h1>
<p>COLMAP supports multiple feature extraction and matching algorithms. This page
describes how to switch between them using the command-line interface or the
graphical user interface.</p>
<sectionid="feature-extractor-types">
<h2>Feature Extractor Types<aclass="headerlink" href="#feature-extractor-types" title="Link to this heading">#</a></h2>
<p>The following feature extractor types are available:</p>
<ulclass="simple">
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">SIFT</span></code>: Scale-Invariant Feature Transform (default). The classic and most
<p>In the GUI, open <codeclass="docutils literal notranslate"><spanclass="pre">Processing</span><spanclass="pre">></span><spanclass="pre">Feature</span><spanclass="pre">extraction</span></code> and select the desired
tab (SIFT, ALIKED, LoMa, etc.) before clicking Extract.</p>
</section>
<sectionid="feature-matcher-types">
<h2>Feature Matcher Types<aclass="headerlink" href="#feature-matcher-types" title="Link to this heading">#</a></h2>
<p>The following feature matcher types are available:</p>
<ulclass="simple">
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">SIFT_BRUTEFORCE</span></code>: Brute-force matching optimized for SIFT descriptors
(default). Uses L2 distance with ratio test.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">ALIKED_BRUTEFORCE</span></code>: Brute-force matching for ALIKED descriptors. Uses
cosine similarity. Requires ONNX support to be enabled at build time.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">SIFT_LIGHTGLUE</span></code>: Neural network-based matching using the LightGlue model
for SIFT descriptors. This typically produces more matches and higher inlier
ratios than brute-force matching, especially for challenging image pairs with
large viewpoint or illumination changes. Requires ONNX support to be enabled
at build time.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">ALIKED_LIGHTGLUE</span></code>: Neural network-based matching using the LightGlue model
for ALIKED descriptors. Requires ONNX support to be enabled at build time.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">LOMA_BRUTEFORCE</span></code>: Brute-force matching for either of the LoMa descriptors.
Uses cosine similarity. Requires ONNX support to be enabled at build time.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">LOMA_B</span></code>: Dedicated neural network matcher for the 256-dim <codeclass="docutils literal notranslate"><spanclass="pre">LOMA_B</span></code>
descriptor, comparable in size to LightGlue. Requires ONNX support to be
enabled at build time.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">LOMA_R</span></code>: Same size as <codeclass="docutils literal notranslate"><spanclass="pre">LOMA_B</span></code>, but trained with rotation augmentation
for better robustness to rotated image pairs. Also matches the 256-dim
<codeclass="docutils literal notranslate"><spanclass="pre">LOMA_B</span></code> descriptor. Requires ONNX support to be enabled at build time.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">LOMA_L</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">LOMA_G</span></code>: Larger dedicated matchers for the 256-dim
<codeclass="docutils literal notranslate"><spanclass="pre">LOMA_B</span></code> descriptor, in increasing order of model size and matching
quality. Requires ONNX support to be enabled at build time.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">LOMA_B128</span></code>: Dedicated matcher for the lightweight 128-dim <codeclass="docutils literal notranslate"><spanclass="pre">LOMA_B128</span></code>
descriptor. Requires ONNX support to be enabled at build time.</p></li>
</ul>
<p>To select a feature matcher type via the command-line:</p>
<p>In the GUI, open <codeclass="docutils literal notranslate"><spanclass="pre">Processing</span><spanclass="pre">></span><spanclass="pre">Feature</span><spanclass="pre">matching</span></code>, select any matching tab
(Exhaustive, Sequential, etc.), and choose the matcher type from the “Type”
<codeclass="docutils literal notranslate"><spanclass="pre">LOMA_L</span></code>, or <codeclass="docutils literal notranslate"><spanclass="pre">LOMA_G</span></code> matching.</p></li>
<li><p>Use <codeclass="docutils literal notranslate"><spanclass="pre">LOMA_B128</span></code> extraction with <codeclass="docutils literal notranslate"><spanclass="pre">LOMA_BRUTEFORCE</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">LOMA_B128</span></code>
matching.</p></li>
</ul>
<p>Mixing incompatible types (e.g., SIFT features with ALIKED matcher, or
<codeclass="docutils literal notranslate"><spanclass="pre">LOMA_B128</span></code> features with the <codeclass="docutils literal notranslate"><spanclass="pre">LOMA_B</span></code> matcher) will result in a runtime
error. Do not mix different feature extractor types (e.g., SIFT and ALIKED)
in the same database.</p>
</section>
<sectionid="aliked-model-variants">
<h2>ALIKED Model Variants<aclass="headerlink" href="#aliked-model-variants" title="Link to this heading">#</a></h2>
<p>ALIKED requires an ONNX model file. Several model variants are available with
different trade-offs between speed and accuracy:</p>
<ulclass="simple">
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">aliked-n16rot</span></code>: Faster and trained for some viewpoint invariance. 128-dim descriptors.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">aliked-n32</span></code>: More expensive but not explicitly trained for viewpoint invariance, 128-dim descriptors.</p></li>
</ul>
<p>Specify the model path using <codeclass="docutils literal notranslate"><spanclass="pre">--AlikedExtraction.*_model_path</span></code>. If the path is
a URL, COLMAP will automatically download and cache the model. You can download
different ALIKED models from the release page at <aclass="github reference external" href="https://github.com/colmap/colmap/releases/">colmap/colmap</a></p>
</section>
<sectionid="loma-model-variants">
<h2>LoMa Model Variants<aclass="headerlink" href="#loma-model-variants" title="Link to this heading">#</a></h2>
<p>LoMa, similar to ALIKED, uses a detect+describe+match framework. The descriptor
comes in two variants:</p>
<ulclass="simple">
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">LOMA_B</span></code>: 256-dim descriptor combining frozen DINOv2 features with trained
convolutional features.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">LOMA_B128</span></code>: A more lightweight 128-dim descriptor.</p></li>
</ul>
<p>Each descriptor variant has its own dedicated matcher(s) with
different trade-offs between speed and accuracy:</p>
<ulclass="simple">
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">LOMA_B</span></code> descriptors can be matched with <codeclass="docutils literal notranslate"><spanclass="pre">LOMA_B</span></code> (smallest, same size as
LightGlue), <codeclass="docutils literal notranslate"><spanclass="pre">LOMA_R</span></code> (same size as <codeclass="docutils literal notranslate"><spanclass="pre">LOMA_B</span></code> but trained with rotation
augmentation), <codeclass="docutils literal notranslate"><spanclass="pre">LOMA_L</span></code>, or <codeclass="docutils literal notranslate"><spanclass="pre">LOMA_G</span></code> (progressively larger, slower, and
more accurate), as well as <codeclass="docutils literal notranslate"><spanclass="pre">LOMA_BRUTEFORCE</span></code>.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">LOMA_B128</span></code> descriptors can only be matched with <codeclass="docutils literal notranslate"><spanclass="pre">LOMA_B128</span></code> or
<codeclass="docutils literal notranslate"><spanclass="pre">LOMA_BRUTEFORCE</span></code>. Fastest option but least accurate out of the LoMa
matchers.</p></li>
</ul>
<p>By default, all LoMa model weights are downloaded automatically and cached
locally the first time they are used, so no manual setup is required to get
started. To use a different model, specify its path using
<codeclass="docutils literal notranslate"><spanclass="pre">--LomaExtraction.*_model_path</span></code> for extraction and
<codeclass="docutils literal notranslate"><spanclass="pre">--LomaMatching.*_model_path</span></code> for matching. As with ALIKED, if the path is a
URL, COLMAP will automatically download and cache it. Extraction and
matching also support an opt-in <codeclass="docutils literal notranslate"><spanclass="pre">use_bf16</span></code> mode
(<codeclass="docutils literal notranslate"><spanclass="pre">--LomaExtraction.use_bf16</span></code> / <codeclass="docutils literal notranslate"><spanclass="pre">--LomaMatching.use_bf16</span></code>) for faster
inference.</p>
</section>
<sectionid="iterative-runs">
<h2>Iterative Runs<aclass="headerlink" href="#iterative-runs" title="Link to this heading">#</a></h2>
<p>When re-running matching on an existing database, image pairs that already have
a two-view geometry are skipped, so changing <codeclass="docutils literal notranslate"><spanclass="pre">--FeatureMatching.type</span></code> on such
a database leaves previously matched pairs untouched. To force re-matching, first
clear the existing results with <codeclass="docutils literal notranslate"><spanclass="pre">database_cleaner</span></code>:</p>
<p>When re-extracting with a different <codeclass="docutils literal notranslate"><spanclass="pre">--FeatureExtraction.type</span></code>, use
<codeclass="docutils literal notranslate"><spanclass="pre">--type</span><spanclass="pre">features</span></code> to additionally clear the extracted keypoints and descriptors.</p>