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 //
16 // (C) Idiap Research Institute //
18 // Contact <francois.fleuret@idiap.ch> for comments & bug reports //
19 ///////////////////////////////////////////////////////////////////////////
23 We stuff all the global values in there.
35 #include "param_parser.h"
36 #include "progress_bar.h"
38 enum { LOSS_EXPONENTIAL,
46 int pictures_for_article;
48 char pool_name[buffer_size];
49 char test_pool_name[buffer_size];
50 char detector_name[buffer_size];
51 char result_path[buffer_size];
56 int material_feature_nb;
60 int nb_weak_learners_per_classifier;
61 int nb_classifiers_per_level;
64 scalar_t proportion_negative_cells_for_training;
65 int nb_negative_samples_per_positive;
66 int nb_features_for_boosting_optimization;
67 int force_head_belly_independence;
69 scalar_t proportion_for_train;
70 scalar_t proportion_for_validation;
71 scalar_t proportion_for_test;
72 bool write_validation_rocs;
73 bool write_parse_images;
74 bool write_tag_images;
75 scalar_t wanted_true_positive_rate;
76 int nb_wanted_true_positive_rates;
78 int nb_scales_per_power_of_two;
79 scalar_t min_head_radius;
80 scalar_t max_head_radius;
81 int root_cell_nb_xy_per_radius;
83 scalar_t pi_feature_window_min_size;
90 void init_parser(ParamParser *parser);
91 void read_parser(ParamParser *parser);
95 inline int scale_to_discrete_log_scale(scalar_t scale_ratio) {
96 return int(floor(log(scale_ratio) / log(2.0) * nb_scales_per_power_of_two));
99 inline scalar_t discrete_log_scale_to_scale(int discrete_scale) {
100 return exp( - scalar_t(discrete_scale) * log(2.0) / scalar_t(nb_scales_per_power_of_two));
104 extern Global global;