Facebook still isn't as good as humans when it comes to identifying people in photos, but it's getting awfully close.

Facebook (FB) researchers published a paper last month in which they detailed the capabilities of a new artificial intelligence system known as "DeepFace." When asked whether two photos show the same person, DeepFace answers correctly 97.25% of the time; that's just a shade behind humans, who clock in at 97.53%.

Facebook already uses facial-recognition technology to suggest tags on photos uploaded by users; Google (GOOG) has similar technology for its Google+ social network. But DeepFace represents a big step forward.

Most current facial-recognition software struggles with images that don't include clear, frontal views of their subjects. That's not the case with DeepFace, which creates 3-D models of the faces in photos and then analyzes them using artificial-intelligence technology known as "deep learning."

Deep learning systems mimic the structure of neurons in the brain to analyze large data sets and draw connections. The DeepFace system conducts its analysis based on more than 120 million different parameters.

All this adds up to a substantial improvement on current state-of-the-art facial-recognition systems, the researchers said.

Related: Where your face is being tracked

For now, it's not clear how -- or if -- Facebook will use DeepFace. The technology remains "theoretical research," said Facebook spokeswoman Lydia Chan.

"[W]e don't currently use the techniques discussed in the paper on Facebook," she said.

But it's easy to see how more accurate facial recognition could be a boon for technology and marketing companies that rely on knowing your identity -- and a potential nightmare for privacy advocates.

Intel (INTC) has already developed digital signs that use facial-detection cameras and software to determine a consumer's age and gender and then tailor ads accordingly. Law enforcement agencies, meanwhile, have been been experimenting with facial recognition programs for investigation and surveillance.

More sophisticated software could mean individually targeted ads and the ability of governments to track the movements of citizens in public.

Related: Cameras on cops, coming to a town near you

The Federal Trade Commission issued recommendations on the use of facial recognition by private companies back in 2012, calling for consumers to be informed of its use and given the choice to opt out.

But the American Civil Liberties Union said these guidelines skirted the heart of the issue, which is whether anonymity in public "will come to an end through the use of face recognition technology and ever-more-pervasive video surveillance."

The Facebook researchers said in their paper that society will have to deal with these questions as the technology advances.

"The social and cultural implications of face recognition technologies are far reaching, yet the current performance gap in this domain between machines and the human visual system serves as a buffer from having to deal with these implications," the researchers wrote.

The DeepFace system, they added, "has closed the majority of the remaining gap."