In a world where technology is often used to manipulate photos to make them appear real, it sometimes is difficult to determine if a photo is edited or not -- but not for long as a team of researchers from Adobe and UC Berkeley have developed an AI to do just that.

In a new paper titled “Detecting Photoshopped Faces by Scripting Photoshop,” the researchers Sheng-Yu Wang, Oliver Wang, Andrew Owens, Richard Zhang and Alexei A. Efros said they were able to create a new AI that is capable of detecting images that were edited or warped using Photoshop.

How they did it

The team explained that they were able to create the AI by scripting Photoshop, and by feeding the AI fake images until it was able to detect the fake from the real photos. PetaPixel reported that the researchers used thousands of photos scraped from the internet. These photos were either edited automatically using a Photoshop script, or edited by a human artist.

They then compared the number of successful photoshopped image detections both people and the AI can do.

“We started by showing image pairs (an original and an alteration) to people who knew that one of the faces was altered,” said researcher Oliver Wang. “For this approach to be useful, [the AI] should be able to perform significantly better than the human eye at identifying edited faces.”

It works!

The researchers proudly said that the AI is better than people at detecting edited from non-edited images. Humans were able to identify edited photos about slightly more than half of the time (53 percent). The AI, on the other hand, successfully detected edited images almost all of the time (99 percent).

More than just knowing if an image is photoshopped, the AI is also capable of determining what part of the image was edited or warped, and is also capable of “undoing” the edit to return the image to how it originally looked like.

In the video shown below, the researchers showed the actual capabilities of the AI in determining a warped Photoshop image, what it thinks are the edits made to the image, and its suggested undos. The AI’s suggestions are almost identical to the original image, showing just how effective it is at detecting warped images.