Skip to content

Commit

Permalink
Implement application for running the test on ImageNet dataset (#163)
Browse files Browse the repository at this point in the history
Closes #162
  • Loading branch information
NeiroYT authored Dec 13, 2024
1 parent f8c931c commit d197a1c
Show file tree
Hide file tree
Showing 9 changed files with 51,196 additions and 30 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode
build
3rdparty/tensorflow
app/AccuracyImgNet/imgs
18 changes: 0 additions & 18 deletions app/Accuracy/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
file(MAKE_DIRECTORY "${CMAKE_SOURCE_DIR}/3rdparty/opencv/build")

execute_process(
COMMAND ${CMAKE_COMMAND} -S "${CMAKE_SOURCE_DIR}/3rdparty/opencv" -B "${CMAKE_SOURCE_DIR}/3rdparty/opencv/build" -DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER} -DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DBUILD_opencv_apps=OFF
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/3rdparty/opencv/build"
)
execute_process(
COMMAND ${CMAKE_COMMAND} --build "${CMAKE_SOURCE_DIR}/3rdparty/opencv/build" --config "${CMAKE_BUILD_TYPE}"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/3rdparty/opencv/build"
)

set(INCLUDE_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/acc.hpp")
set(SRC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/acc.cpp")
add_library(ACCLib STATIC ${INCLUDE_HEADERS} ${SRC_FILES})
Expand All @@ -25,13 +14,6 @@ target_link_libraries( ACCLib gtest_main)
add_executable(Accuracy_Check accuracy_check.cpp)
target_link_libraries(Accuracy_Check ACCLib)

if (WIN32)
add_custom_command(TARGET Accuracy_Check POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${CMAKE_SOURCE_DIR}/3rdparty/opencv/build/bin/${CMAKE_BUILD_TYPE}"
"${CMAKE_BINARY_DIR}/app/ReaderImage/${CMAKE_BUILD_TYPE}/")
endif()

file(DOWNLOAD
"https://raw.githubusercontent.com/opencv/opencv/4.x/samples/data/lena.jpg"
"${CMAKE_CURRENT_BINARY_DIR}/image.jpg"
Expand Down
8 changes: 8 additions & 0 deletions app/AccuracyImgNet/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
add_executable(ACCImgNet accimgnet.cpp)

find_package( OpenCV REQUIRED PATHS "${CMAKE_SOURCE_DIR}/3rdparty/opencv/build" )
include_directories( ${OpenCV_INCLUDE_DIRS} )
target_link_libraries( ACCImgNet ${OpenCV_LIBS} )
target_link_libraries( ACCImgNet TBB::tbb)
target_link_libraries( ACCImgNet layers_lib)
target_link_libraries( ACCImgNet gtest_main)
Loading

0 comments on commit d197a1c

Please sign in to comment.