Dahua Racist Uyghur Tracking Revealed

By IPVM Team, Published Nov 04, 2020, 10:13am EST

Dahua's software, published on its website, was revealed to track Uyghurs, a persecuted minority in China. The 1-minute video below explains the situation:

This confirms Dahua developed discriminatory software like its rival Hikvision, which promoted a Uyghur-detecting AI camera last year.

Dahua deleted the source minutes after IPVM contacted them and would not comment. In this post, we examine this incident.

What Happened

The news first began spreading on Twitter after engineer Serge Bazanski (@q3k) posted lines of code from Dahua's SDK showing "EM_NATION_TYPE_UYGUR" next to "维族(新疆)" which means "Uyghur (Xinjiang)":

IPVM Image

After @q3k's tweet, the news was widely shared on social media, including by Hong Kong activist Joshua Wong:

IPVM Image

Internet users criticized the Dahua code as "dismaying" and "sickening", noting "you have to be quite inhumane to write code that massively discriminates against a group of people like this."

Join IPVM Newsletter?

IPVM is the #1 authority in video surveillance news, in-depth tests, and training courses. Get emails, once a day, Monday to Friday.

Note: Dahua is not partially state-owned, to the contrary of the tweet above, unlike its crosstown rival Hikvision.

What Does The Code Mean?

"EM_NATION_TYPE_UYGUR" is a face attribute analytic that is widely deployed across Chinese police security camera networks to automatically determine whether a person is Uyghur (or not). The goal is to allow PRC police to covertly track Uyghurs as they move throughout a city/town.

Many Chinese surveillance companies such as Megvii, SenseTime, and Yitu offer this analytic as reported by The New York Times. "NATION" is short for nationality (民族), the term used in the PRC for ethnic groups.

IPVM previously found over a dozen PRC police departments deploying Uyghur analytics, which China's top law enforcement agency even included in facial recognition guidelines:

IPVM Image

The PRC government has been criticized by activists and (mostly) Western governments for human rights abuses against Uyghurs, chiefly by building a sprawling surveillance state in their home region of Xinjiang and sending millions to 're-education' camps.

Dahua Sanctions Over Uyghur Abuses

Dahua was sanctioned by the US government in October 2019 over complicity in human rights abuses against Uyghurs; in response, Dahua bragged this showcased its “strong technology”. Dahua is deeply involved in surveillance against Uyghurs, having won almost $1 billion in massive Xinjiang police surveillance deals.

Code Is On Dahua's Own Website

The SDK which mentions Uyghur recognition was available on Dahua's own Downloads page on its website which showed the SDK was current with the last update on April 21, 2020:

IPVM Image

Dahua Deletes SDK Minutes After IPVM Requests Comment

Minutes after IPVM contacted Dahua to request comment on this story, Dahua deleted that SDK. The Dahua downloads page now has a new SDK dated November 4 which does not include Uyghur recognition, IPVM verified.

Other Analytics Being Used

The Dahua SDK shows other analytics, including whether or not someone has a beard:

IPVM Image

Beard analytics are notable since the PRC government has cracked down on beards in Xinjiang for being a sign of religious piety (unlike in the US, in China men rarely have beards).

As noted online, the Dahua SDK also rates "attractiveness" on a 1-100 scale and has "race" detection ("black", "yellow", "white" are the only three 'races').

Dahua No Response

Although Dahua deleted the SDK less than 30 minutes after our request for comment, it did not respond to our questions about this code for more than a day. If Dahua later chooses to comment, we will update.

Conclusion

This incident highlights how pervasive anti-Uyghur discrimination is for PRC video surveillance companies, who profit from huge PRC police spending.

Dahua continues to avoid answering legitimate questions about its direct deals with the Xinjiang government, including selling software and services that discriminate against the persecuted Uyghur minority.

11 reports cite this report:

