Show HN: DeepFace – A lightweight deep face recognition library for Python (github.com)
DeepFace is a leading open-source library for facial recognition and facial attribute analysis, and the de facto standard in Python. It wraps multiple state-of-the-art models that have reached — and even surpassed — human-level accuracy in recognizing faces.
By the numbers (as of early 2025): 15,000+ stars on GitHub; ~4 million installations via pip; 800+ citations in academic papers
Whether you're building a cutting-edge AI project or simply exploring facial recognition, DeepFace makes advanced capabilities accessible with just a few lines of code.
50 comments
[ 1.3 ms ] story [ 90.8 ms ] threadSo if a person looks much younger than their age in the judgement of an expert human, I wouldn't expect the model to do any better than that.
You should also know a lot of work in this area relies on photos of celebrities scraped from the internet - which is much easier than getting loads of labelled images of normal people in normal situations, which would be a total hassle practically and legally.
Of course that has some benefits - if you know the celebrity's date of birth and the date of the photo, you don't need to rely on human labelling to know the age of the person in the photo! But it has the major disadvantage that if your application doesn't involve professionally made up people with movie star looks in evening wear on red carpets - you might find real world performance falls short of the benchmark claims.
However, this is one of the few cases where presumably the data could be perfect, far exceeding the ability of a expert human.
Some things have no ground truth. For example, masking objects for training vision object detection models. Does the object end at this pixel or that one?
Besides, people not being the same is a fact of reality which really shouldn't be suppressed from consciousness too much, but that's perhaps a discussion for a different thread.
Part of the core human experience is to estimate these parameters in social settings. It's how we make friends, evaluate social situations, and navigate life. I can't imagine being told we should wear blindfolds. Why would it not be appropriate for computers to do so?
It's not like we'd be using these algorithms to make hiring decisions. We already have a lot of protective legislation on the books.
There are now cameras everywhere and now facial recognition is being integrated into everything, on top of all the other ways of essentially harvesting human rights and dignity for profit and oppressive purposes.
Your mention of ethical viability seems rather late to the situation, a bit of a feel of closing the barn door after the horses have bolted.
What humanity is creating here is more akin to the Matrix than people are able or willing to even acknowledge, even if it is many years out and turns out even worse than the limited imagination of people from the past. Maybe Her and The Terminator are more immediate phases of human development, but the trajectory is clearly there when you simply look at humanity’s tendencies over history and even now. Just as an example, did you ever think you would see something so nakedly and blatantly homicidal and evil as what the Israelis have done and are even still doing in Gaza? Does any of that indicate that humanity is going to do anything responsible and ethical?
The only purpose of appeals to ethics and morality appear to have been to disarm the dominant power by the subordinate power that aspires to become the dominant power in the world, an amoral, unethical, nakedly narcissistic and psychopathic power.
It's possible to estimate people into groups of stereotypes as determined by the people who created the models. But race/ethnicity? How can one do that when there is no formal taxonomy? Take the DeepFace example of how they are dong this.[0] They use FairFace to train on. FairFace "labels are East Asian, Southeast Asian, Indian, Black, White, Middle-Eastern and Latino-Hispanic." But the DeepFace guy adds "Merging both east and southeast Asian races into a single Asian race would be better."
This one can stereotype people into "Indian, Black, White, Middle-Eastern and Latino-Hispanic"; apparently they somehow know through images which Latinos are Spanish speaking and/or from counties related to Spain. And let's just merge east and southeast Asian people together into one "Asian"; never mind that many of these Asian countries are homogeneous societies both ethnically and culturally (and as applies to this, drastically different facially) with varying ethnic sub-groups within them.
All that before even getting started on the US. Genetically, many Americans are "multi-race", even the ones getting grouped into White or Black. This is a touchy subject for folks, but will leave this link[1]; it was so common, some states went out of their way to make sure "invisible blackness" was not getting by them.
In the same vein, Native tribes had their own rules for what to do with their "mixed" children. Lucky for them, if these kids were also "white" (though this is not the grouping DeepFace would put them; then they had a shot at getting land or payments when their tribes were...relocated) I mean there is no taxonomy for Natives in DeepFace so I guess they just go with other brown people here? I would not at all say that it is totally possible to estimate race, unless you are only looking for what will amount skin tone, even when that is not what they think they are doing.
Finally, this part of DeepFace's post on race/ethnicity[0]: "Recognizing ethnicity from face photos could contribute a huge contribution to missing children, search investigations, refugee crisis and genealogy research. " How? Me and a couple of my siblings offspring would be in at least 3 different groups using this (and not based on melanin production, we all look very not-related) . The DeepFace people must live in a very homogeneous society to think their logic on this subject is anything more than stereotyping.
[0] https://sefiks.com/2019/11/11/race-and-ethnicity-prediction-...
[1] https://en.wikipedia.org/wiki/One-drop_rule
You might not think it's a good idea, and it might be very unreliable, but you can't totally do it.
My 3rd sentence does exactly that.
"How can one do that when there is no formal taxonomy?"
If there is no race to estimate, why do you think you can?
Determining age, race and gender from an image is possible in the majority of cases. It becomes problematic when these are used as an indicator for predicting other variables (like IQ). This is a very real problem, and your argumentation just distracts from that.
While clustering tends to perform better after dimensionality reduction, selecting the optimal dimensions depends heavily on your specific use case. This makes it more complex than simply applying PCA or t-SNE.
It’s always curious to me how the peasants always seem eager to facilitate the interests of the monarchs to oppress them rather than their own interests to remain free from control by the narcissistic psychopathy of the ruling class prone to tyranny. What do you do as a peasant once you’ve closed the trap you created and led yourself into? I guess maybe more accurately would be to say that it is the aspirational minor nobility that facilitates the creation of the structure that serves the creation of oppressive, top down structures. It’s an odd human characteristic.
Doesn’t help with the climate crisis? No. Does it help with any of the ongoing health threats? No. Does it help hungry people finding food and healthcare or somehow advancing science or any cultural benefits? No.
Does it consume vast amounts of water and electricity to facilitate “bad example of humanity” use cases? Oh yes.
Just feel our priorities are not where they should be.
That's because that debate has already been lost starting in about 2000 to 2001. 9/11 was really the last nail in that coffin.
I would imagine other milestones for new and improved shittiness is the drug war, 1993 crime bill, prohibition, Woodrow Wilson and WWI, etc.
[1] https://www.npr.org/2021/05/07/982709480/massachusetts-pione...
[2] https://www.nytimes.com/2019/05/14/us/facial-recognition-ban...
[3] https://www.wired.com/story/face-recognition-banned-but-ever...
It’s even more shocking as this library also incorporates a great deal of cultural bias. e.g. gender, emotion are attributes which vary a lot more than what the models allow for.
I find mobile phone face unlock so useful, giving every citizen the power to use face recognition could be better than a few people, robots that identify someone and give them lifesaving medication are great (but the opposite, robot assassin can also be created). I guess it comes down to good people building good tools. Humans are generally kind and empathetic
There is a certain level of distrust since it can be abused and people think it will lead to a dystopian police state.
[0]: https://github.com/srugano/facematch
Edit: A quick search suggests that one HN upvote costs about 9 cents. I wonder why we don't see even more bots.