X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=folded-ctf.git;a=blobdiff_plain;f=folding.cc;h=c5929555450a7430d874ef73700bfb683e83dbb5;hp=34c785cbc59c316ab407942e37e880bc97f39dbe;hb=ccc2785ee823c934edcededc5c6448e4f9488f8b;hpb=82c3a0366dd58ea2b3a2fc3f90be3f1a42ac8341 diff --git a/folding.cc b/folding.cc index 34c785c..c592955 100644 --- a/folding.cc +++ b/folding.cc @@ -144,19 +144,6 @@ int main(int argc, char **argv) { } - else if(strcmp(new_argv[c], "write-target-poses") == 0) { - check(main_pool, "No pool available."); - LabelledImage *image; - for(int p = 0; p < main_pool->nb_images(); p++) { - image = main_pool->grab_image(p); - for(int t = 0; t < image->nb_targets(); t++) { - cout << "IMAGE " << p << " TARGET " << t << endl; - image->get_target_pose(t)->print(&cout); - } - main_pool->release_image(p); - } - } - ////////////////////////////////////////////////////////////////////// else if(strcmp(new_argv[c], "train-detector") == 0) { @@ -176,25 +163,6 @@ int main(int argc, char **argv) { detector->compute_thresholds(validation_pool, global.wanted_true_positive_rate); } - else if(strcmp(new_argv[c], "check-hierarchy") == 0) { - cout << "-- CHECK HIERARCHY ---------------------------------------------------" << endl; - PoseCellHierarchy *h = new PoseCellHierarchy(hierarchy_pool); - cout << "Train incompatible poses " << h->nb_incompatible_poses(train_pool) << endl; - cout << "Validation incompatible poses " << h->nb_incompatible_poses(validation_pool) << endl; - delete h; - } - - ////////////////////////////////////////////////////////////////////// - - else if(strcmp(new_argv[c], "validate-detector") == 0) { - cout << "-- VALIDATE DETECTOR -------------------------------------------------" << endl; - - check(validation_pool, "No validation pool available."); - check(detector, "No detector."); - - print_decimated_error_rate(global.nb_levels - 1, validation_pool, detector); - } - ////////////////////////////////////////////////////////////////////// else if(strcmp(new_argv[c], "test-detector") == 0) { @@ -210,18 +178,6 @@ int main(int argc, char **argv) { } } - else if(strcmp(new_argv[c], "parse-images") == 0) { - cout << "-- PARSING IMAGES -----------------------------------------------------" << endl; - check(detector, "No detector."); - while(!cin.eof()) { - char image_name[buffer_size]; - cin.getline(image_name, buffer_size); - if(strlen(image_name) > 0) { - parse_scene(detector, image_name); - } - } - } - ////////////////////////////////////////////////////////////////////// else if(strcmp(new_argv[c], "sequence-test-detector") == 0) { @@ -286,34 +242,6 @@ int main(int argc, char **argv) { write_pool_images_with_poses_and_referentials(train_pool, detector); } - else if(strcmp(new_argv[c], "produce-materials") == 0) { - cout << "-- PRODUCING MATERIALS -----------------------------------------------" << endl; - - check(hierarchy_pool, "No hierarchy pool available."); - check(test_pool, "No test pool available."); - - PoseCellHierarchy *hierarchy; - - cout << "Creating hierarchy" << endl; - - hierarchy = new PoseCellHierarchy(hierarchy_pool); - - LabelledImage *image; - for(int p = 0; p < test_pool->nb_images(); p++) { - image = test_pool->grab_image(p); - if(image->width() == 640 && image->height() == 480) { - PoseCellSet pcs; - hierarchy->add_root_cells(image, &pcs); - cout << "WE HAVE " << pcs.nb_cells() << " CELLS" << endl; - exit(0); - test_pool->release_image(p); - } - } - - delete hierarchy; - - } - ////////////////////////////////////////////////////////////////////// else {