-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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/batch predict age and gender #1396
Merged
serengil
merged 66 commits into
serengil:master
from
NatLee:feat/batch-predict-age-and-gender
Feb 16, 2025
+260
−31
Merged
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
c42df04
[update] add batch predicting for Age model
NatLee a4b1b5d
[update] add batch predicting for Gender model
NatLee b55cb31
[fix] name of model attributes `inputs`
NatLee 29c818d
[fix] line too long
NatLee 27e8fc9
[update] enhance predict methods to support single and batch inputs f…
NatLee 38c0652
[update] enhance predict methods in Emotion and Race models to suppor…
NatLee b9418eb
[fix] `input` to `inputs`
NatLee d992428
[update] embed into deepface module
NatLee e96ede3
[update] add multiple faces testing
NatLee e1417a0
Update master branch. Merge branch 'master' into feat/batch-predict-a…
h-alice f8be282
Update master branch. Merge branch 'master' into feat/merge-predicts-…
h-alice 9f3875e
Update master branch. Merge branch 'master' into feat/make-Race-and-E…
h-alice 9c079e9
Merge branch 'feat/batch-predict-age-and-gender' into feat/merge-pred…
h-alice bba4322
Merge branch 'feat/merge-predicts-functions' into feat/make-Race-and-…
h-alice 4cf43be
Merge pull request #4 from NatLee/feat/add-multi-face-test
NatLee 05dbc80
Merge pull request #2 from NatLee/feat/make-Race-and-Emotion-batch
NatLee c312684
Merge pull request #1 from NatLee/feat/merge-predicts-functions
NatLee ffbba7f
Change base class's predict signature.
h-alice edcef02
[update] remove dummy functions
NatLee 472f146
Avoid recreating `resp_objects`.
h-alice b69dcfc
Engineering stuff, remove redundant code.
h-alice 0f65a87
Add assertion to verify length of analyzed objects.
h-alice bb820a7
[update] one-line checking
NatLee e182285
Fix: Image batch dimension not expanded.
h-alice 69267cd
Merge pull request #5 from NatLee/patch/test-250103
h-alice 5747d96
Predictor.
h-alice 5a18814
Add comment.
h-alice 72b94d1
Add new predictor.
h-alice c647488
Merge remote-tracking branch 'origin/feat/batch-predict-age-and-gende…
NatLee e668cd4
Merge remote-tracking branch 'origin/master' into patch/adjustment-01…
NatLee 85e2d8d
[update] modify comment for multi models
NatLee ba0d0c5
[update] make process to one-line
NatLee 29141b3
[update] add hint for the shape of input img
NatLee 36fb512
[fix] handle between grayscale and RGB image for models
NatLee 431544a
[update] add process for single and multiple image
NatLee 0417732
[fix] model input size -> (n, w, h, c)
NatLee c44af00
[fix] check for input number of faces
NatLee ad577b4
[update] refactor response object creation in analyze function
NatLee 52a38ba
[fix] use prediction shape to avoid confuse situation of predictions
NatLee ba8c651
[fix] 1 img input for the `Emotion` model
NatLee 4284252
Remove obsolete comment.
h-alice eb7b841
Documentation
h-alice 688fbe6
[fix] lint
NatLee a442f7a
Merge remote-tracking branch 'origin/master' into patch/adjustment-01…
NatLee 8883b21
Merge pull request #6 from NatLee/patch/adjustment-0103-1
h-alice fa4044a
patch: Greyscale image prediction condition.
h-alice 910d6e1
patch: fix dimension.
h-alice 72b6db1
patch: fix dimension
h-alice a23893a
patch: emotion dimension.
h-alice da4a0c5
patch: Lint
h-alice c72b474
[update] lint
NatLee 7e719df
Patch: Make Age model capable to handle single or batched input.
h-alice 6a7bbdb
REVERT demography.py
h-alice 6a8d1d9
patch: Lint
h-alice 0d7e151
[update] rm `print`
NatLee 0971fcd
Merge commit '0d7e15147f527edc0ef09dadbd73f38d87972d1f' into feat/bat…
NatLee db4b749
[update] add emotions batch test
NatLee 95bb92c
Remove redundant squeeze.
h-alice 61b6931
[update] modify test of `emotion` and add client of `age`, `gender` a…
NatLee 6df7b7d
Add support for batched input.
h-alice b584d29
Refine some tests.
h-alice ee3093d
Merge branch 'feat/batch-predict-age-and-gender' of https://github.co…
h-alice 4d77931
Merge remote-tracking branch 'origin/master' into feat/batch-predict-…
NatLee 0ab3ac2
[fix] avoid problem of precision in float
NatLee 29b29c4
Merge remote-tracking branch 'origin/master' into feat/batch-predict-…
NatLee 01f872d
[update] mv control logic to `demography`
NatLee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Documentation
commit eb7b8411e88e275f6b625ac3f1405f46840fd514
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
i initially confused about why why squeeze first and expand dimensions second
would you please add a comment here something like:
we did perform squeeze and expand dimensions sequentially to have same behaviour for (224, 224, 3), (1, 224, 224, 3) and (n, 224, 224, 3)
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.
We took a look at the processing flow and discovered that the
squeeze
operation is unnecessary. Every single image input would have an expanded batch dimension of(1, 224, 224, 3)
, so there’s no need to handle inputs with this dimension.The redundant
squeeze
process has been removed.