-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem generating ADA models #63
Comments
I remember we didn't achieve great results with adaboost, however how long On Sat, Jan 30, 2016, 6:30 PM mastiffs92 notifications@github.com wrote:
|
@dbellavista |
We used adaboost in very early dev stage. At the moment my advice is to use svm, but we are also thinking to give a try with some random forest algorithm soon, opencv should also support that kind of algorithms. |
Hi Luke,I need to adaboost classificator for my thesis , from where I could start to understand the problem of the generation of models in adaboost? |
The number of models to be generated are 3 and in this case it works, do not see results, it is a test. |
Hi, Below the function altered in AdaBoostClassifier.cpp |
Understood, then maybe it's really a matter of time? |
I notice that this depend of the number of images per emotion in the file being generated. In the Kohn-Canade database there a lot of neutral and few contempt, for example. Then to generate a xml with neutral in the left part (eg. neutral_sadness_surprise_vs_anger_contempt_disgust_fear_happy_feats.xml) takes more time that for example, contempt_disgust_surprise_vs_anger_fear_happy_neutral_sadness_feats.xml. |
@mastiffs92, could you explain how you create the models with the three classes: openness, extraversion and conscientiousness? I'm interested in test with another set of classes. |
@egottardo Thanks you first of all, I'm trying to use this library to make recognition of personality. |
Update @egottardo |
Thanks for feedback. If the time is a constraint, changing de weak_count should be an option. However, the impact in accuracy should be measured. |
@egottardo I am using the method 1 vs allext. I'll know. |
Hi,
I'm trying to create a model using the ADA classifier running the following:
->python datasetInit.py --cfg my_dataset.cfg ../dataset
->python datasetFillCK.py --cfg my_dataset.cfg ../dataset ../ckimages ../ckemotion
->python train_models.py --cfg my_dataset.cfg --mode ada --prep-train-mode 1vsallext --eye-correction ../dataset
Initially, in order to generate the model with ADA, I needed to change the train_models.py file, fixing the parameter --mode to 'ada' instead of 'AdaBoost'.
After this change i can run the train_models.py, but the train_cli procedure starts, generates some files and stay running indefinitely without generating new files.
Using the SVM classifier i can generate models without any problem.
I would like to see if anyone could help me or if anyone has an ADA generated model that can be made available for testing.
Below the log generated in the execution and following the configuration file "my_dataset.cfg":
Thanks in advance for any help.
Ernani
ernani@Noteifrs ~/emotime-master/assets $ python train_models.py --cfg my_dataset.cfg --mode ada --prep-train-mode 1vsallext --eye-correction ../dataset
** Emotime **
[*] Remember! Before using the training, the dataset folder must be
initialized with datasetInit.py and datasetFillCK.py
[] Parameters:
[>] Dataset folder: ../dataset
[>] Configuration file: my_dataset.cfg
[>] Trainig mode: ada
[>] Trainig preparation mode: 1vsallext
[>] Eye correction: True
[>] Skip facecrop (WARNING): False
[1] Cropping faces...
INFO: start cropping faces with 'facecrop'
INFO: running facecropping with eye correction on neutral (228 of 228, 1 failed)
INFO: running facecropping with eye correction on anger (41 of 41, 0 failed)
INFO: running facecropping with eye correction on contempt (11 of 11, 0 failed)
INFO: running facecropping with eye correction on disgust (42 of 42, 0 failed)
INFO: running facecropping with eye correction on fear (19 of 19, 0 failed)
INFO: running facecropping with eye correction on happy (51 of 51, 0 failed)
INFO: running facecropping with eye correction on sadness (17 of 17, 0 failed)
INFO: running facecropping with eye correction on surprise (56 of 56, 1 failed)
[2] Computing features using bank of gabor magniture filters...
INFO: calculating gabor features
.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
[3] Preparing CSV files with training data using 1vsallext...
INFO: preparing training files for 1 to All Extended multiclass
[4] Training with ada and selecting relevant features...
INFO: dataset folder. ../dataset
INFO: classifFldr. ../dataset/classifiers/ada
INFO: starting training. ada
INFO: done contempt_disgust_vs_anger_fear_happy_neutral_sadness_surprise_feats
INFO: done contempt_neutral_vs_anger_disgust_fear_happy_sadness_surprise_feats
INFO: done contempt_vs_anger_disgust_fear_happy_neutral_sadness_surprise_feats
INFO: done anger_fear_happy_vs_contempt_disgust_neutral_sadness_surprise_feats
INFO: done anger_happy_neutral_vs_contempt_disgust_fear_sadness_surprise_feats
INFO: done fear_happy_neutral_vs_anger_contempt_disgust_sadness_surprise_feats
(*I aborted the process after about one hour of execution without any new generated file)
Configuração File= my_dataset.cfg
Example configuration file. This file will be overwritten
everytime you perfomrs an install
Classes to recognize
[CLASSES]
neutral: 0
anger: 1
contempt: 2
disgust: 3
fear: 4
happy: 5
sadness: 6
surprise: 7
[TRAINING]
Folder containing the raw images (should contain a subfolder for each classes to recognize)
IMAGES: training/images
Folder containing the cropped faces (should contain a subfolder for each classes to recognize)
FACES: training/faces
Folder containing the features calculated for each face image.
Should have a first layer of subfolder named as classes to recognize, and inside each
class subfolder should contains a folder for each face image that belongs to that class
FEATURES: training/features
[VALIDATION]
Folder containing the raw images (should contain a subfolder for each classes to recognize)
IMAGES: validation/images
Folder containing the cropped faces (should contain a subfolder for each classes to recognize)
FACES: validation/faces
Folder containing the features calculated for each face image.
Should have a first layer of subfolder named as classes to recognize, and inside each
class subfolder should contains a folder for each face image that belongs to that class
FEATURES: validation/features
[FOLDER]
Folder containing the csv files of the features for training set and validation set (one file per classifier)
TRAIN: trainfiles
Folder containing the trained classifiers (auspiciously should be opencv .xml files)
CLASSIFIER: classifiers
CLASSIFIER_ADA: classifiers/ada
CLASSIFIER_SVM: classifiers/svm
[SUFFIX]
Suffix of the folder which contains Gabor filtered images
FILTERED_FOLDER: _feats
Suffix of the file containing features in csv format
FEATURE_FILE: _feats.csv
[FACECROP]
TOOL: ./facecrop_cli
FACE_DETECTOR_CFG: ../resources/haarcascade_frontalface_default.xml
EYE_DETECTOR_CFG: ../resources/haarcascade_eye.xml
[SIZE]
Size of the images before features extraction
width: 48
height: 48
[GABOR]
TOOL: ./gaborbank_cli
FILTER_FILE: NA
FEAT_FNAME: gabor.yml
NWIDTHS: 3
NLAMBDAS: 5
NTHETAS: 4
[TRAIN]
Write samples features directly in the csv file prepared for training, this way is possible to use CvMLData.read_csv for
loading sample data. If "False" do not embed any feature in the csv file, instead specify the file path where to find
the feature matrix of the sample.
TOOL: ./train_cli
ADA_CPU_USAGE: 0.5
ADA_FILTER_FNAME: adaboost_featselection.dat
SVM_CPU_USAGE: 0.5
SVM_FILTER_FNAME: svm_featselection.dat
[DETECTION]
TOOL: ./emo_detector_cli
[GUI]
TOOL: ./emotimegui_cli
The text was updated successfully, but these errors were encountered: