forked from daandres/ml_soundwave_doppler_effect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README_SVM
42 lines (36 loc) · 2.49 KB
/
README_SVM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
### Readme for the SVM classifier in the gesture recognition application
The SVM module uses optimal separation by using hyperplanes between all classes. For SVM training is necessary.
The module provides both the classification with a SVM and the training itself. Additionally some
functions for better handling are provided.
### Features:
- create a svm with different input dimension size.
Many optimizations are provided by config parameters:
- slice_left: for a better performance this parameter slices a given number of samples in each frame at beginning, because they seems to be irrelevant
- slice_left: for a better performance this parameter slices a given number of samples in each frame at ending, because they seems to be irrelevant
- samples_per_frame: number of given samples per frame (64 samples per frame)
- used_classes: how many gestures should be used for training and classification
- new_preprocess: indicator for using the newer better preprocess algorithm
- framerange = one dataset consists of this number of frames
- timeout = number of frames to wait before looking for a new gesture starting point
- threshold: all samples under this value are ignored and set to zero
- smooth: value for the gaussian smoothing
- use_each_second: indicator for using only each second sample for a better performance
- kernel: svm kernel, can be rbf, linear, poly, sigmoid. rbf is recommended
- c: margin of separating hyperplane
- gamma: factor for kernels
- degree: degree for polynomial kernels
- coef0: coefficient for polynomial kernels
- used_gestures: comma-separated folder names for the used gestures
### Usage:
Config parameters are explained in config/default.cfg. On first start a config/personal.cfg file is created. Changes can be made here.
An already trained svm is provided and specified in default.cfg.
some commands for console:
u svm - loads SVM module
v - validates network against the testset and prints the error and a confmat
t - trains the network with the number of configured epochs
c - start classification
# Use these commands with care as some states checks and parsing functions are not compatible to customnames
l <svmpath> - load network from this file (.xml will be appended automatically)
s <svmpath> - saves the current network to this path (.xml will be appended automatically)
l ds <svmpath> - load dataset from this file (.data will be appended automatically)
s ds <svmpath> - saves the current dataset to this path (.data will be appended automatically)