5
我想知道是否有人成功地使用了潛在支持向量機探測器(http://docs.opencv.org/modules/objdetect/doc/latent_svm.html)的OpenCV實現。有一個示例代碼展示瞭如何利用庫,但問題是示例代碼使用了使用MatLab生成的現成檢測器模型。有人能指導我完成如何生成我自己的探測器模型的步驟嗎?OpenCV和潛伏支持向量機探測器
我想知道是否有人成功地使用了潛在支持向量機探測器(http://docs.opencv.org/modules/objdetect/doc/latent_svm.html)的OpenCV實現。有一個示例代碼展示瞭如何利用庫,但問題是示例代碼使用了使用MatLab生成的現成檢測器模型。有人能指導我完成如何生成我自己的探測器模型的步驟嗎?OpenCV和潛伏支持向量機探測器
本文作者的MATLAB實現LatSVM有一個名爲pascal
的訓練腳本。有一個與壓縮包,解釋其用途的自述:
Using the learning code ======================= 1. Download and install the 2006-2011 PASCAL VOC devkit and dataset. (you should set VOCopts.testset='test' in VOCinit.m) 2. Modify 'voc_config.m' according to your configuration. 3. Start matlab. 4. Run the 'compile' function to compile the helper functions. (you may need to edit compile.m to use a different convolution routine depending on your system) 5. Use the 'pascal' script to train and evaluate a model. example: >> pascal('bicycle', 3); % train and evaluate a 6 component bicycle model The learning code saves a number of intermediate models in a model cache directory defined in 'voc_config.m'.
欲瞭解更多信息,請訪問authors website。該頁面還包含這種方法的論文。
根據您打算做的事情,您可能會發現在OpenCV(機器學習庫)中更通用的SVM實現效果更好。例如,對於簡單的HoG,只需創建一個SVM對象,計算HoG並使用'SVM :: train_auto()' – Bee 2012-11-21 22:43:04
@Yamaneko將其輸入到SVM中我已經使用您提到的MATLAB代碼訓練了許多模型,但是Cann找不到將這些模型轉換爲.xml格式的方法,以便我可以將它們與OpenCV代碼一起使用。 – 3yanlis1bos 2014-10-27 08:13:11