CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

Individual pixel classification ideas?

Open PeterGriffioen opened this issue 10 years ago • 5 comments

I'm hoping to use CNTK to classify landcover of each pixel in a satellite image. I'm supplying say a 7x7 image of n-layers centered on the known class hoping the surroundings of the center pixel will provide context. eg a paddock tree surrounded by mostly paddock and usually occupying 1 or 2 pixels. How can I weight or bias the classification towards the center pixel such that later, say when trying to classify 2 pixels to the left in the actual paddock, the model hooks into the paddock training data rather than the tree which is recognizes on the periphery? I have the classification part working well on the training data but I suspect when I try to map the classes, smaller objects such as paddock trees will be smeared over many pixels as in effect, the whole 7x7 area has been classified as the tree.

Sorry that this more of a general design problem rather than one specific to CNTK but I'm hoping that someone here has ideas. Thanks in advance.

PeterGriffioen avatar Jul 21 '16 01:07 PeterGriffioen

Theoretically you should use a fully convolutional architecture. I had no luck training one in CNTK, so I am really curious if you manage to train a model.

pauldragan avatar Aug 24 '16 13:08 pauldragan

Thanks for the reference Paul. I'll look over it and report back on how I go. I'm pretty sure I'll be able to train the network although I haven't settled on the architecture. I'm not sure that it won't smear classes that generally occupy 1 pixel over a couple of pixels, but I'm hopeful. I'll be able to tell when I've modified my application software which applies the model. While that is not difficult, I'm somewhat distracted by a house renovation at the moment. Also I read in the abstract of that ref that they achieved 1 image in 0.2 sec! Ha! Not for me. Mine take 10-120 minutes over many machines. But then I am mainly doing 33k x24k (800,000,000) pixel images of the whole state (Victoria, Australia) or bigger, often with 20-70 layers in!

PeterGriffioen avatar Aug 24 '16 23:08 PeterGriffioen

Hi Paul, where did you get stuck?

frankseide avatar Aug 25 '16 01:08 frankseide

Hello Frank,

As I mentioned in this issue, I am trying to use a fully convolutional network (in CNTK 1.6 binary release) for image segmentation.

The problem is that my network is always trained, fairly quickly, to output 0 or close to 0 values (in the case of ReLU activations and some constant value around 0.4 for sigmoid activations) for every pixel of the image, regardless of what architecture I use (simple or complex) and what the input image is. I also took a closer look at the outputs of the individual layers and they all tend to 0.

I built my network starting from the 04_DeConv MNIST example and the macros defined there. I have just tested the example network more carefully and apparently it suffers from the same problem: the output is a constant 0 (after being trained for a number of epochs, say 20).

So here I got stuck, as I do not know whether I am having some hardware/software configuration related issues, using a flawed architecture, or experiencing some bugs.

pauldragan avatar Aug 25 '16 05:08 pauldragan

We have a new example for deconvolution which builds a simple auto encoder for MNIST images in both Python and BrainScript. Please check these links:

Examples/Image/GettingStarted/07_Deconvolution_PY.py

https://github.com/Microsoft/CNTK/wiki/Image-Auto-Encoder-Using-Deconvolution-And-Unpooling

I close this issue, feel free to reopen.

pkranen avatar Jan 24 '17 10:01 pkranen