martinkersner / train-CRF-RNN

Train CRF-RNN for Semantic Image Segmentation
Other
199 stars 92 forks source link

Doubt on labelling of non-classes #4

Closed srika91 closed 8 years ago

srika91 commented 8 years ago

Suppose I have only two classes background and people.If an image contains people and some other class(other than background),can other class locations be taken as background?If that is not happening can I make other classes value in key:value pair as zero in palette? bcz by doing so am just training for only two classes people and background and other classes are taken as background?I cannot see where is this happening in the current set of codes,kindly guide me here.

martinkersner commented 8 years ago

You don't have to care about palette. It is used only for visualizing results, not for training.

In filter_images.py you specify which classes you are interested in. This script produces txt files (one file for each class) with names of images which contain labels you are interested in. After that, you are supposed to create LMDB database. During this process labels are renamed in order to be able to perform training. Then, if you want to run segmentation and get result with colors defined in palette you have to change labels accordingly.

srika91 commented 8 years ago

I think I have not put the question properly.In short,what happens to an image that contains classes we are interested in and the classes we are not interested. eg if interested class is "people",what happens to the image that contains not only"people" but also another not interested class "car"

martinkersner commented 8 years ago

I am not sure if I understand you correctly. If you train with class A, B and C, but the testing data contain even class D (which we didn't consider during training), the class D is going to be labeled as background. Labels in which are not interested in are relabeled as background during preprocessing.

srika91 commented 8 years ago

Does that preprocessing applies to training data,because even in images of A,B and C there may be class D?so what is happening to those pixels belonging to class D that may be present in images(.txt) of A,B and C?

martinkersner commented 8 years ago

As I said in previous comment "Labels in which are not interested in are relabeled as background during preprocessing."

srika91 commented 8 years ago

OK thats great.Thank you for your patient reply