diff --git a/gui/OpenFaceOffline/MainWindow.xaml.cs b/gui/OpenFaceOffline/MainWindow.xaml.cs index 097846e..bc29ecb 100644 --- a/gui/OpenFaceOffline/MainWindow.xaml.cs +++ b/gui/OpenFaceOffline/MainWindow.xaml.cs @@ -559,9 +559,10 @@ namespace OpenFaceOffline nonRigidGraph.Update(non_rigid_params); // Update eye gaze - GazeXLabel.Content = gaze_angle.Item1 * (180.0 / Math.PI); - GazeYLabel.Content = gaze_angle.Item2 * (180.0 / Math.PI); - + String x_angle = String.Format("{0:F0}°", gaze_angle.Item1 * (180.0 / Math.PI)); + String y_angle = String.Format("{0:F0}°", gaze_angle.Item2 * (180.0 / Math.PI)); + GazeXLabel.Content = x_angle; + GazeYLabel.Content = y_angle; } if (show_tracked_video) @@ -695,7 +696,7 @@ namespace OpenFaceOffline // ---------------------------------------------------------- - // Recording helpers (TODO simplify) + // Recording helpers private void SetupRecording(String root, String filename, int width, int height, bool output_2D_landmarks, bool output_3D_landmarks, bool output_model_params, bool output_pose, bool output_AUs, bool output_gaze) diff --git a/lib/local/CppInerop/FaceAnalyserInterop.h b/lib/local/CppInerop/FaceAnalyserInterop.h index 4742cda..4c38beb 100644 --- a/lib/local/CppInerop/FaceAnalyserInterop.h +++ b/lib/local/CppInerop/FaceAnalyserInterop.h @@ -302,7 +302,7 @@ public: clnf->GetPose(pose_list, fx, fy, cx, cy); cv::Vec6d pose(pose_list[0], pose_list[1], pose_list[2], pose_list[3], pose_list[4], pose_list[5]); - cv::Vec2d gaze_angle = FaceAnalysis::GetGazeAngle(*gazeDirection0, *gazeDirection1, pose); + *gazeAngle = FaceAnalysis::GetGazeAngle(*gazeDirection0, *gazeDirection1, pose); // Grab pupil locations int part_left = -1; diff --git a/lib/local/FaceAnalyser/src/GazeEstimation.cpp b/lib/local/FaceAnalyser/src/GazeEstimation.cpp index 0769a2b..5a8766f 100644 --- a/lib/local/FaceAnalyser/src/GazeEstimation.cpp +++ b/lib/local/FaceAnalyser/src/GazeEstimation.cpp @@ -163,7 +163,6 @@ cv::Vec2d FaceAnalysis::GetGazeAngle(cv::Point3f& gaze_vector_1, cv::Point3f& ga cv::Vec3d eulerAngles(head_pose(3), head_pose(4), head_pose(5)); cv::Matx33d rotMat = LandmarkDetector::Euler2RotationMatrix(eulerAngles); cv::Point3f gaze_point = (gaze_vector_1 + gaze_vector_2) / 2; - double gaze_diff = acos(gaze_vector_1.dot(gaze_vector_2)); cv::Vec3d gaze(gaze_point.x, gaze_point.y, gaze_point.z); gaze = rotMat * gaze; diff --git a/matlab_runners/Action Unit Experiments/results/BP4D_valid_res_class.txt b/matlab_runners/Action Unit Experiments/results/BP4D_valid_res_class.txt index 7e624a5..ceee815 100644 --- a/matlab_runners/Action Unit Experiments/results/BP4D_valid_res_class.txt +++ b/matlab_runners/Action Unit Experiments/results/BP4D_valid_res_class.txt @@ -1,11 +1,11 @@ -AU1 class, Precision - 0.501, Recall - 0.521, F1 - 0.511 -AU2 class, Precision - 0.379, Recall - 0.451, F1 - 0.412 +AU1 class, Precision - 0.500, Recall - 0.522, F1 - 0.511 +AU2 class, Precision - 0.380, Recall - 0.450, F1 - 0.412 AU4 class, Precision - 0.459, Recall - 0.503, F1 - 0.480 AU6 class, Precision - 0.738, Recall - 0.774, F1 - 0.755 AU7 class, Precision - 0.762, Recall - 0.732, F1 - 0.747 AU10 class, Precision - 0.847, Recall - 0.842, F1 - 0.844 AU12 class, Precision - 0.888, Recall - 0.816, F1 - 0.850 AU14 class, Precision - 0.547, Recall - 0.807, F1 - 0.652 -AU15 class, Precision - 0.402, Recall - 0.416, F1 - 0.409 -AU17 class, Precision - 0.632, Recall - 0.592, F1 - 0.611 +AU15 class, Precision - 0.396, Recall - 0.419, F1 - 0.407 +AU17 class, Precision - 0.630, Recall - 0.593, F1 - 0.611 AU23 class, Precision - 0.338, Recall - 0.597, F1 - 0.431 diff --git a/matlab_runners/Action Unit Experiments/results/BP4D_valid_res_int.txt b/matlab_runners/Action Unit Experiments/results/BP4D_valid_res_int.txt index 6046302..270d61d 100644 --- a/matlab_runners/Action Unit Experiments/results/BP4D_valid_res_int.txt +++ b/matlab_runners/Action Unit Experiments/results/BP4D_valid_res_int.txt @@ -2,4 +2,4 @@ AU6 results - rms 0.863, corr 0.780, ccc - 0.735 AU10 results - rms 1.035, corr 0.738, ccc - 0.684 AU12 results - rms 0.814, corr 0.867, ccc - 0.834 AU14 results - rms 1.107, corr 0.531, ccc - 0.486 -AU17 results - rms 0.834, corr 0.592, ccc - 0.487 +AU17 results - rms 0.834, corr 0.592, ccc - 0.488 diff --git a/matlab_runners/Action Unit Experiments/run_AU_prediction_UNBC.m b/matlab_runners/Action Unit Experiments/run_AU_prediction_UNBC.m index 8738b13..c6fbd8b 100644 --- a/matlab_runners/Action Unit Experiments/run_AU_prediction_UNBC.m +++ b/matlab_runners/Action Unit Experiments/run_AU_prediction_UNBC.m @@ -98,7 +98,7 @@ end %% f = fopen('results/UNBC_valid_res_int.txt', 'w'); -ints_cccs = zeros(1, numel(aus_UNBC); +ints_cccs = zeros(1, numel(aus_UNBC)); for au = 1:numel(aus_UNBC) [ accuracies, F1s, corrs, ccc, rms, classes ] = evaluate_au_prediction_results( preds_all_int(:, inds_au_int(au)), labels_gt(:,au)); diff --git a/matlab_runners/Gaze Experiments/mpii_1500_errs.mat b/matlab_runners/Gaze Experiments/mpii_1500_errs.mat index dd07001..9fc28de 100644 Binary files a/matlab_runners/Gaze Experiments/mpii_1500_errs.mat and b/matlab_runners/Gaze Experiments/mpii_1500_errs.mat differ diff --git a/matlab_runners/Gaze Experiments/mpii_1500_errs.txt b/matlab_runners/Gaze Experiments/mpii_1500_errs.txt index d91a12a..de61d41 100644 --- a/matlab_runners/Gaze Experiments/mpii_1500_errs.txt +++ b/matlab_runners/Gaze Experiments/mpii_1500_errs.txt @@ -1,2 +1,2 @@ Mean error, median error -9.431, 8.733 +9.428, 8.730