learn_detector
executable.
learn_detector [--var value] ... [--exec config_file] ...
learn_detector
reads configuration data from learn_detector.cfg
in the current directory and acceps standard GVars3 command line arguments for setting variables and running other configuration files.The tree is serialized by the function tree_element::print(). This tree can be extracted from the output with the following command:
awk 'a&&!NF{exit}a;/Final tree/{a=1}'
filename
This file contains a direct implementation of section V of the accompanying paper, in the function learn_detector. For more information, refer to the section on optimization.
learn_detector
are in learn_detector.cfg
, which are the parameters described in to paper. They are:
//Training data //Make this point to the directory containing the repeatability data repeatability_dataset.directory=/home/edrosten/data/repeatability/box repeatability_dataset.size=3 repeatability_dataset.format=cam //Distince determining whether a point is repeated fuzz=5 //Iteration parameters Temperature.expo.scale=100 Temperature.expo.alpha=30 iterations=100000 //Threshold to use FAST_threshold=35 //Cost function parameters repeatability_scale=1 num_cost = 3500 max_nodes=10000 //Random tree parameters initial_tree_depth=2 offsets.min_radius=2.0 offsets.max_radius=4.2 //Change this one for different sequences random_seed=84175664 // Debugging debug.print_old_tree=0 debug.print_new_tree=0 debug.verify_detections=1 debug.verify_scores=1 gvarlist echo echo Log starts echo ========== echo
Variables can be overridden using the --varname
value
commandline syntax. For details on how the data loading and so on operated, refer to run_learn_detector.
Definition in file learn_detector.cc.
#include <iostream>
#include <fstream>
#include <climits>
#include <float.h>
#include <cstring>
#include <cerrno>
#include <cmath>
#include <vector>
#include <utility>
#include <algorithm>
#include <cvd/image_io.h>
#include <cvd/random.h>
#include <cvd/vector_image_ref.h>
#include <tag/tuple.h>
#include <tag/stdpp.h>
#include <tag/fn.h>
#include <tag/printf.h>
#include <TooN/TooN.h>
#include "gvars_vector.h"
#include "faster_tree.h"
#include "faster_bytecode.h"
#include "offsets.h"
#include "utility.h"
#include "load_data.h"
Go to the source code of this file.
Functions | |
double | sq (double d) |
vector< int > | range (int num) |
vector< ImageRef > | generate_disc (int radius) |
Image< bool > | paint_circles (const vector< ImageRef > &corners, const vector< ImageRef > &circle, ImageRef size) |
float | compute_repeatability (const vector< vector< Image< array< float, 2 > > > > &warps, const vector< vector< ImageRef > > &corners, int r, ImageRef size) |
tree_element * | random_tree (int d, bool is_eq_branch=1) |
double | compute_temperature (int i, int imax) |
tree_element * | learn_detector (const vector< Image< byte > > &images, const vector< vector< Image< array< float, 2 > > > > &warps) |
void | run_learn_detector (int argc, char **argv) |
int | main (int argc, char **argv) |