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

Dev/patch 5 #144

Merged
merged 9 commits into from
Jan 13, 2025
Merged

Dev/patch 5 #144

merged 9 commits into from
Jan 13, 2025

Conversation

tunmx
Copy link
Member

@tunmx tunmx commented Jan 13, 2025

No description provided.

Copy link

devloai bot commented Jan 13, 2025

Automatic code review is enabled for this repository. Reviewing this PR now.

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 changes adding RKNN2 support and build system modifications. The implementation is technically sound, with good platform-specific handling. Suggested some improvements around documentation and build system structure to enhance maintainability and user experience. Please address the comments about documenting RKNN2-specific behavior and build system changes.

@@ -228,7 +228,11 @@ int32_t FacePipelineModule::InitMaskPredict(InspireModel &model) {

int32_t FacePipelineModule::InitRBGAntiSpoofing(InspireModel &model) {
auto input_size = model.Config().get<std::vector<int>>("input_size");
#ifdef INFERENCE_HELPER_ENABLE_RKNN2
m_rgb_anti_spoofing_ = std::make_shared<RBGAntiSpoofingAdapt>(input_size[0], true);
Copy link

Choose a reason for hiding this comment

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

Consider adding a comment explaining why the second parameter true is needed for RKNN2. This will help future maintainers understand the purpose of this conditional compilation.

@@ -98,9 +98,9 @@ cmake -DCMAKE_SYSTEM_NAME=Linux \
-DISF_ENABLE_BENCHMARK=OFF \
-DISF_ENABLE_USE_LFW_DATA=OFF \
-DISF_ENABLE_TEST_EVALUATION=OFF \
-DISF_BUILD_SHARED_LIBS=ON ${SCRIPT_DIR}
-DISF_BUILD_SHARED_LIBS=OFF ${SCRIPT_DIR}
Copy link

Choose a reason for hiding this comment

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

Changing from shared to static libraries is a significant change. Please document the rationale for this change in the commit message or PR description, as it affects how the library will be linked by clients.


make -j4
make install
# make install
Copy link

Choose a reason for hiding this comment

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

Instead of commenting out installation steps, consider making this configurable through a build flag. This would make it clearer when installation is intentionally skipped vs accidentally disabled.

@@ -118,6 +118,8 @@ TEST_CASE("test_FacePipeline", "[face_pipeline]") {
TEST_PRINT_OUTPUT(true);

SECTION("rgb liveness detect") {
#ifndef INFERENCE_HELPER_ENABLE_RKNN2
Copy link

Choose a reason for hiding this comment

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

The comment about quantization issues with RKNPU2 should be moved to a more visible location (like a known issues section in documentation) since this is an important limitation that affects functionality.

message("Enable RKNN Inference")
link_directories(${ISF_RKNN_API_LIB})
set(DEPEND rknn_api dl)
elseif(ISF_RKNPU_MAJOR STREQUAL "rknpu2" AND ISF_RK_COMPILER_TYPE STREQUAL "aarch64")
Copy link

Choose a reason for hiding this comment

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

The RKNN dependency logic is getting complex. Consider extracting the RKNN configuration into a separate CMake module file to improve maintainability and reusability across different parts of the build system.

@tunmx tunmx merged commit 1144d9b into master Jan 13, 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