2 * folded-ctf is an implementation of the folded hierarchy of
3 * classifiers for object detection, developed by Francois Fleuret
6 * Copyright (c) 2008 Idiap Research Institute, http://www.idiap.ch/
7 * Written by Francois Fleuret <francois.fleuret@idiap.ch>
9 * This file is part of folded-ctf.
11 * folded-ctf is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 3 as
13 * published by the Free Software Foundation.
15 * folded-ctf is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with folded-ctf. If not, see <http://www.gnu.org/licenses/>.
27 We stuff all the global values in there.
39 #include "param_parser.h"
40 #include "progress_bar.h"
42 enum { LOSS_EXPONENTIAL,
50 int pictures_for_article;
52 char pool_name[buffer_size];
53 char test_pool_name[buffer_size];
54 char detector_name[buffer_size];
55 char result_path[buffer_size];
60 int material_feature_nb;
64 int nb_weak_learners_per_classifier;
65 int nb_classifiers_per_level;
68 scalar_t proportion_negative_cells_for_training;
69 int nb_negative_samples_per_positive;
70 int nb_features_for_boosting_optimization;
71 int force_head_belly_independence;
73 scalar_t proportion_for_train;
74 scalar_t proportion_for_validation;
75 scalar_t proportion_for_test;
76 bool write_validation_rocs;
77 bool write_parse_images;
78 bool write_tag_images;
79 scalar_t wanted_true_positive_rate;
80 int nb_wanted_true_positive_rates;
82 int nb_scales_per_power_of_two;
83 scalar_t min_head_radius;
84 scalar_t max_head_radius;
85 int root_cell_nb_xy_per_radius;
87 scalar_t pi_feature_window_min_size;
94 void init_parser(ParamParser *parser);
95 void read_parser(ParamParser *parser);
99 inline int scale_to_discrete_log_scale(scalar_t scale_ratio) {
100 return int(floor(log(scale_ratio) / log(2.0) * nb_scales_per_power_of_two));
103 inline scalar_t discrete_log_scale_to_scale(int discrete_scale) {
104 return exp( - scalar_t(discrete_scale) * log(2.0) / scalar_t(nb_scales_per_power_of_two));
108 extern Global global;