Images to confuse google image search

Image recognition algorithms are becoming widely used in many products and services.


Images like these were created to trick machine learning algorithms. The software sees each pattern as one of the digits 1 to 5.

A technique called deep learning has enabled Google and other companies to make breakthroughs in getting computers to understand the content of photos. Now researchers at Cornell University and the University of Wyoming have shown how to make images that fool such software into seeing things that aren’t there.

The researchers can create images that appear to a human as scrambled nonsense or simple geometric patterns, but are identified by the software as an everyday object such as a school bus. The trick images offer new insight into the differences between how real brains and the simple simulated neurons used in deep learning process images.

Researchers typically train deep learning software to recognize something of interest—say, a guitar—by showing it millions of pictures of guitars, each time telling the computer “This is a guitar.” After a while, the software can identify guitars in images it has never seen before, assigning its answer a confidence rating. It might give a guitar displayed alone on a white background a high confidence rating, and a guitar seen in the background of a grainy cluttered picture a lower confidence rating.

That approach has valuable applications such as facial recognition, or using software to process security or traffic camera footage, for example to measure traffic flows or spot suspicious activity.

But although the mathematical functions used to create an artificial neural network are understood individually, how they work together to decipher images is unknown. “We understand that they work, just not how they work,” says Jeff Clune, an assistant professor of computer science at the University of Wyoming. “They can learn to do things that we can’t even learn to do ourselves.”

These images look abstract to humans, but are seen by the image recognition algorithm they were designed to fool as the objects described in the labels.

To shed new light on how these networks operate, Clune’s group used a neural network called AlexNet that has achieved impressive results in image recognition. They operated it in reverse, asking a version of the software with no knowledge of guitars to create a picture of one, by generating random pixels across an image.

The researchers asked a second version of the network that had been trained to spot guitars to rate the images made by the first network. That confidence rating was used by the first network to refine its next attempt to create a guitar image. After thousands of rounds of this between the two pieces of software, the first network could make an image that the second network recognized as a guitar with 99 percent confidence.

However, to a human, those “guitar” images looked like colored TV static or simple patterns. Clune says this shows that the software is not interested in piecing together structural details like strings or a fretboard, as a human trying to identify something might be. Instead, the software seems to be looking at specific distance or color relationships between pixels, or overall color and texture.
That offers new insight into how artificial neural networks really work, says Clune, although more research is needed.

Ryan Adams, an assistant computer science professor at Harvard, says the results aren’t completely surprising. The fact that large areas of the trick images look like seas of static probably stems from the way networks are fed training images. The object of interest is usually only a small part of the photo, and the rest is unimportant.

Adams also points out that Clune’s research shows humans and artificial neural networks do have some things in common. Humans have been thinking they see everyday objects in random patterns—such as the stars—for millennia.

Clune says it would be possible to use his technique to fool image recognition algorithms when they are put to work in Web services and other products. However, it would be very difficult to pull off. For instance, Google has algorithms that filter out pornography from the results of its image search service. But to create images that would trick it, a prankster would need to know significant details about how Google’s software was designed.

 

 

BPG: A new, superior image format that really ought to kill off JPEG

BPG: A new, superior image format that really ought to kill off JPEG

JPEG vs. BPG, image qualityFor all of the massive technological advances that we’ve seen over the last few years, there are still a number of dinosaurs from a bygone era that, rather unfortunately, just won’t die. JPEG is one of the most prominent examples: It was created more than 20 years ago, and yet its antiquated, bloated, blocky algorithm still dominates the web. You would think, with the modern web being so image-oriented, that we would replace JPEG with something better — but no, it’s 2014 and JPEGs (and multi-megabyte GIFs!) still reign supreme.It’s not like people haven’t tried to replace JPEG — but, much like MP3 or ZIP, it’s very hard to unseat an incumbent file format (or, more accurately, a compression technology). The fact is, despite any misgivings we might have about JPEGs or GIFs, almost every computer system in the world can display them — and generally, in the grand scheme of communication, it’s much more important to make sure that your message was seen at all, rather than making sure the message is as small and as optimized as possible. Yes, ExtremeTech could start using a JPEG alternative, and revel in our smaller and faster page loads — but our excitement would be rather short-lived when we discover that, for 99.9% of our readers, the site looks like ass.JPEG (left) vs. WebP (right) image quality

One of the most famous attempts to replace JPEG was attempted by Google, with its WebP format — but four years on, and it’s still nothing more than a niche file format that hasn’t gained much widespread support outside of Google’s products and services. (The recent trend towards replacing animated GIFs with WebP is pleasing to see, however.) More recently, Mozilla started experimenting with mozjpeg, which reduces file sizes slightly (~10%) while still retaining JPEG compatibility (a big plus). And now, from the creator of FFMPEG and QEMU, Fabrice Bellard, we have BPG!

Short for Better Portable Graphics, BPG offers around the same image quality as JPEG, but at half the file size. To perform such witchcraft, BPG simply uses a newer codec — x265, the open-source implementation of HEVC/H.265. In essence, a BPG image is the same thing as taking a single frame out of an x265/H.265 video stream. We’ve talked about H.265 at length in the past, but basically it’s just a much better algorithm than JPEG — or MPEG-2 or H.264. Furthermore, BPG also has H.265’s ability to render 14 bits per color channel (JPEG is just 8), plus BPG also brings an alpha channel (transparency). Lossless compression is available (though I haven’t seen how it compares to PNG).

Image quality comparison: Mozjpeg left, BPG right

To see how BPG compares to JPEG and WebP. Move your mouse left and right and marvel at how bad JPEG is. The differences will be less pronounced if you go up to “medium” or “large” file sizes, but that’s because the window is very small — plus, with the shift towards mobile computing, it’s highly compressed images that are most important right now. BPG isn’t just for mobile users, though: 14-bit color, which allows for a much higher dynamic range than 8-bit JPEG or WebP, is perfectly suited to newer cameras and displays.

But, of course, at the end of the day, BPG is still just another file format/codec that has a grand total of no native support anywhere. For now, the only way of rendering a BPG file is with a BPG decoder written in JavaScript — about 71 kilobytes of JS, to be exact. Obviously, if you’re trying to cut down the footprint of a mobile website, downloading and executing yet more JavaScript kind of defeats the point. (On desktop PCs, though, the performance hit from using the JavaScript decoder will be minimal.) There is an open-source BPG library that browser makers and other software developers can build into their apps, but obviously mass integration will take months or years.

There is one other interesting aspect of BPG, too: Because it’s based on HEVC/H.265, any device with hardware decode support for H.265 can also decode BPGs in hardware. This is a big deal, because more advanced compression methods tend to require more computation (and thus power) to decode — which is a no-no on mobile devices. Hardware-decoded BPG would be better than JPEG in every which way — now we just have to pray for adoption by software developers.