Tiandy PRC China Surveillance Giant - Tiger Chairs, Uyghur Tracking And Party Loyalty on Jul 19, 2021
While Tiandy is mostly unknown outside of China (PRC), even within the...
The Security Industry Association Expels Dahua on Jun 08, 2021
The Security Industry Association (SIA) has expelled Dahua for ethics...
BBC Panorama Documentary on AI Features IPVM on May 28, 2021
The world's longest-running news television program, BBC Panorama,...
Amazon Responds to US Senators On Dahua on Mar 18, 2021
Amazon has responded to the US Senators who questioned its purchase of Dahua...
Senators Question Amazon On Dahua 'Uyghur Warnings' on Feb 11, 2021
Two US Senators sent a letter questioning Amazon after IPVM and the LA Times...
Dahua Offers Race Recognition - "Black", "White", "Yellow" on Feb 09, 2021
Dahua offers race recognition, verified by Dahua's own software client, SDK,...
Dahua Provides "Uyghur Warnings" To China Police on Feb 09, 2021
Dahua provides "real-time Uyghur Warnings" to China police, as Dahua's own...
Patenting Uyghur Tracking - Huawei, Megvii, More on Jan 12, 2021
A patent application authored by Huawei and the PRC government includes...
Huawei / Megvii Uyghur Alarms on Dec 08, 2020
Huawei and Megvii worked together to test and validate Uyghur alarms,...
Uniview Racist Uyghur Recognition Revealed on Nov 16, 2020
Uniview, the PRC's third-largest video surveillance manufacturer and a major...
Milestone Denies Dahua "Joint Value Proposition" on Nov 11, 2020
Just days after Dahua's racist Uyghur tracking was revealed, Dahua ran...

Comments (26)

Only IPVM Subscribers may comment. Login or Join.

It's almost like installing gas chambers for the Nazi Germany concentration camps. I have heard they even practice forceful sterilization of Uyghur women there in China. I wouldn't buy equipment by such a manufacturer.

Agree: 5
Disagree
Informative: 6
Unhelpful: 4
Funny

This is in NO WAY even close to being equivalent to installing gas chambers. Is it complicity in human rights abuses, yes. Is it bad, yes. But for anyone to suggest that offering discriminatory surveillance code even remotely approaches the depravity and evil of a place like Mauthausen-Gusen, you are minimizing and downplaying the true horror of the Holocaust.

My grandfather was imprisoned in Mauthausen-Gusen and I've heard the stories, like him sleeping in the crematorium amongst piles of dead bodies. Don't even start with these ridiculous comparisons.

Agree: 4
Disagree
Informative: 1
Unhelpful: 3
Funny

google the words

Chinese State Shows ‘Intent to Destroy’ Uyghur People: Report

accuses the Chinese State of genocide.

Agree
Disagree
Informative
Unhelpful
Funny

When the NDAA bans aren’t enough, or the worst happens and Biden bends us back over for China, at least there’s horrific crimes against humanity to keep Hikvision and Dahua at bay.

Agree: 10
Disagree
Informative
Unhelpful: 3
Funny

There had to be one didn't there......? So let me guess who you voted for........

Agree
Disagree
Informative
Unhelpful: 4
Funny: 2

Update: SCMP has now covered this: Chinese surveillance giant expanding in the US attracts scrutiny over possible targeting of Uygurs | South China Morning Post

They include a response from Dahua:

“Dahua Technology does not sell products that feature [an] ethnicity-focused recognition function,” the company responded by email.

While making that denial, the SCMP simultaneously said that Dahua did not provide any other information:

With the new controversy, Dahua responded quickly by replacing the SDK files. The company, however, did not respond to additional inquiries about its code.

The Dahua SDK certainly was tracking Uyghurs specifically (and no other ethnicity/nationality) in that nation_type field. They still have offered no explanation for that so it is not clear if Dahua is telling the truth, lying, or omitting material information on why their SDK was tracking Uyghurs.

Agree
Disagree
Informative: 5
Unhelpful
Funny

Warning: I recently switched from de-caffeinated beverages, and I guess it shows.

As a coder it's pretty weird to see a base class called "MyStructure" - it's the kind of name you might use if you're just doing random stuff for fun. It suggests to me that not a lot of thought went into the naming of things in this SDK.

That said, I want to point out that what we're looking at are NOT functions, they're just a bunch of definition of identifiers that can be used in functions, and the twitter posts are not actually showing the functions that supposedly use/return these values.

It's not uncommon to add these sorts of things to SDK/APIs even before the capability is there (Apple fanboys enthusiasts often dig through the iOS SDKs to look for hints on future devices and capabilities). So, while I agree that this whole thing is ethically corrupt, I think it worth mentioning that we're looking at intent, and perverse as it is, it is not evidence of actual capability.

But does it really matter if Dahua or HikVision actually has this capability?

