2 ///////////////////////////////////////////////////////////////////////////
3 // This program is free software: you can redistribute it and/or modify //
4 // it under the terms of the version 3 of the GNU General Public License //
5 // as published by the Free Software Foundation. //
7 // This program is distributed in the hope that it will be useful, but //
8 // WITHOUT ANY WARRANTY; without even the implied warranty of //
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //
10 // General Public License for more details. //
12 // You should have received a copy of the GNU General Public License //
13 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
15 // Written by Francois Fleuret, (C) IDIAP //
16 // Contact <francois.fleuret@idiap.ch> for comments & bug reports //
17 ///////////////////////////////////////////////////////////////////////////
27 #include "param_parser.h"
28 #include "progress_bar.h"
30 enum { LOSS_EXPONENTIAL,
39 int pictures_for_article;
41 char pool_name[buffer_size];
42 char test_pool_name[buffer_size];
43 char detector_name[buffer_size];
44 char result_path[buffer_size];
49 int material_feature_nb;
53 int nb_weak_learners_per_classifier;
54 int nb_classifiers_per_level;
57 scalar_t proportion_negative_cells_for_training;
58 int nb_negative_samples_per_positive;
59 int nb_features_for_boosting_optimization;
60 int force_head_belly_independence;
62 scalar_t proportion_for_train;
63 scalar_t proportion_for_validation;
64 scalar_t proportion_for_test;
65 bool write_validation_rocs;
66 bool write_parse_images;
67 bool write_tag_images;
68 scalar_t wanted_true_positive_rate;
69 int nb_wanted_true_positive_rates;
71 int nb_scales_per_power_of_two;
72 scalar_t min_head_radius;
73 scalar_t max_head_radius;
74 int root_cell_nb_xy_per_radius;
76 scalar_t pi_feature_window_min_size;
83 void init_parser(ParamParser *parser);
84 void read_parser(ParamParser *parser);
88 inline int scale_to_discrete_log_scale(scalar_t scale_ratio) {
89 return int(floor(log(scale_ratio) / log(2.0) * nb_scales_per_power_of_two));
92 inline scalar_t discrete_log_scale_to_scale(int discrete_scale) {
93 return exp( - scalar_t(discrete_scale) * log(2.0) / scalar_t(nb_scales_per_power_of_two));