CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

Labels in matrix form

Open bulatGH opened this issue 10 years ago • 6 comments

Cannot find a way to use matrices as labels. In terms of image analysis, we can interpret labels as segmentation instead of classification.

Here is an example paper: Fully Convolutional Networks for Semantic Segmentation http://www.cs.berkeley.edu/~jonlong/long_shelhamer_fcn.pdf

bulatGH avatar May 06 '16 00:05 bulatGH

Hello, This is not supported yet. I'm currently working on enabling semantic segmentation via deconvolutional networks, I expect to have something working within 2 weeks or so.

Alexey-Kamenev avatar May 06 '16 03:05 Alexey-Kamenev

Hi, I was wondering if this could be theoretically done using 1D vector for labels and reshaping it inside for computing the error? Deconvolution is important, but even without it generation of segmentation is possible using 2D labels and rescaling of the segmentation results by the means of other software.

Another thing is reading 3D images. Maybe I have missed it but I did not find any information if this is implemented?

bulatGH avatar May 06 '16 03:05 bulatGH

The current problem is mostly related to ImageReader which supports only very basic format for the labels (essentially one class label per image) and does not support interaction with other readers (for example, you could read labels using text reader and images - ImageReader).

Reading 3D images is not yet supported - there is no reader for that. This is pity as CNTK supports ND convolutions and other things which would enable such scenarios in the network itself. We will welcome any contribution in this area, of course ;)

Alexey-Kamenev avatar May 06 '16 16:05 Alexey-Kamenev

Does it mean that I can use ImageInput class instead of ImageReader in order to use multivariable labels?

Basically speaking, would this work fine? features = ImageInput(imageW, imageH, 1, imageLayout=$imageLayout$) labels = ImageInput(3, 3, 1, imageLayout=$imageLayout$)

I think the simplest way of implementing 3D reader is to expand functionality of Reshape function. And very last thing, is there any instructions how to use BinaryReader? Using binary files, which are much more memory-efficient than txt and much faster to generate, can be very advantageous. Thanks

bulatGH avatar May 06 '16 16:05 bulatGH

@Alexey-Kamenev

Hi, Alexey, I am wondering if the semantic segmentation has been implemented? Is it in https://github.com/Microsoft/CNTK/tree/master/Examples/Image/MNIST (04_DeConv.ndl illustrates the usage of Deconvolution and Unpooling?) If it is not, can you please show me some links for it?

Thank you! Pin

pinzhang10 avatar Jul 11 '16 19:07 pinzhang10

The issue has been dormant for a long while. Please open a new issue if you still experience problems in the latest release.

wolfma61 avatar Jun 29 '17 12:06 wolfma61