There's no question that building a robust classifier that can detect Uyghurs with good accuracy is - sick as it is - good marketing. There are plenty of people who are salivating at the idea of such a thing. Obviously not to detect Uyghurs, but maybe detect other kinds of people that you don't like (but obviously justified). Even if you have no intent to track any ethnic minority, you might walk away with the conclusion that these companies have magical and superior technology compared to their peers.

Dahua and the PRC clearly has an interest in having people believe they have this capability. Lots of people think they do, and often they'll point to a propaganda piece on YouTube that shows how China can detect if someone is slightly constipated from a 32x40px ROI. Shortly thereafter, YouTube with all their Google intelligence and accurate knowledge of my unsavory internet activity will suggest that I watch a 5 y/o review of some laptop I bought a long time ago.

What scares me is that a lot of people think that these systems are super accurate. Yes, it's surprising and fun when my Anki robot says "Hi Morten". It's fun that we can have algorithms that can recognize a bike, a car and a bag, but when you run these things, you'll see that quite often they fail and make mistakes a human never would. People tend to develop a blindness to the errors, and instead they make excuses "the sun was blinding the camera", "it was foggy", and instead latch on to the magical moments when it did work.

When the general perception is that tech is neutral, objective and accurate (it is neither), people may start to think that if the computer says you did it, then you did it. What possible motive could a computer have to lie? Despots usually love this sort of thing.

Sadly, I think banning Dahua/HikVision is to get PRC to stop the incarceration of Uyghurs, is a fools errand. If the campaign is successful, and Dahua and HikVision goes bankrupt, then four new companies will pop up like the heads of Medusa. If we ban all trade with China, then chances are the iron grip will just tighten as everyday citizens are hurt by the boycott - ultimately leading to more suffering.

As a professed misanthrope with no faith in humanity, its really hard for me to see a solution to this. Let's speak up when we see injustice, but you kinda get numb after a while. The media seems to be a constant barrage of things I should be upset about, so apathy has set in a looooong time ago. And then people don't buy Dahua, but instead order a ton of cheap Chinese junk from Bezos' mail-order company.

I'd like to see us waking up to the new reality of commerce. You can get all the parts needed to build a capable IP camera in China by just walking around Shenzhen, as a private person. This ability to create products with little friction is simply amazing. Contrast to the west where you have to go through NDAs, negotiations, people who won't talk to you because you're not ordering 20.000 units etc. That - combined with the "money for nothing" mentality that is being praised in the west will be our undoing.

NOTICE: This comment has been moved to its own discussion: Sadly, I Think Banning Dahua/Hikvision Is To Get PRC To Stop The Incarceration Of Uyghurs, Is A Fools Errand.

Agree: 3
Disagree: 1
Informative: 5
Unhelpful
Funny: 1

intent, and perverse as it is, it is not evidence of actual capability

Ahhh yes the age old Dahua business model we intend to be secure, identify you but we aren't actually capable of it.

Agree: 2
Disagree
Informative
Unhelpful
Funny: 4

RE " ....we're looking at intent, and perverse as it is, it is not evidence of actual capability..... "

OBSERVATION A programmer could compile some code that uses the SDK and do a trace to see if , when and where exactly how that #define value is used.

Agree
Disagree
Informative
Unhelpful
Funny

Update, US Senator criticizes Dahua on this:

Agree
Disagree
Informative: 1
Unhelpful
Funny

Sen. Blackburn, There has been "New evidence"...

Could this be a Hikvision ploy? 'Whomever did this, take 1 step forward [Hikvision takes 1 step back]

(just a little humor here folks)

Agree
Disagree
Informative
Unhelpful
Funny
Agree
Disagree
Informative
Unhelpful
Funny

... Paragraph #2 in the Daily Beast article is hilarious and likely 100% correct. Thanks for posting John.

Agree
Disagree
Informative
Unhelpful
Funny

For context, this is the start of paragraph #2:

In what can only be described as a massive fuck-up

While I don't know how Dahua came to do this, we have now talked to enough people 'close' to China tech companies that the most common reason we hearing was that they thought this was no big deal, i.e., inside of China, tracking ethnic minorities is not terribly controversial and surely a significant number think it is important for protecting safety and a 'harmonious society' as the China Foreign Ministry says.

Agree
Disagree
Informative: 1
Unhelpful
Funny

For context, this is the start of paragraph #2:

In what can only be described as a massive fuck-up

