{"action":"created","issue":{"url":"https://api.github.com/repos/liuruoze/EasyPR/issues/51","labels_url":"https://api.github.com/repos/liuruoze/EasyPR/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/liuruoze/EasyPR/issues/51/comments","events_url":"https://api.github.com/repos/liuruoze/EasyPR/issues/51/events","html_url":"https://github.com/liuruoze/EasyPR/issues/51","id":95832469,"number":51,"title":"如何自己训练 SVM 模型呢？","user":{"login":"Zhouguoduan","id":6828339,"avatar_url":"https://avatars.githubusercontent.com/u/6828339?v=3","gravatar_id":"","url":"https://api.github.com/users/Zhouguoduan","html_url":"https://github.com/Zhouguoduan","followers_url":"https://api.github.com/users/Zhouguoduan/followers","following_url":"https://api.github.com/users/Zhouguoduan/following{/other_user}","gists_url":"https://api.github.com/users/Zhouguoduan/gists{/gist_id}","starred_url":"https://api.github.com/users/Zhouguoduan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zhouguoduan/subscriptions","organizations_url":"https://api.github.com/users/Zhouguoduan/orgs","repos_url":"https://api.github.com/users/Zhouguoduan/repos","events_url":"https://api.github.com/users/Zhouguoduan/events{/privacy}","received_events_url":"https://api.github.com/users/Zhouguoduan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/liuruoze/EasyPR/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-18T15:17:13Z","updated_at":"2015-07-20T10:38:25Z","closed_at":null,"body":"我看了开发教程，也看了程序，还是没搞清楚我该怎么自己训练 SVM 模型。 请楼主点拨一下好吗？谢谢！"},"comment":{"url":"https://api.github.com/repos/liuruoze/EasyPR/issues/comments/122844473","html_url":"https://github.com/liuruoze/EasyPR/issues/51#issuecomment-122844473","issue_url":"https://api.github.com/repos/liuruoze/EasyPR/issues/51","id":122844473,"user":{"login":"Zhouguoduan","id":6828339,"avatar_url":"https://avatars.githubusercontent.com/u/6828339?v=3","gravatar_id":"","url":"https://api.github.com/users/Zhouguoduan","html_url":"https://github.com/Zhouguoduan","followers_url":"https://api.github.com/users/Zhouguoduan/followers","following_url":"https://api.github.com/users/Zhouguoduan/following{/other_user}","gists_url":"https://api.github.com/users/Zhouguoduan/gists{/gist_id}","starred_url":"https://api.github.com/users/Zhouguoduan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zhouguoduan/subscriptions","organizations_url":"https://api.github.com/users/Zhouguoduan/orgs","repos_url":"https://api.github.com/users/Zhouguoduan/repos","events_url":"https://api.github.com/users/Zhouguoduan/events{/privacy}","received_events_url":"https://api.github.com/users/Zhouguoduan/received_events","type":"User","site_admin":false},"created_at":"2015-07-20T10:38:25Z","updated_at":"2015-07-20T10:38:25Z","body":"前辈：\r\n\r\n谢谢您！这么快就答复我。我是图像处理专业的学生，被延期了，马上就要提交论文了，想自己训练SVM模型。我学过SVM，了解它的基本原理。\r\n\r\n我有几处疑问，劳烦您帮我解答一下好吗？期待着你的答复，谢谢！我的问题也许很小白，见笑了。\r\n\r\n问题1：我想用你的data来分组、训练、测试，看了教程中“如果你的数据还没分组，那么你执行 3 以后，系统自动帮你分组，然后训练，再测试验证。”，应该选择第3项，也就是“3. 车牌检测(not divide and train);”——会执行svm.train(false, false);  但是我这个地方（如下图）没看明白我看了函数的实现中if语句的条件，觉得应当是svm.train(true, true); 你帮我解释一下行吗？\r\n\r\n问题2：你的学习数据已经是打好标签的，训练和测试数据也建好文件夹了。因为train_svm.cpp中有这个函数Svm::Svm(const char* forward_data_folder, const char* inverse_data_folder): forward_(forward_data_folder), inverse_(inverse_data_folder) {assert(forward_); assert(inverse_);}，所以我在main.cpp的函数svmMain()中加了几句代码：\r\n\r\nchar * forward_data_folder = \"positive\";\r\n\r\n                                                char * inverse_data_folder = \"negative\";\r\n\r\n                                                Svm svm(forward_data_folder, inverse_data_folder);   但是我不知“positive”和“negative”应该写成什么。\r\n\r\n        问题3：你是否是把直方图均衡化之后的整幅图片的像素拉成向量，作为训练 svm 模型的输入数据呢？然后用高斯核，映射的向量的维数就是训练数据的总个数吧。我想做个对比试验，也就是使用相同的输入数据，用线性核也训练一下，你看可行吗？\r\n\r\n         期待着您的答复，万分感谢！\r\n\r\n \r\n\r\n——一个即将毕业的学生  小周\r\n\r\n发件人: liuruoze [mailto:notifications@github.com] \r\n发送时间: 2015年7月20日 14:08\r\n收件人: liuruoze/EasyPR\r\n抄送: Zhouguoduan\r\n主题: Re: [EasyPR] 如何自己训练 SVM 模型呢？ (#51)\r\n\r\n \r\n\r\n一个一个问题来吧，现在最不清楚的地方是哪呢？ PS：如果对SVM不清楚，最好先去学习一下。\r\n\r\n—\r\nReply to this email directly or view it on GitHub <https://github.com/liuruoze/EasyPR/issues/51#issuecomment-122772691> .  <https://github.com/notifications/beacon/AGgxM4d-9Kd5RH1mOtv6SQNRSOBkX4seks5ofIfDgaJpZM4FbPx4.gif> \r\n\r\n"}}