diff options
-rw-r--r-- | gui/lang/zh_CN.ts | 4 | ||||
-rw-r--r-- | tracker-neuralnet/ftnoir_tracker_neuralnet.cpp | 59 | ||||
-rw-r--r-- | tracker-neuralnet/ftnoir_tracker_neuralnet.h | 3 | ||||
-rw-r--r-- | tracker-neuralnet/lang/nl_NL.ts | 20 | ||||
-rw-r--r-- | tracker-neuralnet/lang/ru_RU.ts | 20 | ||||
-rw-r--r-- | tracker-neuralnet/lang/stub.ts | 20 | ||||
-rw-r--r-- | tracker-neuralnet/lang/zh_CN.ts | 61 | ||||
-rw-r--r-- | tracker-neuralnet/neuralnet-trackercontrols.ui | 760 |
8 files changed, 563 insertions, 384 deletions
diff --git a/gui/lang/zh_CN.ts b/gui/lang/zh_CN.ts index b2fe1626..fc19b0fd 100644 --- a/gui/lang/zh_CN.ts +++ b/gui/lang/zh_CN.ts @@ -351,7 +351,7 @@ Press "clear calibration" to remove any calibration data pertaining to </message> <message> <source>Centering method</source> - <translation >回中方法</translation> + <translation>回中方法</translation> </message> <message> <source>Point</source> @@ -363,7 +363,7 @@ Press "clear calibration" to remove any calibration data pertaining to </message> <message> <source>Roll compensated</source> - <translation >滚转补偿</translation> + <translation>滚转补偿</translation> </message> <message> <source>Freeze the position returned by the tracker while this mode is active.</source> diff --git a/tracker-neuralnet/ftnoir_tracker_neuralnet.cpp b/tracker-neuralnet/ftnoir_tracker_neuralnet.cpp index 4ee8de1e..2243c143 100644 --- a/tracker-neuralnet/ftnoir_tracker_neuralnet.cpp +++ b/tracker-neuralnet/ftnoir_tracker_neuralnet.cpp @@ -27,6 +27,8 @@ #include <QMutexLocker> #include <QDebug> #include <QFile> +#include <QFileDialog> +#include <QFileInfo> #include <cstdio> #include <cmath> @@ -56,6 +58,12 @@ std::string convert(const QString &s) { return s.toStdString(); } #endif +QDir get_default_model_directory() +{ + return QDir(OPENTRACK_BASE_PATH+ "/" OPENTRACK_LIBRARY_PATH "models"); +} + + int enum_to_fps(int value) { switch (value) @@ -463,8 +471,7 @@ bool NeuralNetTracker::load_and_initialize_model() { const QString localizer_model_path_enc = OPENTRACK_BASE_PATH+"/" OPENTRACK_LIBRARY_PATH "/models/head-localizer.onnx"; - const QString poseestimator_model_path_enc = - OPENTRACK_BASE_PATH+"/" OPENTRACK_LIBRARY_PATH "/models/head-pose.onnx"; + const QString poseestimator_model_path_enc = get_posenet_filename(); try { @@ -484,6 +491,7 @@ bool NeuralNetTracker::load_and_initialize_model() allocator_info_, Ort::Session{env_, convert(localizer_model_path_enc).c_str(), opts}); + qDebug() << "Loading pose net " << poseestimator_model_path_enc; poseestimator_.emplace( allocator_info_, Ort::Session{env_, convert(poseestimator_model_path_enc).c_str(), opts}); @@ -677,12 +685,31 @@ Affine NeuralNetTracker::pose() return last_pose_affine_; } + std::tuple<cv::Size,double, double> NeuralNetTracker::stats() const { QMutexLocker lck(&stats_mtx_); return { resolution_, fps_, inference_time_ }; } + +QString NeuralNetTracker::get_posenet_filename() const +{ + QString filename = settings_.posenet_file; + if (QFileInfo(filename).isRelative()) + filename = get_default_model_directory().absoluteFilePath(filename); + return filename; +} + + + + + + + + + + void NeuralNetDialog::make_fps_combobox() { for (int k = 0; k < fps_MAX; k++) @@ -729,11 +756,12 @@ NeuralNetDialog::NeuralNetDialog() : tie_setting(settings_.num_threads, ui_.threadCount); tie_setting(settings_.resolution, ui_.resolution); tie_setting(settings_.force_fps, ui_.cameraFPS); + tie_setting(settings_.posenet_file, ui_.posenetFileDisplay); connect(ui_.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); connect(ui_.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); connect(ui_.camera_settings, SIGNAL(clicked()), this, SLOT(camera_settings())); - + connect(ui_.posenetSelectButton, SIGNAL(clicked()), this, SLOT(onSelectPoseNetFile())); connect(&settings_.camera_name, value_::value_changed<QString>(), this, &NeuralNetDialog::update_camera_settings_state); update_camera_settings_state(settings_.camera_name); @@ -900,6 +928,31 @@ void NeuralNetDialog::startstop_trans_calib(bool start) } +void NeuralNetDialog::onSelectPoseNetFile() +{ + const auto root = get_default_model_directory(); + // Start with the current setting + QString filename = settings_.posenet_file; + // If the filename is relative then assume that the file is located under the + // model directory. Under regular use this should always be the case. + if (QFileInfo(filename).isRelative()) + filename = root.absoluteFilePath(filename); + filename = QFileDialog::getOpenFileName(this, + tr("Select Pose Net ONNX"), filename, tr("ONNX Files (*.onnx)")); + // In case the user aborted. + if (filename.isEmpty()) + return; + // When a file under the model directory was selected we can get rid of the + // directory prefix. This is more robust than storing absolute paths, e.g. + // in case the user moves the opentrack install folder / reuses old settings. + // When the file is not in the model directory, we have to use the absolute path, + // which is also fine as developer feature. + if (filename.startsWith(root.absolutePath())) + filename = root.relativeFilePath(filename); + settings_.posenet_file = filename; +} + + Settings::Settings() : opts("neuralnet-tracker") {} } // neuralnet_tracker_ns diff --git a/tracker-neuralnet/ftnoir_tracker_neuralnet.h b/tracker-neuralnet/ftnoir_tracker_neuralnet.h index 3548335e..bafaa6e5 100644 --- a/tracker-neuralnet/ftnoir_tracker_neuralnet.h +++ b/tracker-neuralnet/ftnoir_tracker_neuralnet.h @@ -84,6 +84,7 @@ struct Settings : opts { value<int> resolution { b, "force-resolution", 0 }; value<double> deadzone_size { b, "deadzone-size", 1. }; value<double> deadzone_hardness { b, "deadzone-hardness", 1.5 }; + value<QString> posenet_file { b, "posenet-file", "head-pose.onnx" }; Settings(); }; @@ -126,6 +127,7 @@ private: QuatPose compute_filtered_pose(const PoseEstimator::Face &face); // Compute the pose in 3d space taking the network outputs QuatPose transform_to_world_pose(const cv::Quatf &face_rotation, const cv::Point2f& face_xy, const float face_size) const; + QString get_posenet_filename() const; Settings settings_; std::optional<Localizer> localizer_; @@ -192,6 +194,7 @@ private Q_SLOTS: void startstop_trans_calib(bool start); void trans_calib_step(); void status_poll(); + void onSelectPoseNetFile(); }; diff --git a/tracker-neuralnet/lang/nl_NL.ts b/tracker-neuralnet/lang/nl_NL.ts index dbcd3c8c..27da4f5a 100644 --- a/tracker-neuralnet/lang/nl_NL.ts +++ b/tracker-neuralnet/lang/nl_NL.ts @@ -112,6 +112,18 @@ Don't roll or change position.</source> <source>Zoom factor for the face region. Applied before the patch is fed into the pose estimation model. There is a sweet spot near 1.</source> <translation type="unfinished"></translation> </message> + <message> + <source>Select Pose Net ONNX</source> + <translation type="unfinished"></translation> + </message> + <message> + <source><the pose net file></source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Select the pose network. Changes take affect on the next tracker start</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>neuralnet_tracker_ns::NeuralNetDialog</name> @@ -147,5 +159,13 @@ Don't roll or change position.</source> <source>Start calibration</source> <translation type="unfinished"></translation> </message> + <message> + <source>Select Pose Net ONNX</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>ONNX Files (*.onnx)</source> + <translation type="unfinished"></translation> + </message> </context> </TS> diff --git a/tracker-neuralnet/lang/ru_RU.ts b/tracker-neuralnet/lang/ru_RU.ts index b191e769..c32d4fa7 100644 --- a/tracker-neuralnet/lang/ru_RU.ts +++ b/tracker-neuralnet/lang/ru_RU.ts @@ -113,6 +113,18 @@ Don't roll or change position.</source> <source>Zoom factor for the face region. Applied before the patch is fed into the pose estimation model. There is a sweet spot near 1.</source> <translation>Фактор масштабирования области лица. Применяется перед передачей кадра в модель определения позиции. Наилучшие результаты близки к 1</translation> </message> + <message> + <source>Select Pose Net ONNX</source> + <translation type="unfinished"></translation> + </message> + <message> + <source><the pose net file></source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Select the pose network. Changes take affect on the next tracker start</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>neuralnet_tracker_ns::NeuralNetDialog</name> @@ -150,5 +162,13 @@ Don't roll or change position.</source> <source>Start calibration</source> <translation>Начать калибровку</translation> </message> + <message> + <source>Select Pose Net ONNX</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>ONNX Files (*.onnx)</source> + <translation type="unfinished"></translation> + </message> </context> </TS> diff --git a/tracker-neuralnet/lang/stub.ts b/tracker-neuralnet/lang/stub.ts index 4cde86a9..9609f05e 100644 --- a/tracker-neuralnet/lang/stub.ts +++ b/tracker-neuralnet/lang/stub.ts @@ -112,6 +112,18 @@ Don't roll or change position.</source> <source>Zoom factor for the face region. Applied before the patch is fed into the pose estimation model. There is a sweet spot near 1.</source> <translation type="unfinished"></translation> </message> + <message> + <source>Select Pose Net ONNX</source> + <translation type="unfinished"></translation> + </message> + <message> + <source><the pose net file></source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Select the pose network. Changes take affect on the next tracker start</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>neuralnet_tracker_ns::NeuralNetDialog</name> @@ -147,5 +159,13 @@ Don't roll or change position.</source> <source>Start calibration</source> <translation type="unfinished"></translation> </message> + <message> + <source>Select Pose Net ONNX</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>ONNX Files (*.onnx)</source> + <translation type="unfinished"></translation> + </message> </context> </TS> diff --git a/tracker-neuralnet/lang/zh_CN.ts b/tracker-neuralnet/lang/zh_CN.ts index cf12f304..53da04ae 100644 --- a/tracker-neuralnet/lang/zh_CN.ts +++ b/tracker-neuralnet/lang/zh_CN.ts @@ -1,36 +1,35 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> - <TS version="2.1" language="zh_CN"> - <context> +<context> <name>Form</name> <message> <source>Tracker settings</source> - <translation >追踪器设置</translation> + <translation>追踪器设置</translation> </message> <message> <source>Diagonal FOV</source> - <translation >对角FOV</translation> + <translation>对角FOV</translation> </message> <message> <source>Camera name</source> - <translation >相机名</translation> + <translation>相机名</translation> </message> <message> <source>Frames per second</source> - <translation >FPS</translation> + <translation>FPS</translation> </message> <message> <source>Camera settings</source> - <translation >相机设置</translation> + <translation>相机设置</translation> </message> <message> <source>Camera Configuration</source> - <translation >相机配置</translation> + <translation>相机配置</translation> </message> <message> <source>Head Center Offset</source> - <translation >头部归中补偿</translation> + <translation>头部归中补偿</translation> </message> <message> <source> mm</source> @@ -39,28 +38,28 @@ <message> <source>Use only yaw and pitch while calibrating. Don't roll or change position.</source> - <translation >在校准时只使用偏航和俯仰, + <translation>在校准时只使用偏航和俯仰, 不要滚转或是改变位置. </translation> </message> <message> <source>Start calibration</source> - <translation >开始校准</translation> + <translation>开始校准</translation> </message> <message> <source>Right</source> - <translation >向右</translation> + <translation>向右</translation> </message> <message> <source>Forward</source> - <translation >向前</translation> + <translation>向前</translation> </message> <message> <source>Up</source> - <translation >向上</translation> + <translation>向上</translation> </message> <message> <source>Show Network Input</source> - <translation >展示神经网络输入</translation> + <translation>展示神经网络输入</translation> </message> <message> <source>MJPEG</source> @@ -114,20 +113,32 @@ Don't roll or change position.</source> <source>Zoom factor for the face region. Applied before the patch is fed into the pose estimation model. There is a sweet spot near 1.</source> <translation type="unfinished"></translation> </message> - </context> + <message> + <source>Select the pose network. Changes take affect on the next tracker start</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Select Pose Net ONNX</source> + <translation type="unfinished"></translation> + </message> + <message> + <source><the pose net file></source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>neuralnet_tracker_ns::NeuralNetDialog</name> <message> <source>Default</source> - <translation >默认</translation> + <translation>默认</translation> </message> <message> <source>Tracker Offline</source> - <translation >追踪器离线</translation> + <translation>追踪器离线</translation> </message> <message> <source>%1x%2 @ %3 FPS / Inference: %4 ms</source> - <translation >%1x%2 @ %3 FPS / 推理: %4 ms</translation> + <translation>%1x%2 @ %3 FPS / 推理: %4 ms</translation> </message> <message> <source>%1 yaw samples. Yaw more to %2 samples for stable calibration.</source> @@ -143,11 +154,19 @@ Don't roll or change position.</source> </message> <message> <source>Stop calibration</source> - <translation >结束校准</translation> + <translation>结束校准</translation> </message> <message> <source>Start calibration</source> - <translation >开始校准</translation> + <translation>开始校准</translation> + </message> + <message> + <source>Select Pose Net ONNX</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>ONNX Files (*.onnx)</source> + <translation type="unfinished"></translation> </message> </context> </TS> diff --git a/tracker-neuralnet/neuralnet-trackercontrols.ui b/tracker-neuralnet/neuralnet-trackercontrols.ui index 750e6ef3..ae2450b4 100644 --- a/tracker-neuralnet/neuralnet-trackercontrols.ui +++ b/tracker-neuralnet/neuralnet-trackercontrols.ui @@ -9,14 +9,241 @@ <rect> <x>0</x> <y>0</y> - <width>671</width> - <height>357</height> + <width>651</width> + <height>432</height> </rect> </property> <property name="windowTitle"> <string>Tracker settings</string> </property> <layout class="QGridLayout" name="gridLayout"> + <item row="4" column="0"> + <widget class="QGroupBox" name="groupBox_10"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="autoFillBackground"> + <bool>true</bool> + </property> + <property name="title"> + <string>Head Center Offset</string> + </property> + <layout class="QGridLayout" name="gridLayout_5"> + <item row="0" column="0"> + <widget class="QFrame" name="frame_4"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + <layout class="QGridLayout" name="gridLayout_11"> + <property name="sizeConstraint"> + <enum>QLayout::SetDefaultConstraint</enum> + </property> + <property name="verticalSpacing"> + <number>0</number> + </property> + <item row="2" column="0"> + <widget class="QLabel" name="label_66"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Right</string> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QLabel" name="label_61"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Forward</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_62"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Up</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QSpinBox" name="tx_spin"> + <property name="maximumSize"> + <size> + <width>150</width> + <height>16777215</height> + </size> + </property> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65536</number> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QSpinBox" name="ty_spin"> + <property name="maximumSize"> + <size> + <width>150</width> + <height>16777215</height> + </size> + </property> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65536</number> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QSpinBox" name="tz_spin"> + <property name="maximumSize"> + <size> + <width>150</width> + <height>16777215</height> + </size> + </property> + <property name="suffix"> + <string> mm</string> + </property> + <property name="minimum"> + <number>-65535</number> + </property> + <property name="maximum"> + <number>65536</number> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item row="0" column="1"> + <widget class="QFrame" name="frame_5"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>260</width> + <height>0</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QLabel" name="label_59"> + <property name="text"> + <string>Use only yaw and pitch while calibrating. +Don't roll or change position.</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + <property name="openExternalLinks"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="sample_count_display"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="frameShape"> + <enum>QFrame::Panel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Sunken</enum> + </property> + <property name="text"> + <string/> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="tcalib_button"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Start calibration</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + </item> + <item row="8" column="0"> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> <item row="2" column="0"> <widget class="QGroupBox" name="groupBox"> <property name="sizePolicy"> @@ -219,10 +446,19 @@ </layout> </widget> </item> - <item row="9" column="0"> - <widget class="QDialogButtonBox" name="buttonBox"> - <property name="standardButtons"> - <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + <item row="7" column="0"> + <widget class="QLabel" name="resolution_display"> + <property name="autoFillBackground"> + <bool>true</bool> + </property> + <property name="frameShape"> + <enum>QFrame::Panel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Sunken</enum> + </property> + <property name="text"> + <string notr="true"/> </property> </widget> </item> @@ -246,364 +482,188 @@ <property name="title"> <string>Tuning / Debug</string> </property> - <layout class="QGridLayout" name="gridLayout_2"> - <item row="0" column="10"> - <widget class="Line" name="line_2"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QSpinBox" name="threadCount"> - <property name="toolTip"> - <string>Number of threads. Can be used to balance the CPU load between the game and the tracker.</string> - </property> - <property name="minimum"> - <number>1</number> - </property> - <property name="maximum"> - <number>32</number> - </property> - </widget> - </item> - <item row="0" column="4"> - <widget class="Line" name="line"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - </widget> - </item> - <item row="0" column="8"> - <widget class="QLabel" name="roiFilterAlphaLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>ROI Smoothing Alpha</string> - </property> - </widget> - </item> - <item row="0" column="11"> - <widget class="QLabel" name="roiZoomLabel"> - <property name="text"> - <string>ROI Zoom</string> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="Line" name="line_3"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - </widget> - </item> - <item row="0" column="3"> - <widget class="QCheckBox" name="showNetworkInput"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="toolTip"> - <string>Show the image patch that the pose estimation model sees.</string> - </property> - <property name="text"> - <string>Show Network Input</string> - </property> - </widget> - </item> - <item row="0" column="9"> - <widget class="QDoubleSpinBox" name="roiFilterAlpha"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>150</width> - <height>16777215</height> - </size> - </property> - <property name="toolTip"> - <string>Amount of smoothing of the face region coordinates. Can help stabilize the pose.</string> - </property> - <property name="wrapping"> - <bool>false</bool> - </property> - <property name="decimals"> - <number>2</number> - </property> - <property name="maximum"> - <double>1.000000000000000</double> - </property> - <property name="singleStep"> - <double>0.010000000000000</double> - </property> - <property name="value"> - <double>1.000000000000000</double> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="threadCountLabel"> - <property name="text"> - <string>Thread Count</string> - </property> - </widget> - </item> - <item row="0" column="12"> - <widget class="QDoubleSpinBox" name="roiZoom"> - <property name="toolTip"> - <string>Zoom factor for the face region. Applied before the patch is fed into the pose estimation model. There is a sweet spot near 1.</string> - </property> - <property name="minimum"> - <double>0.100000000000000</double> - </property> - <property name="maximum"> - <double>2.000000000000000</double> - </property> - <property name="singleStep"> - <double>0.010000000000000</double> - </property> - <property name="value"> - <double>1.000000000000000</double> - </property> - </widget> - </item> - <item row="0" column="13"> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <widget class="QLabel" name="threadCountLabel"> + <property name="text"> + <string>Thread Count</string> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="threadCount"> + <property name="toolTip"> + <string>Number of threads. Can be used to balance the CPU load between the game and the tracker.</string> + </property> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>32</number> + </property> + </widget> + </item> + <item> + <widget class="Line" name="line"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="showNetworkInput"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Show the image patch that the pose estimation model sees.</string> + </property> + <property name="text"> + <string>Show Network Input</string> + </property> + </widget> + </item> + <item> + <widget class="Line" name="line_2"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="roiFilterAlphaLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>ROI Smoothing Alpha</string> + </property> + </widget> + </item> + <item> + <widget class="QDoubleSpinBox" name="roiFilterAlpha"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="maximumSize"> + <size> + <width>150</width> + <height>16777215</height> + </size> + </property> + <property name="toolTip"> + <string>Amount of smoothing of the face region coordinates. Can help stabilize the pose.</string> + </property> + <property name="wrapping"> + <bool>false</bool> + </property> + <property name="decimals"> + <number>2</number> + </property> + <property name="maximum"> + <double>1.000000000000000</double> + </property> + <property name="singleStep"> + <double>0.010000000000000</double> + </property> + <property name="value"> + <double>1.000000000000000</double> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="roiZoomLabel"> + <property name="text"> + <string>ROI Zoom</string> + </property> + </widget> + </item> + <item> + <widget class="QDoubleSpinBox" name="roiZoom"> + <property name="toolTip"> + <string>Zoom factor for the face region. Applied before the patch is fed into the pose estimation model. There is a sweet spot near 1.</string> + </property> + <property name="minimum"> + <double>0.100000000000000</double> + </property> + <property name="maximum"> + <double>2.000000000000000</double> + </property> + <property name="singleStep"> + <double>0.010000000000000</double> + </property> + <property name="value"> + <double>1.000000000000000</double> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> </item> - </layout> - </widget> - </item> - <item row="4" column="0"> - <widget class="QGroupBox" name="groupBox_10"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="autoFillBackground"> - <bool>true</bool> - </property> - <property name="title"> - <string>Head Center Offset</string> - </property> - <layout class="QGridLayout" name="gridLayout_5"> - <item row="0" column="0"> - <widget class="QFrame" name="frame_4"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> + <item> + <widget class="QFrame" name="network_select_frame"> <property name="frameShape"> <enum>QFrame::NoFrame</enum> </property> <property name="frameShadow"> <enum>QFrame::Raised</enum> </property> - <layout class="QGridLayout" name="gridLayout_11"> - <property name="sizeConstraint"> - <enum>QLayout::SetDefaultConstraint</enum> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="leftMargin"> + <number>0</number> </property> - <property name="verticalSpacing"> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> <number>0</number> </property> - <item row="1" column="1"> - <widget class="QSpinBox" name="ty_spin"> - <property name="maximumSize"> - <size> - <width>150</width> - <height>16777215</height> - </size> - </property> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65536</number> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="label_66"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Right</string> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QSpinBox" name="tz_spin"> - <property name="maximumSize"> - <size> - <width>150</width> - <height>16777215</height> - </size> - </property> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65536</number> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="label_61"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Forward</string> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QSpinBox" name="tx_spin"> - <property name="maximumSize"> - <size> - <width>150</width> - <height>16777215</height> - </size> - </property> - <property name="suffix"> - <string> mm</string> - </property> - <property name="minimum"> - <number>-65535</number> - </property> - <property name="maximum"> - <number>65536</number> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="label_62"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Up</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item row="0" column="1"> - <widget class="QFrame" name="frame_5"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>260</width> - <height>0</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> <item> - <widget class="QLabel" name="label_59"> - <property name="text"> - <string>Use only yaw and pitch while calibrating. -Don't roll or change position.</string> + <widget class="QPushButton" name="posenetSelectButton"> + <property name="toolTip"> + <string>Select the pose network. Changes take affect on the next tracker start</string> </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - <property name="openExternalLinks"> - <bool>false</bool> + <property name="text"> + <string>Select Pose Net ONNX</string> </property> </widget> </item> <item> - <widget class="QLabel" name="sample_count_display"> + <widget class="QLabel" name="posenetFileDisplay"> <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="frameShape"> - <enum>QFrame::Panel</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Sunken</enum> - </property> <property name="text"> - <string/> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="tcalib_button"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>Start calibration</string> - </property> - <property name="checkable"> - <bool>true</bool> + <string><the pose net file></string> </property> </widget> </item> @@ -613,22 +673,6 @@ Don't roll or change position.</string> </layout> </widget> </item> - <item row="8" column="0"> - <widget class="QLabel" name="resolution_display"> - <property name="autoFillBackground"> - <bool>true</bool> - </property> - <property name="frameShape"> - <enum>QFrame::Panel</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Sunken</enum> - </property> - <property name="text"> - <string notr="true"/> - </property> - </widget> - </item> </layout> </widget> <resources/> |