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