Skip to content

Loss of FPS when program cant detect any face. #29

@JoyKaihatu

Description

@JoyKaihatu

Hello, after my testing. There are alot of FPS drop after i turn my face facing left and right. The FPS drop can be from 30 FPS constant down to 15 or sometime 12 FPS. I have try to fix the issue myself, and disabling the recognize thread seem to solve the issue and no more FPS drop when i turn my head or not facing the camera anymore.

Are there any permanent fix to this? Or any help on why its happening would help. Thanks

Note : Changing the main function of recognize.py
def main():
    """Main function to start face tracking and recognition threads."""
    file_name = "./face_tracking/config/config_tracking.yaml"
    config_tracking = load_config(file_name)

    # Start tracking thread
    thread_track = threading.Thread(
        target=tracking,
        args=(
            detector,
            config_tracking,
        ),
    )
    thread_track.start()

    # Disabling the Recognize Thread
    # Start recognition thread
    #thread_recognize = threading.Thread(target=recognize)
    #thread_recognize.start()  

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions