How to do training in matlab using SVM?
조회 수: 3 (최근 30일)
이전 댓글 표시
I have to detect humans from an image for that I should first train the system using SVM.How to do training in matlab using SVM?What is the code for the same?
댓글 수: 0
답변 (2개)
Dima Lisin
2015년 3월 13일
Hi Anushka,
First of all, you can use the vision.PeopleDetector object in the Computer Vision System Toolbox to detect humans. The object includes a pre-trained HOG-SVM classifier.
If you have to train your ow, then here's an example of how to train an SVM classifier for hand-written digits using HOG features.
Alternatively, you can use the trainCascadeObjectDetector. This function will train a boosted cascade classifier, rather than an SVM.
댓글 수: 0
Nikolay S.
2015년 3월 17일
편집: Nikolay S.
2015년 3월 17일
Good evening Anna.
Allow me to add my humble opinion.
To train and SVM , you need a series of positive and negative examples- usually you need hundreds/thousands of each, with negatives being much more (~x10, ~x20...) then positives. In case of images this will mean you need to have multiple examples of human figures photos as positives, and relevant images without such figures as negatives (we usually used all image regions without humans as negatives). This usually implies having sufficient database with ground truth markings/ annotations. Building this on your own is lots of work, but luckily for many problems under serious research you have available set of examples. Now, you convert each image (negative and positive) into a feature vector- resulting in a huge group of vectors- each with a priory know label- "positive" or "negative". You provide this to SVMtrain function (depending on the toolbox you're using), specifying SVN parameters- linear, RBF, etc, and voila, you got a trained SVN. Now, with SVNclassify- using the trained classifier and given a feature vector you will know whether is is considered positive and negative. You got Yourself a detector ! Good luck!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with Statistics and Machine Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!