mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
Parameters: Renamed SuperGlue group to PyMatcher group. Added OANet python script.
This commit is contained in:
@@ -73,12 +73,12 @@ AboutDialog::AboutDialog(QWidget * parent) :
|
||||
_ui->label_sptorch->setText("No");
|
||||
_ui->label_sptorch_license->setEnabled(false);
|
||||
#endif
|
||||
#ifdef RTABMAP_SUPERGLUE_PYTORCH
|
||||
_ui->label_sgpytorch->setText("Yes");
|
||||
_ui->label_sgpytorch_license->setEnabled(true);
|
||||
#ifdef RTABMAP_PYMATCHER
|
||||
_ui->label_pymatcher->setText("Yes");
|
||||
_ui->label_pymatcher_license->setEnabled(true);
|
||||
#else
|
||||
_ui->label_sptorch->setText("No");
|
||||
_ui->label_sptorch_license->setEnabled(false);
|
||||
_ui->label_pymatcher->setText("No");
|
||||
_ui->label_pymatcher_license->setEnabled(false);
|
||||
#endif
|
||||
#ifdef RTABMAP_FASTCV
|
||||
_ui->label_fastcv->setText("Yes");
|
||||
|
||||
@@ -212,7 +212,7 @@ DatabaseViewer::DatabaseViewer(const QString & ini, QWidget * parent) :
|
||||
uInsert(parameters, Parameters::getDefaultParameters("Reg"));
|
||||
uInsert(parameters, Parameters::getDefaultParameters("Vis"));
|
||||
uInsert(parameters, Parameters::getDefaultParameters("Icp"));
|
||||
uInsert(parameters, Parameters::getDefaultParameters("SuperGlue"));
|
||||
uInsert(parameters, Parameters::getDefaultParameters("PyMatcher"));
|
||||
uInsert(parameters, Parameters::getDefaultParameters("Stereo"));
|
||||
uInsert(parameters, Parameters::getDefaultParameters("StereoBM"));
|
||||
uInsert(parameters, Parameters::getDefaultParameters("Grid"));
|
||||
|
||||
@@ -223,7 +223,7 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
_ui->vis_feature_detector->setItemData(11, 0, Qt::UserRole - 1);
|
||||
#endif
|
||||
|
||||
#ifndef RTABMAP_SUPERGLUE_PYTORCH
|
||||
#ifndef RTABMAP_PYMATCHER
|
||||
_ui->reextract_nn->setItemData(6, 0, Qt::UserRole - 1);
|
||||
#endif
|
||||
|
||||
@@ -964,13 +964,14 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
_ui->spinBox_sptorch_minDistance->setObjectName(Parameters::kSuperPointNMSRadius().c_str());
|
||||
_ui->checkBox_sptorch_cuda->setObjectName(Parameters::kSuperPointCuda().c_str());
|
||||
|
||||
// SuperGlue PyTorch
|
||||
_ui->lineEdit_sgpytorch_path->setObjectName(Parameters::kSuperGluePath().c_str());
|
||||
connect(_ui->toolButton_sgpytorch_path, SIGNAL(clicked()), this, SLOT(changeSuperGluePath()));
|
||||
_ui->sgpytorch_matchThreshold->setObjectName(Parameters::kSuperGlueMatchThreshold().c_str());
|
||||
_ui->sgpytorch_iterations->setObjectName(Parameters::kSuperGlueIterations().c_str());
|
||||
_ui->checkBox_sgpytorch_cuda->setObjectName(Parameters::kSuperGlueCuda().c_str());
|
||||
_ui->checkBox_sgpytorch_indoor->setObjectName(Parameters::kSuperGlueIndoor().c_str());
|
||||
// PyMatcher
|
||||
_ui->lineEdit_pymatcher_path->setObjectName(Parameters::kPyMatcherPath().c_str());
|
||||
connect(_ui->toolButton_pymatcher_path, SIGNAL(clicked()), this, SLOT(changePyMatcherPath()));
|
||||
_ui->pymatcher_matchThreshold->setObjectName(Parameters::kPyMatcherThreshold().c_str());
|
||||
_ui->pymatcher_iterations->setObjectName(Parameters::kPyMatcherIterations().c_str());
|
||||
_ui->checkBox_pymatcher_cuda->setObjectName(Parameters::kPyMatcherCuda().c_str());
|
||||
_ui->lineEdit_pymatcher_model->setObjectName(Parameters::kPyMatcherModel().c_str());
|
||||
connect(_ui->toolButton_pymatcher_model, SIGNAL(clicked()), this, SLOT(changePyMatcherPath()));
|
||||
|
||||
// GMS
|
||||
_ui->checkBox_gms_withRotation->setObjectName(Parameters::kGMSWithRotation().c_str());
|
||||
@@ -4617,7 +4618,7 @@ void PreferencesDialog::updateStereoDisparityVisibility()
|
||||
|
||||
void PreferencesDialog::updateFeatureMatchingVisibility()
|
||||
{
|
||||
_ui->groupBox_superglue->setVisible(_ui->reextract_nn->currentIndex() == 6);
|
||||
_ui->groupBox_pymatcher->setVisible(_ui->reextract_nn->currentIndex() == 6);
|
||||
_ui->groupBox_gms->setVisible(_ui->reextract_nn->currentIndex() == 7);
|
||||
}
|
||||
|
||||
@@ -4757,20 +4758,37 @@ void PreferencesDialog::changeSuperPointModelPath()
|
||||
}
|
||||
}
|
||||
|
||||
void PreferencesDialog::changeSuperGluePath()
|
||||
void PreferencesDialog::changePyMatcherPath()
|
||||
{
|
||||
QString path;
|
||||
if(_ui->lineEdit_sgpytorch_path->text().isEmpty())
|
||||
if(_ui->lineEdit_pymatcher_path->text().isEmpty())
|
||||
{
|
||||
path = QFileDialog::getOpenFileName(this, tr("Select file"), this->getWorkingDirectory(), tr("SuperGlue wrapper (*.py)"));
|
||||
path = QFileDialog::getOpenFileName(this, tr("Select file"), this->getWorkingDirectory(), tr("Python wrapper (*.py)"));
|
||||
}
|
||||
else
|
||||
{
|
||||
path = QFileDialog::getOpenFileName(this, tr("Select file"), _ui->lineEdit_sgpytorch_path->text(), tr("SuperGlue wrapper (*.py)"));
|
||||
path = QFileDialog::getOpenFileName(this, tr("Select file"), _ui->lineEdit_pymatcher_path->text(), tr("Python wrapper (*.py)"));
|
||||
}
|
||||
if(!path.isEmpty())
|
||||
{
|
||||
_ui->lineEdit_sgpytorch_path->setText(path);
|
||||
_ui->lineEdit_pymatcher_path->setText(path);
|
||||
}
|
||||
}
|
||||
|
||||
void PreferencesDialog::changePyMatcherModel()
|
||||
{
|
||||
QString path;
|
||||
if(_ui->lineEdit_pymatcher_model->text().isEmpty())
|
||||
{
|
||||
path = QFileDialog::getOpenFileName(this, tr("Select file"), this->getWorkingDirectory(), tr("PyTorch model (*.pth, *.pt)"));
|
||||
}
|
||||
else
|
||||
{
|
||||
path = QFileDialog::getOpenFileName(this, tr("Select file"), _ui->lineEdit_pymatcher_model->text(), tr("PyTorch model (*.pth, *.pt)"));
|
||||
}
|
||||
if(!path.isEmpty())
|
||||
{
|
||||
_ui->lineEdit_pymatcher_model->setText(path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1291,9 +1291,9 @@ p, li { white-space: pre-wrap; }
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QLabel" name="label_sgpytorch_license">
|
||||
<widget class="QLabel" name="label_pymatcher_license">
|
||||
<property name="text">
|
||||
<string>GPLv3</string>
|
||||
<string>PSF</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@@ -1303,7 +1303,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_43">
|
||||
<property name="text">
|
||||
<string>With SuperGlue PyTorch :</string>
|
||||
<string>With Python3 :</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@@ -1311,7 +1311,7 @@ p, li { white-space: pre-wrap; }
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLabel" name="label_sgpytorch">
|
||||
<widget class="QLabel" name="label_pymatcher">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<y>-279</y>
|
||||
<width>680</width>
|
||||
<height>3270</height>
|
||||
</rect>
|
||||
@@ -95,7 +95,7 @@
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>19</number>
|
||||
<number>21</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_22">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_29" stretch="0,1">
|
||||
@@ -17117,7 +17117,7 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>SuperGlue PyTorch</string>
|
||||
<string>PyMatcher</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
@@ -17239,15 +17239,15 @@ Lower the ratio -> higher the precision.</string>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_superglue">
|
||||
<widget class="QGroupBox" name="groupBox_pymatcher">
|
||||
<property name="title">
|
||||
<string>SuperGlue</string>
|
||||
<string>PyMatcher</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_149">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_586">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Python wrapper of <a href="https://github.com/magicleap/SuperGluePretrainedNetwork"><span style=" text-decoration: underline; color:#0000ff;">SuperGlue</span></a> project. Download <a href="https://github.com/introlab/rtabmap/blob/master/corelib/src/superglue_pytorch/rtabmap_superglue.py"><span style=" text-decoration: underline; color:#0000ff;">rtabmap_superpoint.py</span></a> and copy it at the root folder of SuperGlue git, then set its path below. <span style=" font-weight:600;">Important</span>: SuperGlue works only with SuperPoint descriptors!</p></body></html></string>
|
||||
<string><html><head/><body><p>Python wrapper for python matcher like <a href="https://github.com/magicleap/SuperGluePretrainedNetwork"><span style=" text-decoration: underline; color:#0000ff;">SuperGlue</span></a> or <a href="https://github.com/zjhthu/OANet"><span style=" text-decoration: underline; color:#0000ff;">OANet</span></a>. Download the <a href="https://github.com/introlab/rtabmap/tree/master/corelib/src/pymatcher"><span style=" text-decoration: underline; color:#0000ff;">scripts</span></a> and copy them at the root folder of SuperGlue git or in demo folder of OANet respectively, then set its path below. <span style=" font-weight:600;">Important</span>: Only float descriptors are allowed and SuperGlue works only with SuperPoint descriptors! You may have to train a new model for the feature used.</p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@@ -17263,19 +17263,19 @@ Lower the ratio -> higher the precision.</string>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_116" columnstretch="0,0,1">
|
||||
<item row="0" column="0">
|
||||
<widget class="QToolButton" name="toolButton_sgpytorch_path">
|
||||
<widget class="QToolButton" name="toolButton_pymatcher_path">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_sgpytorch_path"/>
|
||||
<widget class="QLineEdit" name="lineEdit_pymatcher_path"/>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="label_585">
|
||||
<property name="text">
|
||||
<string>Match threshold.</string>
|
||||
<string>Match threshold. Used by SuperGlue.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@@ -17286,7 +17286,7 @@ Lower the ratio -> higher the precision.</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="sgpytorch_matchThreshold">
|
||||
<widget class="QDoubleSpinBox" name="pymatcher_matchThreshold">
|
||||
<property name="decimals">
|
||||
<number>3</number>
|
||||
</property>
|
||||
@@ -17307,7 +17307,7 @@ Lower the ratio -> higher the precision.</string>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_584">
|
||||
<property name="text">
|
||||
<string>Iterations.</string>
|
||||
<string>Iterations. Used by SuperGlue.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@@ -17320,7 +17320,7 @@ Lower the ratio -> higher the precision.</string>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_583">
|
||||
<property name="text">
|
||||
<string>[Required] Path to rtabmap_superpoint.py.</string>
|
||||
<string>[Required] Path to rtabmap python script.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@@ -17331,7 +17331,7 @@ Lower the ratio -> higher the precision.</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="sgpytorch_iterations">
|
||||
<widget class="QSpinBox" name="pymatcher_iterations">
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@@ -17349,7 +17349,7 @@ Lower the ratio -> higher the precision.</string>
|
||||
<item row="3" column="2">
|
||||
<widget class="QLabel" name="label_587">
|
||||
<property name="text">
|
||||
<string>Cuda.</string>
|
||||
<string>Cuda. Used by SuperGlue.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@@ -17360,7 +17360,7 @@ Lower the ratio -> higher the precision.</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="checkBox_sgpytorch_cuda">
|
||||
<widget class="QCheckBox" name="checkBox_pymatcher_cuda">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
@@ -17369,7 +17369,7 @@ Lower the ratio -> higher the precision.</string>
|
||||
<item row="4" column="2">
|
||||
<widget class="QLabel" name="label_590">
|
||||
<property name="text">
|
||||
<string>Indoor model. Uncheck to use outdoor model.</string>
|
||||
<string>For SuperGlue, set only "indoor" or "outdoor". For OANet, set path to one of the pth file (e.g., "~/OANet/model/gl3d/sift-4000/model_best.pth").</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@@ -17380,9 +17380,12 @@ Lower the ratio -> higher the precision.</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="checkBox_sgpytorch_indoor">
|
||||
<widget class="QLineEdit" name="lineEdit_pymatcher_model"/>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QToolButton" name="toolButton_pymatcher_model">
|
||||
<property name="text">
|
||||
<string/>
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user