4
$\begingroup$

I turn to this forum for advice with the following problem. If you could please shed some light on any aspect of this question I'd be very grateful.

Problem decription:
I'm trying to use an SVM to segment a grayscale image of a puncture in polymer (original res. 1280x1024, can't post, no reputation :)

Now, I know this isn't probably the most conventional way to approach this problem, but still I'd like to try whether it is possible in any way.

My work so far:
I think of the segmentation problem as follows: classify a given pixel based on its value and neighborhood pixel values, i.e. determine whether pixel belongs to the foreground (puncture) or background (anything other than puncture).

I labeled this image using GIMP (for the SVM training purposes, i.e. marked the location of the puncture, i.e. each pixel is given a class (1 - puncture, -1 - background)) and tried to extract some simple features:

  1. central pixel value + neighborhood pixel values with varying size of neighborhood
  2. central pixel value + differences between central pixel value and neighborhood pixel values
  3. central pixel value + 2D FFT spectrum of the neighborhood (amplitude and phase components)
  4. standard deviation of the neighborhood

Note that I varied neighborhood size from 3x3 = 9 dimensions to 11x11 = 121 dimensions. I couldn't go higher (I use MATLAB for this, i'm getting out of memory errors). None of these were found sufficiently discriminatory. (I used PCA to inspect, calculated between-class distance of centroids and their respective class covariance matrices).

Soo, at last, to my question:
Could you think of any usefull features to use for this task? (I was thinking some measures of homogentity of the neighborhood would be helpfull, since inside of the puncture is more or less uniform in brightness, but haven't found any. Also maybe some texture features would be helpfull, but who knows.)

Cheers, Jacob

$\endgroup$
  • $\begingroup$ I'm not an image processing person, but perhaps you could try running a sobel or canny operator on the image to detect edges first? Also, how familiar are you with SVM? I ask because it is not a technique that generally works well 'out of the box' it requires some parameter tuning, kernel selection and feature scaling, etc.. If you aren't familiar with that and are getting poor results it could be due to that and not necessarily to the data or features themselves. You may already be doing that of course. $\endgroup$ – karenu Apr 27 '12 at 13:45
  • $\begingroup$ When I further looked into it, I think I'll use some kind of homogeneity measure. I don't know whole lotta about SVM, but I know a bit. One of the reasons why the neighborhood pixels aren't discriminatory enough is the fact that the neighborhood size is too small given the resolution 1280x1024. So I undersampled the image to 1/4th of it's resolution 320x256 and used 5x5 neighborhood, which seems to capture enough info about the center pixel's surroundings. Also the memory requirements went rapidly down after undersampling. Anyway thanks for the advice. $\endgroup$ – Jacob Apr 28 '12 at 14:44
  • 1
    $\begingroup$ If you haven't seen it, this practical guide to SVM is very useful: csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf $\endgroup$ – karenu Apr 28 '12 at 23:46
  • $\begingroup$ Yeah I'm reading it now :). I use their implementation libsvm. I discovered that I was using one-class svm and instead I should be using C-SVC. So this time I achieved approx. 75% accuracy using 7x7 neighborhood, central pixel value + amplitude and phase spectra as features (i.e. 99 dimensions) (C-SVC, kernel: RBF, not much of a parameter tunning) $\endgroup$ – Jacob Apr 30 '12 at 7:41
  • $\begingroup$ Parameter tuning makes a big difference - SVM is very sensitive to the parameters. In experiments I've run the parameters can change the results from 60% accuracy or less to > 99%. In running a grid search for parameters make sure you vary them in orders of magnitude from very small to large. So for C try something like 0.000001 0.00001, 0.0001, 0.001, 0.01, 0.1, 1, 10. It's similar for gamma for the RBF kernel. A common mistake is trying say 1,2,3,4,5..etc for C when what you need is 0.00001. $\endgroup$ – karenu Apr 30 '12 at 13:35
3
$\begingroup$

In my master thesis I did use (multi class) SVM not on features of a neighborhood but on features of a complete image.

Still, many of the features I used and that are somewhat explained and referenced in my paper may help you (NB. Not peer-reviewed).

Classification of Cell Images Using MPEG-7-influenced Descriptors and Support Vector Machines in Cell Morphology

Perhaps someone else can recommend a good book in image analysis and or computer vision that describes commonly used features?

$\endgroup$
  • $\begingroup$ Interesting topic of your thesis. I think I'll check out Homogeneous Texture Descriptors. $\endgroup$ – Jacob Apr 25 '12 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.