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

how to set 0 for the value "model_complexity" for holistictrackinggpu Android ? #4

Open
taeyeonlee opened this issue Jan 26, 2023 · 0 comments

Comments

@taeyeonlee
Copy link

taeyeonlee commented Jan 26, 2023

Hi @shadow111
Could you share how to set 0 for the value "model_complexity" for holistictrackinggpu Android ?

I modified the file (Mediapipe_Holistic\app\src\main\java\com\lite\holistic_tracking\holistic_activity.java) as like below,
but the apk doesn't change the value of model_complexity.

    private static final String INPUT_MODEL_COMPLEXITY = "model_complexity";
    private static final int NUM_MODEL_Complexity = 0;
    private static final String INPUT_REFINE_FACE_LANDMARKS = "refine_face_landmarks";
    
protected void onCreate(Bundle savedInstanceState) {
				...
        processor
                .getVideoSurfaceOutput()
                .setFlipY(
                        applicationInfo.metaData.getBoolean("flipFramesVertically", FLIP_FRAMES_VERTICALLY));

        PermissionHelper.checkAndRequestCameraPermissions(this);
        AndroidPacketCreator packetCreator = processor.getPacketCreator();
        Map<String, Packet> inputSidePackets = new HashMap<>();
        inputSidePackets.put(INPUT_MODEL_COMPLEXITY, packetCreator.createInt32(NUM_MODEL_Complexity));
        inputSidePackets.put(INPUT_REFINE_FACE_LANDMARKS, packetCreator.createInt32(0));
        processor.setInputSidePackets(inputSidePackets);

Thanks
Happy New Year~

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

No branches or pull requests

1 participant