While I don't know how Dahua came to do this, we have now talked to enough people 'close' to China tech companies that the most common reason we hearing was that they thought this was no big deal, i.e., inside of China, tracking ethnic minorities is not terribly controversial and surely a significant number think it is important for protecting safety and a 'harmonious society' as the China Foreign Ministry says.

Agree
Disagree
Informative
Unhelpful
Funny

IPVM has been on this for a long time now, why the recent coverage? I’ve been begging for it and I’m thankful for it but represents a fairly staunch about face....

about face...

Agree
Disagree: 1
Informative
Unhelpful
Funny

but represents a fairly staunch about face....

what about face?

Agree: 1
Disagree
Informative
Unhelpful
Funny

"staunch face" recognition?

Agree
Disagree
Informative
Unhelpful
Funny

My co-worker just brought up this IPVM article, and yesterdays article on Uyghur "warnings" to China police to me this morning. Beyond feeling completely disgusted, I feel tremendous despair and sadness for those poor people who are being targeted for their race and religious beliefs.

This is disgusting, and morally reprehensible. Of course Hik and Dahua will keep up the lies, lies and more lies so they can carry out their morally corrupt motives. The more research I just did after hearing about this, the more outraged I became about all the inhumanity and depravity associated with it. Their use of this targeted technology is sick and the world is worse for it.

Enough is enough is enough. They are now clearly linked to exclusively using these brands, this surveillance technology for spying, ethnic cleansing initiatives and other nefarious social monitoring and manipulation motives. I'm not quite sure how many years working on and using this in China...it's so disgusting. We stopped selling HIK years ago and never bought Dahua. We will never, ever, buy those cameras, period.

I agree with a lot of what Morten Tor Nielsen says in his post and especially below, but I guess I am not numb. Sometimes I feel like a misanthrope too..so I can relate. It is hard with a constant barrage of negativity and injustice. I guess here we do what we can to educate each and every one of our customers, and potential customers every day on manufacturer ethics, product updates and potential pitfalls. I think doing that has helped; as the word has spread in our state over the past few years about viruses, security flaws, and now morally reprehensible surveillance activity linked to human rights abuse and ethnic cleansing.

"As a professed misanthrope with no faith in humanity, its really hard for me to see a solution to this. Let's speak up when we see injustice, but you kinda get numb after a while. The media seems to be a constant barrage of things I should be upset about, so apathy has set in a looooong time ago. And then people don't buy Dahua, but instead order a ton of cheap Chinese junk from Bezos' mail-order company."

Thank you to IPVM for their reporting on these issues. We routinely forward articles, and use them as a source of valuable information not only for product reviews, but for news like this that should be absolutely be shared with the installer community and beyond.

My thoughts and prayers go out to these people who are suffering, and I can only hope that there is enough outrage and reporting in the world on these morally bankrupt activities that might eventually make a difference somehow, sooner than later.

Agree: 2
Disagree
Informative: 2
Unhelpful
Funny

This isn’t new, IPVM has shone a light in this for a while now. Even considering these egregious acts IPVM continued to test, therefore highlight, nearly every new product they released. I’ve been fighting against there inclusion for just as long here.

Agree: 1
Disagree
Informative: 2
Unhelpful
Funny

I did not know IPVM was still continuing to test Dahua and Hik in shootouts?

Agree
Disagree
Informative
Unhelpful
Funny
Agree
Disagree
Informative
Unhelpful
Funny

Can always trust the mob to do the right thing especially when their own dollars are at stake, right?

Agree
Disagree
Informative
Unhelpful
Funny

Jason, as I explained before, we need to know how these things work. Presumably, you are not objecting to a recent Dahua test report like this - Dahua Emotion Analytics Tested where we exposed a host of problems.

Agree: 2
Disagree: 1
Informative: 1
Unhelpful: 1
Funny

I'd suggest not reviewing until they get their house in order - good or bad. Any news is good news, did you see the Oat Milk commercial during the Super Bowl?

Agree: 1
Disagree
Informative: 1
Unhelpful
Funny

In my view.. -always- the more fair and accurate information, the better. If IPVM does not continue to test and show results (some have been good and some have been less good) then it will fail to provide a cumulative view of the company and products.

The shootouts are a vehicle to refute a pundit that might claim that (Hikua product X) out performs (vendor product Y). Without this information, unfounded claims can be made.

In fact- this is and has always been the cornerstone of IPVM's value to the industry.

Agree: 1
Disagree: 1
Informative: 1
Unhelpful
Funny
Loading Related Reports