keplr-io / quiver

Interactive convnet features visualization for Keras
https://keplr-io.github.io/quiver/
MIT License
1.75k stars 223 forks source link

Problem with outputs visualization #48

Open ftiguidou opened 7 years ago

ftiguidou commented 7 years ago

Hi !

First, thank you for quiver, this is just an awesome tool ! I just have a few question concerning the visualization. I'm working with different picture resolutions and, for my work, I have been in need for using only 2 channels in my images. Because of quiver is not for that kind of use, I had in mind to set the 3rd channel to a constant (0 or 127 I guess), for the training and for the visualization (in order to have the correct feature maps).

I have been surprised to see that the visualization was very weird when loading my images : even for the input layer there was no constant channel (here is an example of what I've been seeing for a picture of cat in which I setted the blue channel to 0). One is nearly black but is not what it's supposed to be.

quiver_pb

I'm wondering if this is only for the input display or also for the feature maps, and if it's not those three layers which go through my network and so can also make my feature maps incorrect...

Any idea ?

ftiguidou commented 7 years ago

I allow myself to ask again for any idea someone could have related to this problem, I still have not any clue about why the feature map shows up this way...

kretes commented 7 years ago

From what I know about the internals of quiver - the activations at each layer are normalized to fill the whole space of color intensity, since they are first normalized to [0,1] and then saved to image using https://docs.scipy.org/doc/scipy-0.18.1/reference/generated/scipy.misc.imsave.html which is expanding values to fill the space of [0,255]

sodaGH commented 6 years ago

@ftiguidou Sorry to bother you. I want to do the visualization on my own model, but now I have problem running the demo. I first create an environment of python 3.5 by anaconda, and then get into the directory and installed the quiver by pip install quiver_engine . After that, I open the python and imported keras, when I run from quiver_engine import server, an error exist, it tells that: selection_014 I can't find the 'gevent.wsgi' file under the quiver_master directory. Could you please tell me how you run the demo and your own model? Do thanks a lot !!!

kettenfett commented 6 years ago

@sodaGH in server.py manually change

from gevent.wsgi import WSGIServer

to

from gevent.pywsgi import WSGIServer