Robert Williams is a resident of Farmington Hills, Mich., and client of the American Civil Liberties Union.

I never thought I’d have to explain to my daughters why Daddy got arrested. How does one explain to two little girls that a computer got it wrong, but the police listened to it anyway?

While I was leaving work in January, my wife called and said a police officer had called and said I needed to turn myself in. I told her it was probably a prank. But as I pulled up to my house, a Detroit squad car was waiting in front. When I pulled into the driveway, the squad car swooped in from behind to block my SUV — as if I would make a run for it. One officer jumped out and asked if I was Robert Williams. I said I was. He told me I was under arrest. When I asked for a reason, he showed me a piece of paper with my name on it. The words “arrest warrant” and “felony larceny” were all I could make out.

By then, my wife, Melissa, was outside with our youngest in her arms, and my older daughter was peeking around my wife trying to see what was happening. I told my older daughter to go back inside, that the cops were making a mistake and that Daddy would be back in a minute.

But I wasn’t back in a minute. I was handcuffed and taken to the Detroit Detention Center.

As any other person would be, I was angry that this was happening to me. As any other black man would be, I had to consider what could happen if I asked too many questions or displayed my anger openly — even though I knew I had done nothing wrong.

When we arrived at the detention center, I was patted down probably seven times, asked to remove the strings from my shoes and hoodie and fingerprinted. They also took my mugshot. No one would tell me what crime they thought I’d committed. A full 18 hours went by. I spent the night on the floor of a filthy, overcrowded cell next to an overflowing trash can.

The next morning, two officers asked if I’d ever been to a Shinola watch store in Detroit. I said once, many years ago. They showed me a blurry surveillance camera photo of a black man and asked if it was me. I chuckled a bit. “No, that is not me.” He showed me another photo and said, “So I guess this isn’t you either?” I picked up the piece of paper, put it next to my face and said, “I hope you guys don’t think that all black men look alike.”

The cops looked at each other. I heard one say that “the computer must have gotten it wrong.” I asked if I was free to go now, and they said no. I was released from detention later that evening, after nearly 30 hours in holding.

I eventually got more information from an attorney referred to me by the American Civil Liberties Union of Michigan. Someone had stolen watches, and the store owner provided surveillance footage to the Detroit Police Department. They sent that footage to the Michigan State Police, who then ran it through their facial-recognition system. That system incorrectly spit out a photograph of me pulled from an old driver’s license picture.

Federal studies have shown that facial-recognition systems misidentify Asian and black people up to 100 times more often than white people. Why is law enforcement even allowed to use such technology when it obviously doesn’t work? I get angry when I hear companies, politicians and police talk about how this technology isn’t dangerous or flawed. What’s worse is that, before this happened to me, I actually believed them. I thought, what’s so terrible if they’re not invading our privacy and all they’re doing is using this technology to narrow in on a group of suspects?

I wouldn’t be surprised if others like me became suspects but didn’t know that a flawed technology made them guilty in the eyes of the law. I wouldn’t have known that facial recognition was used to arrest me had it not been for the cops who let it slip while interrogating me.

The ACLU is lodging a complaint against the police department on my behalf, but that likely won’t change much. My daughters can’t unsee me being handcuffed and put into a police car. But they can see me use this experience to bring some good into the world. That means helping make sure my daughters don’t grow up in a world where their driver’s license or Facebook photos could be used to target, track or harm them.

Even if this technology does become accurate (at the expense of people like me), I don’t want my daughters’ faces to be part of some government database. I don’t want cops showing up at their door because they were recorded at a protest the government didn’t like. I don’t want this technology automating and worsening the racist policies we’re protesting. I don’t want them to have a police record for something they didn’t do — like I now do.

I keep thinking about how lucky I was to have spent only one night in jail — as traumatizing as it was. Many black people won’t be so lucky. My family and I don’t want to live with that fear. I don’t want anyone to live with that fear.

Editor’s note: In response to request for comment from The Post, Nicole Kirkwood of the Detroit Police Department submitted this response: “The Detroit Police Department (DPD) does not make arrests based solely on Facial Recognition. Facial Recognition software is an investigative tool that is used to generate leads only. ... In reference to this case, an investigation was conducted. The investigator reviewed video, interviewed witnesses, conducted a photo line-up, and submitted a warrant package containing facts and circumstances, to the Wayne County Prosecutors Office (WCPO) for review and approval. The WCPO in return recommended charges that was endorsed by the magistrate/judge for Retail Fraud – First Degree." She also noted: “[T]his case predates our current policy, which only allows the use of the Facial Recognition software after a violent crime has been committed.”

Read more: