-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(ml): configurable batch size for facial recognition #13689
Conversation
| `MACHINE_LEARNING_ANN_FP16_TURBO` | Execute operations in FP16 precision: increasing speed, reducing precision (applies only to ARM-NN) | `False` | machine learning | | ||
| `MACHINE_LEARNING_ANN_TUNING_LEVEL` | ARM-NN GPU tuning level (1: rapid, 2: normal, 3: exhaustive) | `2` | machine learning | | ||
| `MACHINE_LEARNING_DEVICE_IDS`<sup>\*4</sup> | Device IDs to use in multi-GPU environments | `0` | machine learning | | ||
| `MACHINE_LEARNING_MAX_BATCH_SIZE__FACIAL_RECOGNITION` | Set the maximum number of faces that will be processed at once by the facial recognition model | None (`1` if using OpenVINO) | machine learning | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this a double underscore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It indicates a nesting level. Since there'll likely be other things batched in the future, these settings are grouped under max_batch_size
.
…13689) * configurable batch size, default openvino to 1 * update docs * don't add a new dependency for two lines * fix typing
Does this commit can solve my problem? |
I tested,It still not working.... |
Description
The facial recognition model currently receives all faces in an image in one pass. For OpenVINO users, this can lead to surprisingly high RAM usage because of its allocation patterns. This PR sets facial recognition to process faces one by one for OpenVINO without changing the behavior elsewhere. There is a new env to configure the batch size, both for users on e.g. CUDA who also want to set a limit, and for OpenVINO users with beefy systems that want to benefit from batching.
Fixes #13674
How Has This Been Tested?
Tested both with
MACHINE_LEARNING_MAX_BATCH_SIZE__FACIAL_RECOGNITION=2
and without setting the env and confirming that face detection works in both cases.