Dahua Racist Uyghur Tracking Revealed

Published Nov 04, 2020 15:13 PM
PUBLIC - This article does not require an IPVM subscription. Feel free to share.

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."

Note: Dahua is not partially state-owned, to the contrary of the tweet above, unlike its crosstown rival Hikvision. (Update 08/16/22: Dahua now is partially state-owned. In 2021, state-owned China Mobile acquired 10.42% of Dahua.)

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.

Comments (26)
Avatar
Aydar Yakupov
Nov 04, 2020
Monitoreal Limited

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.

(5)
(6)
(4)
UI
Undisclosed Integrator #2
Nov 05, 2020

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.

(4)
(1)
(3)
UD
Undisclosed Distributor #6
Mar 12, 2021

google the words

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

accuses the Chinese State of genocide.

U
Undisclosed #1
Nov 04, 2020

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.

(10)
(3)
UI
Undisclosed Integrator #3
Nov 05, 2020

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

(4)
(2)
JH
John Honovich
Nov 05, 2020
IPVM

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.

(5)
Avatar
Morten Tor Nielsen
Nov 06, 2020
prescienta.com

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.

(3)
(1)
(5)
(1)
UI
Undisclosed Integrator #4
Nov 06, 2020

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.

(2)
(4)
UD
Undisclosed Distributor #6
Mar 12, 2021

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.

JH
John Honovich
Nov 11, 2020
IPVM

Update, US Senator criticizes Dahua on this:

(1)
U
Undisclosed #5
Dec 11, 2020

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)

JH
John Honovich
Nov 12, 2020
IPVM
U
Undisclosed #5
Dec 11, 2020

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

JH
John Honovich
Dec 11, 2020
IPVM

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.

(1)
JH
John Honovich
Dec 11, 2020
IPVM

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.

JC
Jason Crist
Nov 17, 2020
IPVMU Certified

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...

(1)
JH
John Honovich
Nov 18, 2020
IPVM

but represents a fairly staunch about face....

what about face?

(1)
U
Undisclosed #5
Dec 11, 2020

"staunch face" recognition?

CJ
Christine Jackson
Feb 10, 2021

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.

(2)
(2)
JC
Jason Crist
Feb 10, 2021
IPVMU Certified

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.

(1)
(2)
CJ
Christine Jackson
Feb 10, 2021

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

JC
Jason Crist
Feb 12, 2021
IPVMU Certified

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

JH
John Honovich
Feb 12, 2021
IPVM

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.

(2)
(1)
(1)
(1)
JC
Jason Crist
Feb 12, 2021
IPVMU Certified

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?

(1)
(1)
U
Undisclosed #5
Feb 13, 2021

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.

(1)
(1)
(1)