/cli/otap-word-spot/CMakeLists.txt
CMake | 1052 lines | 806 code | 210 blank | 36 comment | 17 complexity | ac4599170848ca2bc0cd2a6accdf8145 MD5 | raw file
Possible License(s): BSD-3-Clause
- # This was depending to otap-database
- # include_directories(${PROJECT_SOURCE_DIR}/otap-database)
- set(OTAP_WORD_SPOT_VERSION_MAJOR 0)
- set(OTAP_WORD_SPOT_VERSION_MINOR 1)
- set(CC_FILES connected-component line-pair-feature single-line-feature shape-context-feature sift-feature surf-feature freak-feature orb-feature chamfer-feature component-area-feature projection-profile-feature feature comparator aggregate-comparator feature-factory curve-approximation otap-common)
- set(ALL_SERIAL_FEATURES contour-line-pair contour-single-line shape-context sift surf freak chamfer orb profile-projection upper-projection lower-projection upper-word-profile lower-word-profile background-transitions)
- set(ALL_FEATURES aspect-ratio component-area ${ALL_SERIAL_FEATURES})
- option(TRACE_CHECK_POINTS "Convert CPx to Trace Points in the code" OFF)
- option(USE_ASPECT_RATIO "Use Aspect Ratio as a default feature" OFF)
- option(USE_LINE_PAIR "Use Line Pair as a default feature" OFF)
- option(USE_SINGLE_LINE "Use Single Line as a default feature" OFF)
- option(USE_SHAPE_CONTEXT "Use Shape Context as a default feauture" OFF)
- set(DO_CC_MATRIX_TESTS 1)
- set(DO_WS_MATRIX_TESTS 0)
- set(DO_OTAP_WS_OTM20_TEST 0)
- set(DO_OTAP_WS_OTM5_TEST 0)
- set(DO_OTAP_WS_GW20_TEST 0)
- set(DO_IMAGE_RETRIEVAL_GW20_TESTS 0)
- set(DO_IMAGE_RETRIEVAL_LM_TESTS 0)
- set(DO_RECALL_PRECISION_LM_TESTS 0)
- set(DO_RECALL_PRECISION_LMSMALL_TESTS 0)
- set(DO_RECALL_PRECISION_GW77_TESTS 0)
- set(DO_RECALL_PRECISION_GW16_TESTS 1)
- set(DO_RECALL_PRECISION_IFNC5I300_TESTS 0)
- set(DO_RECALL_PRECISION_IFNC44I1000_TESTS 0)
- set(DO_RECALL_PRECISION_DEBUG_TESTS 0)
- configure_file(cmake-options.hpp.in ${PROJECT_SOURCE_DIR}/otap-word-spot/cmake-options.hpp)
- ## global tags for all dependencies etc
- # set_source_files_properties( GTAGS PROPERTIES GENERATED true)
- # add_custom_command ( OUTPUT GTAGS
- # COMMAND gtags
- # WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/../ )
- # TEST TARGETS
- add_executable(abc abc.cpp)
- add_executable(cppdeneme cppdeneme)
- add_executable(otap-common-test otap-common-test otap-common)
- add_executable(feature-test
- feature-test
- feature
- otap-common
- test-common-defs)
-
- add_executable(comparator-test
- comparator-test
- comparator
- feature
- curve-approximation
- otap-common
- test-common-defs)
- add_executable(aggregate-comparator-test
- aggregate-comparator-test
- aggregate-comparator
- comparator
- feature
- curve-approximation
- otap-common
- test-common-defs)
- add_executable(line-pair-feature-test
- line-pair-feature-test
- line-pair-feature
- feature
- comparator
- otap-common
- test-common-defs)
- add_executable(single-line-feature-test
- single-line-feature-test
- single-line-feature
- feature
- comparator
- otap-common
- test-common-defs)
- add_executable(shape-context-feature-test
- shape-context-feature-test
- shape-context-feature
- feature
- comparator
- otap-common
- test-common-defs)
- add_executable(sift-feature-test
- sift-feature-test
- ${CC_FILES}
- test-common-defs)
- add_executable(surf-feature-test
- surf-feature-test
- ${CC_FILES}
- test-common-defs)
- add_executable(freak-feature-test
- freak-feature-test
- ${CC_FILES}
- test-common-defs)
- add_executable(chamfer-feature-test
- chamfer-feature-test
- chamfer-feature
- surf-feature
- sift-feature
- freak-feature
- feature
- comparator
- connected-component
- otap-common
- test-common-defs)
- add_executable(component-area-feature-test
- component-area-feature-test
- component-area-feature
- surf-feature
- sift-feature
- freak-feature
- feature
- comparator
- connected-component
- otap-common
- test-common-defs)
- add_executable(projection-profile-feature-test
- projection-profile-feature-test
- ${CC_FILES}
- test-common-defs)
- add_executable(connected-component-test
- connected-component-test
- test-common-defs
- ${CC_FILES})
- add_executable(component-filter-test
- component-filter-test
- component-filter
- test-common-defs
- ${CC_FILES})
- add_executable(page-image-test
- page-image-test
- page-image
- test-common-defs
- ${CC_FILES})
- add_executable(curve-approximation-test
- curve-approximation-test
- curve-approximation
- page-image
- test-common-defs
- ${CC_FILES})
- add_executable(word-spot-test
- word-spot-test
- word-spot
- page-image
- test-common-defs
- ${CC_FILES})
- add_executable(word-spot-page-query-test
- word-spot-page-query-test
- word-spot-page-query
- word-spot
- page-image
- ${CC_FILES}
- test-common-defs)
- add_executable(word-spot-query-test
- word-spot-query-test
- word-spot-query
- word-spot-page-query
- word-spot-page-query
- word-spot
- page-image
- test-common-defs
- ${CC_FILES})
- add_executable(word-spot-query-manager-test
- word-spot-query-manager-test
- word-spot-query-manager
- word-spot-query
- word-spot-page-query
- word-spot
- page-image
- ${CC_FILES}
- test-common-defs)
- # MAIN TARGETS
- add_executable(similar-files
- similar-files
- page-image
- ${CC_FILES})
- add_executable(cc-matrix
- cc-matrix
- curve-approximation
- page-image
- ${CC_FILES})
-
- add_executable(ws-matrix
- ws-matrix
- word-spot-query
- word-spot-page-query
- word-spot
- page-image
- ${CC_FILES})
- add_executable(image-retrieval
- image-retrieval
- word-spot
- page-image
- ${CC_FILES})
- add_executable(retrieval-recall-precision
- retrieval-recall-precision
- word-spot
- page-image
- ${CC_FILES})
- add_executable(shard-page-components
- shard-page-components
- page-image
- ${CC_FILES})
- add_executable(otap-word-spot
- main
- word-spot-query-manager
- word-spot-query
- word-spot-page-query
- word-spot
- page-image
- ${CC_FILES})
- # LINK DEFINITIONS
- target_link_libraries(abc opencv_core opencv_highgui opencv_imgproc boost_program_options)
- target_link_libraries(cppdeneme ${OTAP_TESTING_LIBS})
- target_link_libraries(otap-common-test ${OTAP_TESTING_LIBS})
- target_link_libraries(feature-test ${OTAP_TESTING_LIBS})
- target_link_libraries(comparator-test ${OTAP_TESTING_LIBS})
- target_link_libraries(aggregate-comparator-test ${OTAP_TESTING_LIBS})
- target_link_libraries(line-pair-feature-test ${OTAP_TESTING_LIBS})
- target_link_libraries(single-line-feature-test ${OTAP_TESTING_LIBS})
- target_link_libraries(shape-context-feature-test ${OTAP_TESTING_LIBS})
- target_link_libraries(sift-feature-test ${OTAP_TESTING_LIBS})
- target_link_libraries(surf-feature-test ${OTAP_TESTING_LIBS})
- target_link_libraries(chamfer-feature-test ${OTAP_TESTING_LIBS})
- target_link_libraries(component-area-feature-test ${OTAP_TESTING_LIBS})
- target_link_libraries(freak-feature-test ${OTAP_TESTING_LIBS})
- target_link_libraries(projection-profile-feature-test ${OTAP_TESTING_LIBS})
- target_link_libraries(connected-component-test ${OTAP_TESTING_LIBS})
- target_link_libraries(component-filter-test ${OTAP_TESTING_LIBS})
- target_link_libraries(page-image-test ${OTAP_TESTING_LIBS})
- target_link_libraries(curve-approximation-test ${OTAP_TESTING_LIBS})
- target_link_libraries(word-spot-test ${OTAP_TESTING_LIBS})
- target_link_libraries(word-spot-page-query-test ${OTAP_TESTING_LIBS})
- target_link_libraries(word-spot-query-test ${OTAP_TESTING_LIBS})
- target_link_libraries(word-spot-query-manager-test ${OTAP_TESTING_LIBS})
- target_link_libraries(otap-word-spot ${OTAP_COMMON_LIBS})
- target_link_libraries(cc-matrix ${OTAP_TESTING_LIBS})
- target_link_libraries(ws-matrix ${OTAP_TESTING_LIBS})
- target_link_libraries(image-retrieval ${OTAP_TESTING_LIBS})
- target_link_libraries(retrieval-recall-precision ${OTAP_TESTING_LIBS})
- target_link_libraries(shard-page-components ${OTAP_COMMON_LIBS})
- target_link_libraries(similar-files ${OTAP_COMMON_LIBS})
- # add_custom_command(TARGET abc
- # POST_BUILD
- # COMMAND abc ../test-image.png)
- add_custom_command(TARGET cppdeneme
- POST_BUILD
- COMMAND cppdeneme)
- add_custom_command(TARGET otap-common-test
- POST_BUILD
- COMMAND otap-common-test)
- add_custom_command(TARGET feature-test
- POST_BUILD
- COMMAND feature-test)
- add_custom_command(TARGET comparator-test
- POST_BUILD
- COMMAND comparator-test)
- add_custom_command(TARGET aggregate-comparator-test
- POST_BUILD
- COMMAND aggregate-comparator-test)
- add_custom_command(TARGET line-pair-feature-test
- POST_BUILD
- COMMAND line-pair-feature-test)
- add_custom_command(TARGET single-line-feature-test
- POST_BUILD
- COMMAND single-line-feature-test)
- add_custom_command(TARGET shape-context-feature-test
- POST_BUILD
- COMMAND shape-context-feature-test)
- add_custom_command(TARGET sift-feature-test
- POST_BUILD
- COMMAND sift-feature-test)
- add_custom_command(TARGET surf-feature-test
- POST_BUILD
- COMMAND surf-feature-test)
- add_custom_command(TARGET chamfer-feature-test
- POST_BUILD
- COMMAND chamfer-feature-test)
- add_custom_command(TARGET component-area-feature-test
- POST_BUILD
- COMMAND component-area-feature-test)
- add_custom_command(TARGET projection-profile-feature-test
- POST_BUILD
- COMMAND projection-profile-feature-test)
- add_custom_command(TARGET freak-feature-test
- POST_BUILD
- COMMAND freak-feature-test)
- add_custom_command(TARGET connected-component-test
- POST_BUILD
- COMMAND connected-component-test)
- add_custom_command(TARGET component-filter-test
- POST_BUILD
- COMMAND component-filter-test)
- add_custom_command(TARGET page-image-test
- POST_BUILD
- COMMAND page-image-test)
- add_custom_command(TARGET curve-approximation-test
- POST_BUILD
- COMMAND curve-approximation-test)
- add_custom_command(TARGET word-spot-test
- POST_BUILD
- COMMAND word-spot-test)
- add_custom_command(TARGET word-spot-page-query-test
- POST_BUILD
- COMMAND word-spot-page-query-test)
- add_custom_command(TARGET word-spot-query-test
- POST_BUILD
- COMMAND word-spot-query-test)
- add_custom_command(TARGET word-spot-query-manager-test
- POST_BUILD
- COMMAND word-spot-query-manager-test)
- # add_custom_command(TARGET cc-matrix
- # POST_BUILD
- # COMMAND valgrind --tool=memcheck --leak-check=yes ./cc-matrix --result-size 100 --input ../../../experiments/two/2.png --output-file cc-matrix-result.yml)
- if(${DO_OTAP_WS_OTM20_TEST})
- set (OTAP_WS_PAGE_DIR ${PROJECT_SOURCE_DIR}/../web/static/wordspot/pages20/)
- file(GLOB OTAP_WS_QUERY_FILES ${PROJECT_SOURCE_DIR}/../experiments/otap-word-spot/otm20/queries/*.png)
- foreach(ff ${OTAP_WS_QUERY_FILES})
- message (${ff})
- endforeach(ff)
- set (OTAP_WS_OUTPUT_DIR ${PROJECT_SOURCE_DIR}/../experiments/otap-word-spot/otm20/results/)
- # set (OTAP_WS_FEATURES contour-line-pair contour-single-line shape-context)
- set (OTAP_WS_FEATURES shape-context)
- # set (OTAP_WS_SERIAL_COMPARATORS minimums in-order spanning-minimums)
- set (OTAP_WS_SERIAL_COMPARATORS minimums minimums in-order spanning-minimums)
- set (OTAP_WS_SCALAR_COMPARATORS plain)
-
- foreach(query_file ${OTAP_WS_QUERY_FILES})
- string(RANDOM outdir_name)
- add_custom_command(TARGET otap-word-spot
- POST_BUILD
- COMMAND mkdir -p ${OTAP_WS_OUTPUT_DIR}/${outdir_name})
- add_custom_command(TARGET otap-word-spot
- POST_BUILD
- COMMAND ${PROJECT_SOURCE_DIR}/../scripts/2colorthresh ${query_file} ${OTAP_WS_OUTPUT_DIR}${outdir_name}/query.png)
- foreach(feature ${OTAP_WS_FEATURES})
- foreach(serial_cmp ${OTAP_WS_SERIAL_COMPARATORS})
- foreach(scalar_cmp ${OTAP_WS_SCALAR_COMPARATORS})
- add_custom_command(TARGET otap-word-spot
- POST_BUILD
- COMMAND mkdir -p ${OTAP_WS_OUTPUT_DIR}/${outdir_name}/${feature}-${serial_cmp}-${scalar_cmp})
- add_custom_command(TARGET otap-word-spot
- POST_BUILD
- COMMAND otap-word-spot --result-size 20 --image-dir ${OTAP_WS_PAGE_DIR} --query-dir ${OTAP_WS_OUTPUT_DIR}/${outdir_name}/query.png --output-filename ${OTAP_WS_OUTPUT_DIR}/${outdir_name}/${feature}-${serial_cmp}-${scalar_cmp}/result.html --features ${feature} --serial-comparator ${serial_cmp} --scalar-comparator ${scalar_cmp} --span-size 5)
- endforeach(scalar_cmp)
- endforeach(serial_cmp)
- endforeach(feature)
- endforeach(query_file)
- endif()
- if(${DO_OTAP_WS_OTM5_TEST})
- set (OTAP_WS_PAGE_DIR ${PROJECT_SOURCE_DIR}/../web/static/wordspot/pages/)
- file(GLOB OTAP_WS_QUERY_FILES ${PROJECT_SOURCE_DIR}/../experiments/otap-word-spot/otm5/queries/*.png)
- foreach(ff ${OTAP_WS_QUERY_FILES})
- message (${ff})
- endforeach(ff)
- set (OTAP_WS_OUTPUT_DIR ${PROJECT_SOURCE_DIR}/../experiments/otap-word-spot/otm5/results/)
- # set (OTAP_WS_FEATURES contour-line-pair contour-single-line shape-context)
- set (OTAP_WS_FEATURES contour-single-line shape-context)
- # set (OTAP_WS_SERIAL_COMPARATORS minimums in-order spanning-minimums)
- set (OTAP_WS_SERIAL_COMPARATORS minimums)
- set (OTAP_WS_SCALAR_COMPARATORS plain)
-
- foreach(query_file ${OTAP_WS_QUERY_FILES})
- string(RANDOM outdir_name)
- add_custom_command(TARGET otap-word-spot
- POST_BUILD
- COMMAND mkdir -p ${OTAP_WS_OUTPUT_DIR}/${outdir_name})
- add_custom_command(TARGET otap-word-spot
- POST_BUILD
- COMMAND ${PROJECT_SOURCE_DIR}/../scripts/2colorthresh ${query_file} ${OTAP_WS_OUTPUT_DIR}${outdir_name}/query.png)
- foreach(feature ${OTAP_WS_FEATURES})
- foreach(serial_cmp ${OTAP_WS_SERIAL_COMPARATORS})
- foreach(scalar_cmp ${OTAP_WS_SCALAR_COMPARATORS})
- add_custom_command(TARGET otap-word-spot
- POST_BUILD
- COMMAND mkdir -p ${OTAP_WS_OUTPUT_DIR}/${outdir_name}/${feature}-${serial_cmp}-${scalar_cmp})
- add_custom_command(TARGET otap-word-spot
- POST_BUILD
- COMMAND otap-word-spot --result-size 20 --image-dir ${OTAP_WS_PAGE_DIR} --query-dir ${OTAP_WS_OUTPUT_DIR}/${outdir_name}/query.png --output-filename ${OTAP_WS_OUTPUT_DIR}/${outdir_name}/${feature}-${serial_cmp}-${scalar_cmp}/result.html --features ${feature} --serial-comparator ${serial_cmp} --scalar-comparator ${scalar_cmp})
- endforeach(scalar_cmp)
- endforeach(serial_cmp)
- endforeach(feature)
- endforeach(query_file)
- endif()
- if(${DO_OTAP_WS_GW20_TEST})
- set (OTAP_WS_PAGE_DIR ../../../experiments/iam-gw/gw/data/line_images_normalized/)
- file(GLOB OTAP_WS_QUERY_FILES ../../experiments/iam-gw/gw/queries/*.png)
- foreach(ff ${OTAP_WS_QUERY_FILES})
- message (${ff})
- endforeach(ff)
- set (OTAP_WS_OUTPUT_DIR ../../../experiments/iam-gw/gw/results/)
- # set (OTAP_WS_FEATURES contour-line-pair contour-single-line shape-context)
- set (OTAP_WS_FEATURES shape-context)
- # set (OTAP_WS_SERIAL_COMPARATORS minimums in-order spanning-minimums)
- set (OTAP_WS_SERIAL_COMPARATORS minimums)
- set (OTAP_WS_SCALAR_COMPARATORS plain)
-
- foreach(query_file ${OTAP_WS_QUERY_FILES})
- string(RANDOM outdir_name)
- add_custom_command(TARGET otap-word-spot
- POST_BUILD
- COMMAND mkdir -p ${OTAP_WS_OUTPUT_DIR}/${outdir_name} && cp ${query_file} ${OTAP_WS_OUTPUT_DIR}/${outdir_name}/query.png)
- foreach(feature ${OTAP_WS_FEATURES})
- foreach(serial_cmp ${OTAP_WS_SERIAL_COMPARATORS})
- foreach(scalar_cmp ${OTAP_WS_SCALAR_COMPARATORS})
- add_custom_command(TARGET otap-word-spot
- POST_BUILD
- COMMAND mkdir -p ${OTAP_WS_OUTPUT_DIR}/${outdir_name}/${feature}-${serial_cmp}-${scalar_cmp})
- add_custom_command(TARGET otap-word-spot
- POST_BUILD
- COMMAND otap-word-spot --result-size 20 --image-dir ${OTAP_WS_PAGE_DIR} --query-dir ${OTAP_WS_OUTPUT_DIR}/${outdir_name}/query.png --output-filename ${OTAP_WS_OUTPUT_DIR}/${outdir_name}/${feature}-${serial_cmp}-${scalar_cmp}/result.html --features ${feature} --serial-comparator ${serial_cmp} --scalar-comparator ${scalar_cmp} > ${OTAP_WS_OUTPUT_DIR}/${outdir_name}/output.log)
- endforeach(scalar_cmp)
- endforeach(serial_cmp)
- endforeach(feature)
- endforeach(query_file)
- endif()
- if(${DO_CC_MATRIX_TESTS})
- set (CC_MATRIX_PAGE_IMAGE ../../../experiments/three/page.png)
- set (CC_MATRIX_QUERY_IMAGE ../../../experiments/three/query.png)
- set (CC_MATRIX_OUTPUT_DIR ../../../experiments/three/)
- set (CC_MATRIX_FEATURES ${ALL_FEATURES})
- set (CC_MATRIX_RICH_FEATURES sift freak surf)
- # set (CC_MATRIX_SERIAL_COMPARATORS minimums maximums in-order spanning-minimums spanning-maximums)
- set (CC_MATRIX_SERIAL_COMPARATORS minimums dynamic-minimums)
- # set (CC_MATRIX_SCALAR_COMPARATORS plain sigmoid sigmoid-square)
- set (CC_MATRIX_SCALAR_COMPARATORS plain)
- foreach(feature ${CC_MATRIX_RICH_FEATURES})
- foreach(serial_cmp ${CC_MATRIX_SERIAL_COMPARATORS})
- foreach(scalar_cmp ${CC_MATRIX_SCALAR_COMPARATORS})
- foreach(desc_size 1 2 4 9)
- add_custom_command(TARGET cc-matrix
- POST_BUILD
- COMMAND echo Processing: ${feature}-K${desc_size}-${serial_cmp}-${scalar_cmp}-)
- add_custom_command(TARGET cc-matrix
- POST_BUILD
- COMMAND mkdir -p ${CC_MATRIX_OUTPUT_DIR}/${feature}-K${desc_size}-${serial_cmp}-${scalar_cmp})
- add_custom_command(TARGET cc-matrix
- POST_BUILD
- COMMAND cc-matrix --result-size 100 --input ${CC_MATRIX_PAGE_IMAGE} --output-file ${CC_MATRIX_OUTPUT_DIR}/${feature}-K${desc_size}-${serial_cmp}-${scalar_cmp}/${feature}-K${desc_size}-${serial_cmp}-${scalar_cmp}.html --descriptor-size ${desc_size} --features ${feature} --serial-comparator ${serial_cmp} --scalar-comparator ${scalar_cmp} > ${CC_MATRIX_OUTPUT_DIR}/${feature}-K${desc_size}-${serial_cmp}-${scalar_cmp}/${feature}-K${desc_size}-${serial_cmp}-${scalar_cmp}.log)
- endforeach(desc_size)
- endforeach(scalar_cmp)
- endforeach(serial_cmp)
- endforeach(feature)
- foreach(feature ${CC_MATRIX_FEATURES})
- foreach(serial_cmp ${CC_MATRIX_SERIAL_COMPARATORS})
- foreach(scalar_cmp ${CC_MATRIX_SCALAR_COMPARATORS})
- add_custom_command(TARGET cc-matrix
- POST_BUILD
- COMMAND echo Processing: ${feature}-${serial_cmp}-${scalar_cmp})
- add_custom_command(TARGET cc-matrix
- POST_BUILD
- COMMAND mkdir -p ${CC_MATRIX_OUTPUT_DIR}/${feature}-${serial_cmp}-${scalar_cmp})
- add_custom_command(TARGET cc-matrix
- POST_BUILD
- COMMAND cc-matrix --result-size 100 --input ${CC_MATRIX_PAGE_IMAGE} --output-file ${CC_MATRIX_OUTPUT_DIR}/${feature}-${serial_cmp}-${scalar_cmp}/${feature}-${serial_cmp}-${scalar_cmp}.html --features ${feature} --serial-comparator ${serial_cmp} --scalar-comparator ${scalar_cmp} > ${CC_MATRIX_OUTPUT_DIR}/${feature}-${serial_cmp}-${scalar_cmp}/${feature}-${serial_cmp}-${scalar_cmp}.log)
- endforeach(scalar_cmp)
- endforeach(serial_cmp)
- endforeach(feature)
- endif()
- if(${DO_IMAGE_RETRIEVAL_GW20_TESTS})
- set (GW20_WORDS ../../../experiments/iam-gw/gw/data/word_images_normalized/)
- file(GLOB IMAGE_RETRIEVAL_QUERY_FILES ../../experiments/iam-gw/image-retrieval/queries/*.png)
- foreach(ff ${IMAGE_RETRIEVAL_QUERY_FILES})
- message (${ff})
- endforeach(ff)
- set (IMAGE_RETRIEVAL_OUTPUT_DIR ../../../experiments/iam-gw/image-retrieval/results/)
- # set (IMAGE_RETRIEVAL_FEATURES contour-line-pair contour-single-line shape-context)
- set (IMAGE_RETRIEVAL_FEATURES chamfer freak sift surf contour-line-pair contour-single-line shape-context)
- # set (IMAGE_RETRIEVAL_SERIAL_COMPARATORS minimums in-order spanning-minimums)
- set (IMAGE_RETRIEVAL_SERIAL_COMPARATORS dynamic-minimums)
- set (IMAGE_RETRIEVAL_SCALAR_COMPARATORS euclidean)
- foreach(query_file ${IMAGE_RETRIEVAL_QUERY_FILES})
- string(RANDOM outdir_name)
- add_custom_command(TARGET image-retrieval
- POST_BUILD
- COMMAND mkdir -p ${IMAGE_RETRIEVAL_OUTPUT_DIR}/${outdir_name} && cp ${query_file} ${IMAGE_RETRIEVAL_OUTPUT_DIR}/${outdir_name}/)
- foreach(feature ${IMAGE_RETRIEVAL_FEATURES})
- foreach(serial_cmp ${IMAGE_RETRIEVAL_SERIAL_COMPARATORS})
- foreach(scalar_cmp ${IMAGE_RETRIEVAL_SCALAR_COMPARATORS})
- add_custom_command(TARGET image-retrieval
- POST_BUILD
- COMMAND echo Processing: ${outdir_name}/${feature}-${serial_cmp}-${scalar_cmp})
- add_custom_command(TARGET image-retrieval
- POST_BUILD
- COMMAND mkdir -p ${IMAGE_RETRIEVAL_OUTPUT_DIR}/${outdir_name}/${feature}-${serial_cmp}-${scalar_cmp})
- add_custom_command(TARGET image-retrieval
- POST_BUILD
- COMMAND image-retrieval --result-size 20 --input ${GW20_WORDS} --query-image ${query_file} --output-file ${IMAGE_RETRIEVAL_OUTPUT_DIR}/${outdir_name}/${feature}-${serial_cmp}-${scalar_cmp}/result.html --features ${feature} --serial-comparator ${serial_cmp} --scalar-comparator ${scalar_cmp} > ${IMAGE_RETRIEVAL_OUTPUT_DIR}/${outdir_name}/output.log)
- endforeach(scalar_cmp)
- endforeach(serial_cmp)
- endforeach(feature)
- endforeach(query_file)
- endif()
- if(${DO_IMAGE_RETRIEVAL_LM_TESTS})
- set (LM_WORDS ../../../experiments/leylamecnun/words/)
- file(GLOB IMAGE_RETRIEVAL_QUERY_FILES ../../experiments/leylamecnun/queries/*.png)
- foreach(ff ${IMAGE_RETRIEVAL_QUERY_FILES})
- message (${ff})
- endforeach(ff)
- set (IMAGE_RETRIEVAL_OUTPUT_DIR ../../../experiments/leylamecnun/results/)
- # set (IMAGE_RETRIEVAL_FEATURES contour-line-pair contour-single-line shape-context)
- set (IMAGE_RETRIEVAL_FEATURES component-area chamfer freak sift surf contour-line-pair contour-single-line shape-context)
- # set (IMAGE_RETRIEVAL_SERIAL_COMPARATORS minimums in-order spanning-minimums)
- set (IMAGE_RETRIEVAL_SERIAL_COMPARATORS dynamic-minimums)
- set (IMAGE_RETRIEVAL_SCALAR_COMPARATORS euclidean)
- foreach(query_file ${IMAGE_RETRIEVAL_QUERY_FILES})
- string(RANDOM outdir_name)
- add_custom_command(TARGET image-retrieval
- POST_BUILD
- COMMAND mkdir -p ${IMAGE_RETRIEVAL_OUTPUT_DIR}/${outdir_name} && cp ${query_file} ${IMAGE_RETRIEVAL_OUTPUT_DIR}/${outdir_name}/)
- foreach(feature ${IMAGE_RETRIEVAL_FEATURES})
- foreach(serial_cmp ${IMAGE_RETRIEVAL_SERIAL_COMPARATORS})
- foreach(scalar_cmp ${IMAGE_RETRIEVAL_SCALAR_COMPARATORS})
- add_custom_command(TARGET image-retrieval
- POST_BUILD
- COMMAND echo Processing: ${outdir_name}/${feature}-${serial_cmp}-${scalar_cmp})
- add_custom_command(TARGET image-retrieval
- POST_BUILD
- COMMAND mkdir -p ${IMAGE_RETRIEVAL_OUTPUT_DIR}/${outdir_name}/${feature}-${serial_cmp}-${scalar_cmp})
- add_custom_command(TARGET image-retrieval
- POST_BUILD
- COMMAND image-retrieval --result-size 20 --input ${LM_WORDS} --query-image ${query_file} --output-file ${IMAGE_RETRIEVAL_OUTPUT_DIR}/${outdir_name}/${feature}-${serial_cmp}-${scalar_cmp}/result.html --features ${feature} --serial-comparator ${serial_cmp} --scalar-comparator ${scalar_cmp} > ${IMAGE_RETRIEVAL_OUTPUT_DIR}/${outdir_name}/output.log)
- endforeach(scalar_cmp)
- endforeach(serial_cmp)
- endforeach(feature)
- endforeach(query_file)
- endif()
- if(${DO_WS_MATRIX_TESTS})
- set (WS_MATRIX_PAGE_IMAGE ../../../experiments/ws/three/page.png)
- set (WS_MATRIX_QUERY_IMAGE ../../../experiments/ws/three/query.png)
- set (WS_MATRIX_OUTPUT_DIR ../../../experiments/ws/three/)
- set (WS_MATRIX_FEATURES aspect-ratio contour-line-pair contour-single-line shape-context)
- # set (WS_MATRIX_SERIAL_COMPARATORS minimums maximums in-order spanning-minimums spanning-maximums)
- set (WS_MATRIX_SERIAL_COMPARATORS minimums)
- # set (WS_MATRIX_SCALAR_COMPARATORS plain sigmoid sigmoid-square)
- set (WS_MATRIX_SCALAR_COMPARATORS plain)
-
- foreach(feature ${WS_MATRIX_FEATURES})
- foreach(serial_cmp ${WS_MATRIX_SERIAL_COMPARATORS})
- foreach(scalar_cmp ${WS_MATRIX_SCALAR_COMPARATORS})
- add_custom_command(TARGET ws-matrix
- POST_BUILD
- COMMAND mkdir -p ${WS_MATRIX_OUTPUT_DIR}/${feature}-${serial_cmp}-${scalar_cmp})
- add_custom_command(TARGET ws-matrix
- POST_BUILD
- COMMAND ws-matrix --result-size 100 --page-image ${WS_MATRIX_PAGE_IMAGE} --query-image ${WS_MATRIX_QUERY_IMAGE} --output-file ${WS_MATRIX_OUTPUT_DIR}/${feature}-${serial_cmp}-${scalar_cmp}/${feature}-${serial_cmp}-${scalar_cmp}.html --features ${feature} --serial-comparator ${serial_cmp} --scalar-comparator ${scalar_cmp})
- endforeach(scalar_cmp)
- endforeach(serial_cmp)
- endforeach(feature)
- endif()
- if(${DO_RECALL_PRECISION_LMSMALL_TESTS})
- set (RP_INPUT_DIR ../../../experiments/rp/leylamecnun-small/)
- set (RP_OUTPUT_DIR ../../../experiments/rp/results/leylamecnun-small/)
- # set (RP_FEATURES freak sift surf contour-line-pair contour-single-line shape-context chamfer)
- set (RP_FEATURES contour-line-pair contour-single-line shape-context)
- set (RP_SERIAL_COMPARATORS dynamic-minimums minimums matching-minimums)
- set (RP_SCALAR_COMPARATORS plain )
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND mkdir -p ${RP_OUTPUT_DIR})
- foreach(feature ${RP_FEATURES})
- foreach(serial_cmp ${RP_SERIAL_COMPARATORS})
- foreach(scalar_cmp ${RP_SCALAR_COMPARATORS})
- foreach(desc_size 4)
- foreach(subst_cost_func const)
- foreach(subst_cost_mod 1)
- foreach(delete_cost_func pow)
- foreach(delete_cost_mod 2)
- foreach(location_weight 0.0 0.8 1.6 3.2 6.4 12.8)
- string(RANDOM outfile_suffix)
-
- set(output_file ${RP_OUTPUT_DIR}/${feature}-K${desc_size}-${serial_cmp}-sub-${subst_cost_func}-${subst_cost_mod}-del-${delete_cost_func}-${delete_cost_mod}-feat-0.8-loc-${location_weight}-${scalar_cmp}-pooling-${outfile_suffix}.csv)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND echo Processing: ${output_file})
-
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND retrieval-recall-precision --input ${RP_INPUT_DIR} --output-file ${output_file} --features ${feature} --descriptor-size ${desc_size} --serial-comparator ${serial_cmp} --scalar-comparator ${scalar_cmp} --substitute-cost-function ${subst_cost_func} --substitute-cost-modifier ${subst_cost_mod} --delete-cost-function ${delete_cost_func} --delete-cost-modifier ${delete_cost_mod} --wordspot-feature-weight 0.8 --wordspot-location-weight ${location_weight} --wordspot-use-feature-pool > ${output_file}.log
- )
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND head -n 100 ${output_file}.log > ${output_file}.info)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND rm ${output_file}.log)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND mv ${output_file}*.csv ${RP_OUTPUT_DIR}/words/)
- endforeach(location_weight)
- endforeach(delete_cost_mod)
- endforeach(delete_cost_func)
- endforeach(subst_cost_mod)
- endforeach(subst_cost_func)
- endforeach(desc_size)
- endforeach(scalar_cmp)
- endforeach(serial_cmp)
- endforeach(feature)
- endif()
- if(${DO_RECALL_PRECISION_LM_TESTS})
- set (RP_INPUT_DIR ../../../experiments/rp/leylamecnun/)
- set (RP_OUTPUT_DIR ../../../experiments/rp/results/leylamecnun/)
- # set (RP_FEATURES freak sift surf contour-line-pair contour-single-line shape-context chamfer)
- set (RP_FEATURES contour-line-pair contour-single-line shape-context sift surf freak chamfer profile-projection upper-projection lower-projection upper-word-profile lower-word-profile background-transitions)
- set (RP_SERIAL_COMPARATORS dynamic-minimums)
- set (RP_SCALAR_COMPARATORS euclidean )
- set (RP_COST_MODIFIERS 2)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND mkdir -p ${RP_OUTPUT_DIR})
- foreach(feature ${RP_FEATURES})
- foreach(serial_cmp ${RP_SERIAL_COMPARATORS})
- foreach(scalar_cmp ${RP_SCALAR_COMPARATORS})
- foreach(desc_size 4)
- foreach(subst_cost_func const)
- foreach(subst_cost_mod ${RP_COST_MODIFIERS})
- foreach(delete_cost_func pow)
- foreach(delete_cost_mod ${RP_COST_MODIFIERS})
- foreach(location_weight 3.2)
- string(RANDOM outfile_suffix)
- set(output_file ${RP_OUTPUT_DIR}/${feature}-K${desc_size}-${serial_cmp}-sub-${subst_cost_func}-${subst_cost_mod}-del-${delete_cost_func}-${delete_cost_mod}-subst-0.8-loc-${location_weight}-${scalar_cmp}-pooling-${outfile_suffix}.csv)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND echo Processing: ${output_file})
-
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND retrieval-recall-precision --input ${RP_INPUT_DIR} --output-file ${output_file} --features ${feature} --descriptor-size ${desc_size} --serial-comparator ${serial_cmp} --scalar-comparator ${scalar_cmp} --substitute-cost-function ${subst_cost_func} --substitute-cost-modifier ${subst_cost_mod} --delete-cost-function ${delete_cost_func} --delete-cost-modifier ${delete_cost_mod} --wordspot-feature-weight 0.8 --wordspot-location-weight ${location_weight} --wordspot-use-feature-pool > ${output_file}.log
- )
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND head -n 100 ${output_file}.log > ${output_file}.info)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND rm ${output_file}.log)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND mv ${output_file}*.csv ${RP_OUTPUT_DIR}/words/)
- endforeach(location_weight)
- endforeach(delete_cost_mod)
- endforeach(delete_cost_func)
- endforeach(subst_cost_mod)
- endforeach(subst_cost_func)
- endforeach(desc_size)
- endforeach(scalar_cmp)
- endforeach(serial_cmp)
- endforeach(feature)
- endif()
- if(${DO_RECALL_PRECISION_GW16_TESTS})
- set (RP_INPUT_DIR ../../../experiments/rp/iam-gw-small/)
- set (RP_OUTPUT_DIR ../../../experiments/rp/results/iam-gw-small-new-dynamic-mins/)
- # set (RP_FEATURES freak sift surf contour-line-pair contour-single-line shape-context chamfer)
- set (RP_FEATURES ${ALL_SERIAL_FEATURES})
- set (RP_SERIAL_COMPARATORS dynamic-time-warping)
- set (RP_SCALAR_COMPARATORS plain)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND mkdir -p ${RP_OUTPUT_DIR})
- foreach(feature ${RP_FEATURES})
- foreach(serial_cmp ${RP_SERIAL_COMPARATORS})
- foreach(scalar_cmp ${RP_SCALAR_COMPARATORS})
- foreach(desc_size 4)
- foreach(subst_cost_func const)
- foreach(subst_cost_mod 1)
- foreach(delete_cost_func pow)
- foreach(delete_cost_mod 2)
- foreach(location_weight 0.0)
- string(RANDOM outfile_suffix)
- set(output_file ${RP_OUTPUT_DIR}/${feature}-K${desc_size}-${serial_cmp}-sub-${subst_cost_func}-${subst_cost_mod}-del-${delete_cost_func}-${delete_cost_mod}-subst-0.8-loc-${location_weight}-${scalar_cmp}-pooling-${outfile_suffix}.csv)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND echo Processing: ${output_file})
-
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND retrieval-recall-precision --input ${RP_INPUT_DIR} --output-file ${output_file} --features ${feature} --descriptor-size ${desc_size} --serial-comparator ${serial_cmp} --scalar-comparator ${scalar_cmp} --substitute-cost-function ${subst_cost_func} --substitute-cost-modifier ${subst_cost_mod} --delete-cost-function ${delete_cost_func} --delete-cost-modifier ${delete_cost_mod} --wordspot-use-feature-pool > ${output_file}.log
- )
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND head -n 100 ${output_file}.log > ${output_file}.info)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND rm ${output_file}.log)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND mv ${output_file}*.csv ${RP_OUTPUT_DIR}/words/)
- endforeach(location_weight)
- endforeach(delete_cost_mod)
- endforeach(delete_cost_func)
- endforeach(subst_cost_mod)
- endforeach(subst_cost_func)
- endforeach(desc_size)
- endforeach(scalar_cmp)
- endforeach(serial_cmp)
- endforeach(feature)
- endif()
- if(${DO_RECALL_PRECISION_GW77_TESTS})
- set (RP_INPUT_DIR ../../../experiments/rp/iam-gw/)
- set (RP_OUTPUT_DIR ../../../experiments/rp/results/iam-gw/)
- set (RP_FEATURES freak sift surf contour-line-pair contour-single-line shape-context chamfer)
- set (RP_FEATURES profile-projection chamfer contour-line-pair sift)
- set (RP_SERIAL_COMPARATORS dynamic-minimums)
- set (RP_SCALAR_COMPARATORS euclidean )
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND mkdir -p ${RP_OUTPUT_DIR})
- foreach(feature ${RP_FEATURES})
- foreach(serial_cmp ${RP_SERIAL_COMPARATORS})
- foreach(scalar_cmp ${RP_SCALAR_COMPARATORS})
- foreach(desc_size 4)
- foreach(subst_cost_func const)
- foreach(subst_cost_mod 1)
- foreach(delete_cost_func pow)
- foreach(delete_cost_mod 4)
- foreach(location_weight 0)
- string(RANDOM outfile_suffix)
- set(output_file ${RP_OUTPUT_DIR}/${feature}-K${desc_size}-${serial_cmp}-sub-${subst_cost_func}-${subst_cost_mod}-del-${delete_cost_func}-${delete_cost_mod}-subst-0.8-loc-${location_weight}-${scalar_cmp}-${outfile_suffix}.csv)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND echo Processing: ${output_file})
-
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND retrieval-recall-precision --input ${RP_INPUT_DIR} --output-file ${output_file} --features ${feature} --descriptor-size ${desc_size} --serial-comparator ${serial_cmp} --scalar-comparator ${scalar_cmp} --substitute-cost-function ${subst_cost_func} --substitute-cost-modifier ${subst_cost_mod} --delete-cost-function ${delete_cost_func} --delete-cost-modifier ${delete_cost_mod} --wordspot-location-weight ${location_weight} > ${output_file}.log
- )
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND rm ${output_file}.log)
- endforeach(location_weight)
- endforeach(delete_cost_mod)
- endforeach(delete_cost_func)
- endforeach(subst_cost_mod)
- endforeach(subst_cost_func)
- endforeach(desc_size)
- endforeach(scalar_cmp)
- endforeach(serial_cmp)
- endforeach(feature)
- endif()
- if(${DO_RECALL_PRECISION_IFNC5I300_TESTS})
- set (RP_INPUT_DIR ../../../experiments/ifnenit_C5_I300/)
- set (RP_OUTPUT_DIR ../../../experiments/rp/results/ifnenit_C5_I300/)
- set (RP_FEATURES shape-context)
- # set (RP_FEATURES contour-line-pair contour-single-line shape-context sift surf freak chamfer profile-projection upper-projection lower-projection upper-word-profile lower-word-profile background-transitions)
- # set (RP_FEATURES ${ALL_SERIAL_FEATURES})
- set (RP_SERIAL_COMPARATORS minimums dynamic-minimums)
- set (RP_SCALAR_COMPARATORS euclidean)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND mkdir -p ${RP_OUTPUT_DIR})
- foreach(feature ${RP_FEATURES})
- foreach(serial_cmp ${RP_SERIAL_COMPARATORS})
- foreach(scalar_cmp ${RP_SCALAR_COMPARATORS})
- foreach(desc_size 4)
- foreach(subst_cost_func const)
- foreach(subst_cost_mod 1)
- foreach(delete_cost_func pow)
- foreach(delete_cost_mod 2)
- foreach(location_weight 1.6)
- string(RANDOM outfile_suffix)
- set(output_file ${RP_OUTPUT_DIR}/${feature}-K${desc_size}-${serial_cmp}-sub-${subst_cost_func}-${subst_cost_mod}-del-${delete_cost_func}-${delete_cost_mod}-subst-0.8-loc-${location_weight}-${scalar_cmp}-pooling-${outfile_suffix}.csv)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND echo Processing: ${output_file})
-
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND retrieval-recall-precision --input ${RP_INPUT_DIR} --output-file ${output_file} --features ${feature} --descriptor-size ${desc_size} --serial-comparator ${serial_cmp} --scalar-comparator ${scalar_cmp} --substitute-cost-function ${subst_cost_func} --substitute-cost-modifier ${subst_cost_mod} --delete-cost-function ${delete_cost_func} --delete-cost-modifier ${delete_cost_mod} --wordspot-use-feature-pool > ${output_file}.log
- )
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND head -n 100 ${output_file}.log > ${output_file}.info)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND rm ${output_file}.log)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND mv ${output_file}*.csv ${RP_OUTPUT_DIR}/words/)
- endforeach(location_weight)
- endforeach(delete_cost_mod)
- endforeach(delete_cost_func)
- endforeach(subst_cost_mod)
- endforeach(subst_cost_func)
- endforeach(desc_size)
- endforeach(scalar_cmp)
- endforeach(serial_cmp)
- endforeach(feature)
- endif()
- if(${DO_RECALL_PRECISION_IFNC44I1000_TESTS})
- set (RP_INPUT_DIR ../../../experiments/ifnenit_C44_I1000/)
- set (RP_OUTPUT_DIR ../../../experiments/rp/results/ifnenit_C44_I1000/)
- # set (RP_FEATURES freak sift surf contour-line-pair contour-single-line shape-context chamfer)
- set (RP_FEATURES contour-line-pair contour-single-line shape-context sift surf freak chamfer profile-projection upper-projection lower-projection upper-word-profile lower-word-profile background-transitions)
- set (RP_SERIAL_COMPARATORS dynamic-minimums minimums matching-minimums)
- set (RP_SCALAR_COMPARATORS euclidean)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND mkdir -p ${RP_OUTPUT_DIR})
- foreach(feature ${RP_FEATURES})
- foreach(serial_cmp ${RP_SERIAL_COMPARATORS})
- foreach(scalar_cmp ${RP_SCALAR_COMPARATORS})
- foreach(desc_size 4)
- foreach(subst_cost_func const)
- foreach(subst_cost_mod 1)
- foreach(delete_cost_func const)
- foreach(delete_cost_mod 5)
- foreach(location_weight 1.6)
- string(RANDOM outfile_suffix)
- set(output_file ${RP_OUTPUT_DIR}/${feature}-K${desc_size}-${serial_cmp}-sub-${subst_cost_func}-${subst_cost_mod}-del-${delete_cost_func}-${delete_cost_mod}-subst-0.8-loc-${location_weight}-${scalar_cmp}-pooling-${outfile_suffix}.csv)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND echo Processing: ${output_file})
-
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND retrieval-recall-precision --input ${RP_INPUT_DIR} --output-file ${output_file} --features ${feature} --descriptor-size ${desc_size} --serial-comparator ${serial_cmp} --scalar-comparator ${scalar_cmp} --substitute-cost-function ${subst_cost_func} --substitute-cost-modifier ${subst_cost_mod} --delete-cost-function ${delete_cost_func} --delete-cost-modifier ${delete_cost_mod} --wordspot-use-feature-pool > ${output_file}.log
- )
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND head -n 100 ${output_file}.log > ${output_file}.info)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND rm ${output_file}.log)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND mv ${output_file}*.csv ${RP_OUTPUT_DIR}/words/)
- endforeach(location_weight)
- endforeach(delete_cost_mod)
- endforeach(delete_cost_func)
- endforeach(subst_cost_mod)
- endforeach(subst_cost_func)
- endforeach(desc_size)
- endforeach(scalar_cmp)
- endforeach(serial_cmp)
- endforeach(feature)
- endif()
- if(${DO_RECALL_PRECISION_DEBUG_TESTS})
- set (RP_INPUT_DIR ../../../experiments/rp/test/)
- set (RP_OUTPUT_DIR ../../../experiments/rp/results/test/)
- set (RP_FEATURES contour-line-pair profile-projection upper-projection lower-projection upper-word-profile lower-word-profile background-transitions)
- set (RP_SERIAL_COMPARATORS dynamic-minimums minimums)
- set (RP_SCALAR_COMPARATORS euclidean)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND mkdir -p ${RP_OUTPUT_DIR})
- foreach(feature ${RP_FEATURES})
- foreach(serial_cmp ${RP_SERIAL_COMPARATORS})
- foreach(scalar_cmp ${RP_SCALAR_COMPARATORS})
- string(RANDOM outfile_suffix)
- set(output-file ${RP_OUTPUT_DIR}/${feature}-${serial_cmp}-${scalar_cmp}-${outfile_suffix}.csv)
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND echo Processing: ${feature}-${serial_cmp}-${scalar_cmp})
- add_custom_command(TARGET retrieval-recall-precision
- POST_BUILD
- COMMAND retrieval-recall-precision --input ${RP_INPUT_DIR} --output-file ${output-file} --features ${feature} --serial-comparator ${serial_cmp} --scalar-comparator ${scalar_cmp} --wordspot-aggregate-query > ${output-file}.log )
-
- endforeach(scalar_cmp)
- endforeach(serial_cmp)
- endforeach(feature)
- endif()