Commit 5722a33502c3a71391ea0fc4c022e7849f3fed2a
1 parent
694a3826
Revert "introduced BR_DISABLE_ALGORITHMS to ship a limited version of br command line"
This reverts commit 694a3826d0d03713b2070c40431f8ecf3d0b3663.
Showing
3 changed files
with
4 additions
and
18 deletions
app/CMakeLists.txt
| 1 | # Build the command line interface | 1 | # Build the command line interface |
| 2 | -add_subdirectory(br) | ||
| 3 | - | ||
| 4 | if(NOT BR_PACKAGE_THIRDPARTY) | 2 | if(NOT BR_PACKAGE_THIRDPARTY) |
| 5 | if(NOT BR_EMBEDDED) | 3 | if(NOT BR_EMBEDDED) |
| 4 | + add_subdirectory(br) | ||
| 5 | + | ||
| 6 | # Build examples/tests | 6 | # Build examples/tests |
| 7 | add_subdirectory(examples) | 7 | add_subdirectory(examples) |
| 8 | 8 |
app/br/CMakeLists.txt
| @@ -2,10 +2,6 @@ if(UNIX) | @@ -2,10 +2,6 @@ if(UNIX) | ||
| 2 | find_package(Threads REQUIRED) | 2 | find_package(Threads REQUIRED) |
| 3 | endif() | 3 | endif() |
| 4 | 4 | ||
| 5 | -if(BR_DISABLE_ALGORITHMS) | ||
| 6 | - add_definitions(-DBR_DISABLE_ALGORITHMS) | ||
| 7 | -endif() | ||
| 8 | - | ||
| 9 | add_executable(br br.cpp ${BR_RESOURCES}) | 5 | add_executable(br br.cpp ${BR_RESOURCES}) |
| 10 | target_link_libraries(br openbr ${CMAKE_THREAD_LIBS_INIT}) | 6 | target_link_libraries(br openbr ${CMAKE_THREAD_LIBS_INIT}) |
| 11 | qt5_use_modules(br ${QT_DEPENDENCIES}) | 7 | qt5_use_modules(br ${QT_DEPENDENCIES}) |
app/br/br.cpp
| @@ -90,7 +90,6 @@ public: | @@ -90,7 +90,6 @@ public: | ||
| 90 | argv = &argv[parc+1]; | 90 | argv = &argv[parc+1]; |
| 91 | 91 | ||
| 92 | // Core Tasks | 92 | // Core Tasks |
| 93 | -#ifndef BR_DISABLE_ALGORITHMS | ||
| 94 | if (!strcmp(fun, "train")) { | 93 | if (!strcmp(fun, "train")) { |
| 95 | check(parc >= 1, "Insufficient parameter count for 'train'."); | 94 | check(parc >= 1, "Insufficient parameter count for 'train'."); |
| 96 | br_train_n(parc == 1 ? 1 : parc-1, parv, parc == 1 ? "" : parv[parc-1]); | 95 | br_train_n(parc == 1 ? 1 : parc-1, parv, parc == 1 ? "" : parv[parc-1]); |
| @@ -101,9 +100,7 @@ public: | @@ -101,9 +100,7 @@ public: | ||
| 101 | } else if (!strcmp(fun, "compare")) { | 100 | } else if (!strcmp(fun, "compare")) { |
| 102 | check((parc >= 2) && (parc <= 3), "Incorrect parameter count for 'compare'."); | 101 | check((parc >= 2) && (parc <= 3), "Incorrect parameter count for 'compare'."); |
| 103 | br_compare(parv[0], parv[1], parc == 3 ? parv[2] : ""); | 102 | br_compare(parv[0], parv[1], parc == 3 ? parv[2] : ""); |
| 104 | - } else | ||
| 105 | -#endif // !BR_DISABLE_ALGORITHMS | ||
| 106 | - if (!strcmp(fun, "eval")) { | 103 | + } else if (!strcmp(fun, "eval")) { |
| 107 | check((parc >= 1) && (parc <= 4), "Incorrect parameter count for 'eval'."); | 104 | check((parc >= 1) && (parc <= 4), "Incorrect parameter count for 'eval'."); |
| 108 | if (parc == 1) { | 105 | if (parc == 1) { |
| 109 | br_eval(parv[0], "", "", 0); | 106 | br_eval(parv[0], "", "", 0); |
| @@ -195,9 +192,7 @@ public: | @@ -195,9 +192,7 @@ public: | ||
| 195 | } else if (!strcmp(fun, "plotKNN")) { | 192 | } else if (!strcmp(fun, "plotKNN")) { |
| 196 | check(parc >=2, "Incorrect parameter count for 'plotKNN'."); | 193 | check(parc >=2, "Incorrect parameter count for 'plotKNN'."); |
| 197 | br_plot_knn(parc-1, parv, parv[parc-1], true); | 194 | br_plot_knn(parc-1, parv, parv[parc-1], true); |
| 198 | - } | ||
| 199 | -#ifndef BR_DISABLE_ALGORITHMS | ||
| 200 | - else if (!strcmp(fun, "project")) { | 195 | + } else if (!strcmp(fun, "project")) { |
| 201 | check(parc == 2, "Insufficient parameter count for 'project'."); | 196 | check(parc == 2, "Insufficient parameter count for 'project'."); |
| 202 | br_project(parv[0], parv[1]); | 197 | br_project(parv[0], parv[1]); |
| 203 | } else if (!strcmp(fun, "deduplicate")) { | 198 | } else if (!strcmp(fun, "deduplicate")) { |
| @@ -207,7 +202,6 @@ public: | @@ -207,7 +202,6 @@ public: | ||
| 207 | check(parc == 3, "Incorrect parameter count for 'likely'."); | 202 | check(parc == 3, "Incorrect parameter count for 'likely'."); |
| 208 | br_likely(parv[0], parv[1], parv[2]); | 203 | br_likely(parv[0], parv[1], parv[2]); |
| 209 | } | 204 | } |
| 210 | -#endif // !BR_DISABLE_ALGORITHMS | ||
| 211 | 205 | ||
| 212 | // Miscellaneous | 206 | // Miscellaneous |
| 213 | else if (!strcmp(fun, "help")) { | 207 | else if (!strcmp(fun, "help")) { |
| @@ -277,11 +271,9 @@ private: | @@ -277,11 +271,9 @@ private: | ||
| 277 | printf("<arg> = Input; {arg} = Output; [arg] = Optional; (arg0|...|argN) = Choice\n" | 271 | printf("<arg> = Input; {arg} = Output; [arg] = Optional; (arg0|...|argN) = Choice\n" |
| 278 | "\n" | 272 | "\n" |
| 279 | "==== Core Commands ====\n" | 273 | "==== Core Commands ====\n" |
| 280 | -#ifndef BR_DISABLE_ALGORITHMS | ||
| 281 | "-train <gallery> ... <gallery> [{model}]\n" | 274 | "-train <gallery> ... <gallery> [{model}]\n" |
| 282 | "-enroll <input_gallery> ... <input_gallery> {output_gallery}\n" | 275 | "-enroll <input_gallery> ... <input_gallery> {output_gallery}\n" |
| 283 | "-compare <target_gallery> <query_gallery> [{output}]\n" | 276 | "-compare <target_gallery> <query_gallery> [{output}]\n" |
| 284 | -#endif // !BR_DISABLE_ALGORITHMS | ||
| 285 | "-eval <simmat> [<mask>] [{csv}] [{matches}]\n" | 277 | "-eval <simmat> [<mask>] [{csv}] [{matches}]\n" |
| 286 | "-plot <csv> ... <csv> {destination}\n" | 278 | "-plot <csv> ... <csv> {destination}\n" |
| 287 | "\n" | 279 | "\n" |
| @@ -306,11 +298,9 @@ private: | @@ -306,11 +298,9 @@ private: | ||
| 306 | "-plotLandmarking <file> ... <file> {destination}\n" | 298 | "-plotLandmarking <file> ... <file> {destination}\n" |
| 307 | "-plotMetadata <file> ... <file> <columns>\n" | 299 | "-plotMetadata <file> ... <file> <columns>\n" |
| 308 | "-plotKNN <file> ... <file> {destination}\n" | 300 | "-plotKNN <file> ... <file> {destination}\n" |
| 309 | -#ifndef BR_DISABLE_ALGORITHMS | ||
| 310 | "-project <input_gallery> {output_gallery}\n" | 301 | "-project <input_gallery> {output_gallery}\n" |
| 311 | "-deduplicate <input_gallery> <output_gallery> <threshold>\n" | 302 | "-deduplicate <input_gallery> <output_gallery> <threshold>\n" |
| 312 | "-likely <input_type> <output_type> <output_likely_source>\n" | 303 | "-likely <input_type> <output_type> <output_likely_source>\n" |
| 313 | -#endif // !BR_DISABLE_ALGORITHMS | ||
| 314 | "-getHeader <matrix>\n" | 304 | "-getHeader <matrix>\n" |
| 315 | "-setHeader {<matrix>} <target_gallery> <query_gallery>\n" | 305 | "-setHeader {<matrix>} <target_gallery> <query_gallery>\n" |
| 316 | "-<key> <value>\n" | 306 | "-<key> <value>\n" |