0

I'm using cnn built by keras(tensorflow) to do visual recognition. I wonder if there is a way to know what my own tensorflow model "see". Google had a news showing the cat face in the AI brain.

https://www.smithsonianmag.com/innovation/one-step-closer-to-a-brain-79159265/

Can anybody tell me how to take out the image in my own cnn networks. For example, what my own cnn model recognize a car?

Dennis Lin
  • 65
  • 6

2 Answers2

1

We have to distinguish between what Tensorflow actually see:

As we go deeper into the network, the feature maps look less like the original image and more like an abstract representation of it. As you can see in block3_conv1 the cat is somewhat visible, but after that it becomes unrecognizable. The reason is that deeper feature maps encode high level concepts like “cat nose” or “dog ear” while lower level feature maps detect simple edges and shapes. That’s why deeper feature maps contain less information about the image and more about the class of the image. They still encode useful features, but they are less visually interpretable by us.

and what we can reconstruct from it as a result of some kind of reverse deconvolution (which is not a real math deconvolution in fact) process.

To answer to your real question, there is a lot of good example solution out there, one you can study it with success: Visualizing output of convolutional layer in tensorflow.

Geeocode
  • 5,705
  • 3
  • 20
  • 34
0

When you are building a model to perform visual recognition, you actually give it similar kinds of labelled data or pictures in this case to it to recognize so that it can modify its weights according to the training data. If you wish to build a model that can recognize a car, you have to perform training on a large train data containing labelled pictures. This type of recognition is basically a categorical recognition.

You can experiment with the MNIST dataset which provides with a dataset of pictures of digits for image recognition.

Meenal Jain
  • 33
  • 10