-
Notifications
You must be signed in to change notification settings - Fork 858
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- cleanup Signed-off-by: jagadeesh <jagadeeshj@ideas2it.com>
- Loading branch information
jagadeesh
committed
Sep 18, 2023
1 parent
d4a431a
commit 3a6df4e
Showing
3 changed files
with
21 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,3 @@ | ||
set(MNIST_SRC_DIR "${torchserve_cpp_SOURCE_DIR}/src/examples/image_classifier/mnist") | ||
find_package(OpenCV REQUIRED) | ||
|
||
set(MNIST_SOURCE_FILES "") | ||
list(APPEND MNIST_SOURCE_FILES ${MNIST_SRC_DIR}/mnist_handler.cc) | ||
add_library(mnist_handler SHARED ${MNIST_SOURCE_FILES}) | ||
target_include_directories(mnist_handler PUBLIC ${MNIST_SRC_DIR}) | ||
target_link_libraries(mnist_handler PRIVATE ts_backends_torch_scripted ts_utils ${TORCH_LIBRARIES}) | ||
|
||
|
||
set(RESNET_SRC_DIR "${torchserve_cpp_SOURCE_DIR}/src/examples/image_classifier/resnet-18") | ||
|
||
set(RESNET_SOURCE_FILES "") | ||
set(OPENCV_DIR "/usr/local/include/opencv4") | ||
list(APPEND RESNET_SOURCE_FILES ${RESNET_SRC_DIR}/resnet-18_handler.cc) | ||
add_library(resnet-18_handler SHARED ${RESNET_SOURCE_FILES}) | ||
target_include_directories(resnet-18_handler PUBLIC ${OPENCV_DIR}) | ||
target_include_directories(resnet-18_handler PUBLIC ${RESNET_SRC_DIR}) | ||
target_link_libraries(resnet-18_handler PRIVATE ts_backends_torch_scripted ts_utils ${TORCH_LIBRARIES}) | ||
target_link_libraries(resnet-18_handler PRIVATE "/usr/local/lib/libopencv_imgcodecs.so") | ||
target_link_libraries(resnet-18_handler PRIVATE "/usr/local/lib/libopencv_cudawarping.so") | ||
target_link_libraries(resnet-18_handler PRIVATE "/usr/local/lib/libopencv_cudaimgproc.so") | ||
target_link_libraries(resnet-18_handler PRIVATE "/usr/local/lib/libopencv_core.so") | ||
add_subdirectory(image_classifier) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
set(MNIST_SRC_DIR "${torchserve_cpp_SOURCE_DIR}/src/examples/image_classifier/mnist") | ||
|
||
set(MNIST_SOURCE_FILES "") | ||
list(APPEND MNIST_SOURCE_FILES ${MNIST_SRC_DIR}/mnist_handler.cc) | ||
add_library(mnist_handler SHARED ${MNIST_SOURCE_FILES}) | ||
target_include_directories(mnist_handler PUBLIC ${MNIST_SRC_DIR}) | ||
target_link_libraries(mnist_handler PRIVATE ts_backends_torch_scripted ts_utils ${TORCH_LIBRARIES}) | ||
|
||
set(RESNET_SRC_DIR "${torchserve_cpp_SOURCE_DIR}/src/examples/image_classifier/resnet-18") | ||
|
||
set(RESNET_SOURCE_FILES "") | ||
|
||
list(APPEND RESNET_SOURCE_FILES ${RESNET_SRC_DIR}/resnet-18_handler.cc) | ||
add_library(resnet-18_handler SHARED ${RESNET_SOURCE_FILES}) | ||
target_include_directories(resnet-18_handler PUBLIC ${OPENCV_DIR}) | ||
target_include_directories(resnet-18_handler PUBLIC ${RESNET_SRC_DIR}) | ||
target_link_libraries(resnet-18_handler PRIVATE ts_backends_torch_scripted ts_utils ${TORCH_LIBRARIES}) | ||
include_directories( ${OpenCV_INCLUDE_DIRS} ) | ||
target_link_libraries( resnet-18_handler PRIVATE ${OpenCV_LIBS} ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters