• Like
  • Save
SHOGUN使ってみました
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

SHOGUN使ってみました

  • 5,447 views
Published

第1回:はじめてのSHOGUN編

第1回:はじめてのSHOGUN編

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
5,447
On SlideShare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
0
Comments
0
Likes
7

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Transcript

  • 1. SHOGUN 2011 4 23 9 CV PRML @yasutomo57jp ( @inco_san )
  • 2. SHOGUN 1 SHOGUN 2011 4 23 9 CV PRML @yasutomo57jp ( @inco_san )
  • 3. SHOGUN
  • 4. *OpenCV * http://d.hatena.ne.jp/takmin/20110306/1299423617
  • 5. • SHOGUN
  • 6. • SHOGUN• 1 SHOGUN
  • 7. • SHOGUN• 1 SHOGUN • Static Interface
  • 8. • SHOGUN• 1 SHOGUN • Static Interface• 2 SHOGUN
  • 9. • SHOGUN• 1 SHOGUN • Static Interface• 2 SHOGUN • Modular Interface
  • 10. • SHOGUN• 1 SHOGUN • Static Interface• 2 SHOGUN • Modular Interface• 3 C++ ( )
  • 11. • SHOGUN• 1 SHOGUN • Static Interface• 2 SHOGUN • Modular Interface• 3 C++ ( ) • libshogun
  • 12. • SHOGUN• 1 SHOGUN • Static Interface• 2 SHOGUN • Modular Interface• 3 C++ ( ) • libshogun
  • 13. • SHOGUN• 1 SHOGUN • Static Interface• 2 SHOGUN • Modular Interface• 3 C++ ( ) • libshogun
  • 14. SHOGUN
  • 15. SHOGUN•
  • 16. SHOGUN• • SVM !
  • 17. SHOGUN• • SVM ! • SVM OCAS, Liblinear, LibSVM, SVMLight, SVMLin, GPDT
  • 18. SHOGUN• • SVM ! • SVM OCAS, Liblinear, LibSVM, SVMLight, SVMLin, GPDT • Linear, Polynomial, Gaussian and Sigmoid Kernel
  • 19. SHOGUN• • SVM ! • SVM OCAS, Liblinear, LibSVM, SVMLight, SVMLin, GPDT • Linear, Polynomial, Gaussian and Sigmoid Kernel •
  • 20. SHOGUN• SVM !! • LDA : Linear Discriminant Analysis • LPM : Linear Programming Machine • (Kernel) Perceptron • HMM
  • 21. SHOGUN••
  • 22. SHOGUN
  • 23. Q. Matlab
  • 24. Q. Matlab
  • 25. Octave
  • 26. Python
  • 27. Python
  • 28. Q. C++ …
  • 29.
  • 30.
  • 31. SHOGUN
  • 32. SHOGUN
  • 33. • Static Interface • •• Modular Interface • Python Octave •• libshogun • C++ •
  • 34. • Static Interface • •• Modular Interface • Python Octave •• libshogun • C++ •
  • 35. WindowsCygwinhttp://www.shogun-toolbox.org/#releases
  • 36. Windows Linux (Ubuntu)Cygwin sudo apt-get install shogunhttp://www.shogun-toolbox.org/#releases
  • 37. Windows Linux (Ubuntu)Cygwin sudo apt-get install shogunhttp://www.shogun-toolbox.org/#releases Macsudo port install shogun
  • 38. Windows Linux (Ubuntu)Cygwin sudo apt-get install shogunhttp://www.shogun-toolbox.org/#releases Macsudo port install shogun OK
  • 39. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVMc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 40. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVMc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 41. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVMc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 42. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVMc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 43. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVM libsvmc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 44. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVM libsvmc1 C 1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 45. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVM libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 46. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVM libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 47. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVM libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 48. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVM libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 49. SVM •• libsvm (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVM libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify out.txt
  • 50. •• libsvm (Cmdline )set_kernel SIGMOID REAL 50 3 0 (cache, gamma, coeff)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIBSVM libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify out.txt
  • 51. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHTc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 52. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHTc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 53. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHTc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 54. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHTc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 55. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHT libsvmc1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 56. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHT libsvmc1 C 1train_classifiersave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 57. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHT libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 58. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHT libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 59. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHT libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 60. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHT libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify
  • 61. SVM •• svmlight (Cmdline )set_kernel GAUSSIAN REAL 10 1.2 (cache, kernel width)set_features TRAIN ../data/fm_train_real.datset_labels TRAIN ../data/label_train_twoclass.datnew_classifier LIGHT libsvmc1 C 1train_classifier SVMsave_classifier libsvm.modelload_classifier libsvm.model LIBSVMset_features TEST ../data/fm_test_real.datout.txt=classify out.txt
  • 62. Python• sg ( from sg import sg ) • sg OK • Cmdline set_feature TEST data.dat • Python sg(‘set_feature’, ‘TEST’, ‘data.dat’) http://www.shogun-toolbox.org/doc/static_tutorial.html
  • 63. • SHOGUN
  • 64. • SHOGUN•3
  • 65. • SHOGUN•3 • Static Interface,Modular Interface, libshogun
  • 66. • SHOGUN•3 • Static Interface,Modular Interface, libshogun • Static Interface
  • 67. • SHOGUN•3 • Static Interface,Modular Interface, libshogun • Static Interface•
  • 68. • SHOGUN•3 • Static Interface,Modular Interface, libshogun • Static Interface•
  • 69. • SHOGUN•3 • Static Interface,Modular Interface, libshogun • Static Interface• Modular Interface