Click here to Skip to main content
15,881,651 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
For those new to SVMs, what would be the best place to start if they want to train a SVM in C# on different images of characters distributed in their respective folders?

This is an assignment in our Image Processing course. We have been doing different IP algorithms on images in C# but, with almost no help from instructor, I have no clue how to deal with training SVMs in C# on a bunch of character images.

We haven't studied Machine Learning course yet. And through googling I have gotten some basic knowledge of SVMs. But still have no idea how to implement for training data in C#. Is there any library? As per my knowledge the machine will output a training file that will be used to recognize the text from images.

The training data looks like this: http://www.tiikoni.com/tis/view/?id=6b26c8e

Any help is appreciated.

What I have tried:

Tried understanding the basics of SVM. Not sure where to start.
Posted
Updated 22-Oct-18 1:07am

1 solution

Yes there are SVM libraries.
Bing search of "libsvm csharp" gives over 10,000 results (how many are useful?).
There are SVM implementations for use in .NET applications.
I suspect there are examples on using them.

If you really want to learn about Machine Learning and Classification systems, check out the Free, introductory Machine Learning online course from Caltech![^]
It won't give you the code, but you'll learn lots about how to do it yourself!
If you try taking the course, I suggest using Octave (a free Matlab-compatible system)[^] for practicing and homework.
SVM is covered in this course.
You probably want some of the ML background before digging into SVM. There's a reason it isn't near the beginning of the telecourse from Caltech! (My alma mater!)
Good luck.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 17-May-16 15:40pm    
5ed.
—SA
Matt T Heffron 17-May-16 16:50pm    
Thanks
AshRayX 17-May-16 16:07pm    
Thank you for replying. I understand ML background is required for a proper understanding. Since time is short, I don't think I will be able to take this course before the submission. As a beginner I want to know this: Would the libraries like libsvm or opencv etc. have functions that would take the training data to get a training file OR do we have to convert the training image to data to mathematical model/representation first?
Matt T Heffron 17-May-16 17:43pm    
Following up on my comment below.
ML on raw images is probably computationally intractable.
(At least, a very large computational requirement.)
Determining a small feature set that can be pre-computed easily is probably the only practical strategy.
My first thought would be first to trim and scale all the images to the same size (at least approximately align the baseline and horizontally center the trimmed image in the final size "canvas"), then get some simple features like horizontal and vertical symmetry, overall intensity.
Then, you should split the feature data into training and testing data sets.
Do this split randomly! Do not peek when choosing which data are for training vs. testing!
AshRayX 17-May-16 16:33pm    
Also what would be the most suitable library for this particular case. There is EMGU CV (OpenCV wrapper), libsvm C#. Whats the most suitable one? Any other one out there?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900