Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/hyplmk2 #160

Merged
merged 3 commits into from
Feb 20, 2025
Merged

Feature/hyplmk2 #160

merged 3 commits into from
Feb 20, 2025

Conversation

tunmx
Copy link
Member

@tunmx tunmx commented Feb 20, 2025

No description provided.

Copy link

@devloai devloai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reviewed the facial landmark system changes. The implementation looks solid overall, but there are some important documentation and compatibility considerations that should be addressed. Key areas of focus are the tracking parameter changes, landmark remapping compatibility, and mean shape coordinate documentation.

Follow-up suggestions:

  1. @devloai please review the compatibility impact of the landmark remapping changes

const static int NOSE_CORNER = 100; ///< Landmark index for the tip of the nose.
const static int MOUTH_LEFT_CORNER = 104; ///< Landmark index for the left corner of the mouth.
const static int MOUTH_RIGHT_CORNER = 105; ///< Landmark index for the right corner of the mouth.
const static int MOUTH_LOWER = 84;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MOUTH_LOWER and MOUTH_UPPER constants are missing documentation comments unlike other landmark indices. Please add consistent documentation.

@@ -209,9 +209,9 @@ class INSPIRE_API FaceTrackModule {

bool m_detect_mode_landmark_{true}; ///< Detect mode landmark

int m_track_mode_num_smooth_cache_frame_ = 15; ///< Track mode number of smooth cache frame
int m_track_mode_num_smooth_cache_frame_ = 5; ///< Track mode number of smooth cache frame
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tracking smoothing parameters have been significantly changed (cache frames from 15 to 5, ratio from 0.025 to 0.05). Please document the rationale for these changes and their impact on tracking performance in the commit message or PR description.

@@ -11,10 +11,10 @@
namespace inspire {

// HyperLandmark left eye contour points sequence of dense facial landmarks.
const std::vector<int> HLMK_LEFT_EYE_POINTS_INDEX = {1, 34, 53, 59, 67, 3, 12, 94};
const std::vector<int> HLMK_LEFT_EYE_POINTS_INDEX = {51, 52, 53, 54, 55, 56, 57, 58};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The eye contour point indices have been completely remapped. This seems to be part of a larger landmark reorganization. Please ensure all dependent features (especially liveness detection) have been tested with these new indices. Consider adding a version check or migration guide if this breaks compatibility.

@@ -1,28 +1,43 @@
/**
* Created by Jingyu Yan
* @date 2024-10-01
* @date 2025-02-19
*/
#pragma once
#ifndef INSPIREFACE_MEAN_SHAPE_H
#define INSPIREFACE_MEAN_SHAPE_H

static const float mean_shape[212] = {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mean shape array has been completely reorganized with new coordinates. Consider:

  1. Adding a comment explaining the coordinate system and units
  2. Documenting how these values were derived
  3. Adding validation tests to ensure the new coordinates produce expected results

@tunmx tunmx merged commit 3230d9f into master Feb 20, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant