function cornell_detection()
fprintf('Cornell Detection.\n');
[config, file_info, fold_info] = config_cornell_detection();

results = cell(config.n_folds);
for fold_ind = 1:config.n_folds
    config.split_name = [config.split_root '_' num2str(fold_ind)];
    train_info = select_file_info(file_info, fold_info ~= fold_ind);
    test_info  = select_file_info(file_info, fold_info == fold_ind);

    compute_features(config, train_info, true)
    compute_features(config, test_info, false);

    path_ind = 1;
    feat_ind = 1;
    config.split_name = [config.split_root '_1'];
    feat_types = make_feat_set(config, path_ind, feat_ind);
    config.split_name = [config.split_root '_' num2str(fold_ind)];
    config.paths.model_results = ...
        fullfile(config.paths.results, 'detection_results', ...
                 make_model_name(config, [], path_ind, feat_ind));

    model = train_models(config, train_info, feat_types);
    results{fold_ind} = evaluate_cornell_detection(config, test_info, ...
                                                   feat_types, model);
end
keyboard
end
