libtorch-yolov3
libtorch-yolov3 copied to clipboard
你好,請問一下 不用libtorch的話 可以用啥
I met the same error, did you solve it ?
Yes I have solved it My cmakelist is error
What's wrong with your cmakelist?
首先 不能用opencv4和libtorch cmake_minimum_required(VERSION 3.0 FATAL_ERROR) project(yolo-app) find_package(OpenCV REQUIRED) include_directories(${OpenCV _INCLUDE_DIRS}) find_package(Torch REQUIRED) aux_source_directory(. DIR_sRCS) add_executable(yolo-app main.cpp)#注 main.cpp可以换成路径xxx/xxx.cpp target_link_libraries(yolo-app "${TORCH_LIBRARIES}" "${OpenCV_LIBS}") set_property(TARGET yolo-app PROPERTY CXX_STANDARD 11)
谢啦,我按你的CMakeList.txt改了下,还是有问题,后来又把main.cpp 改成了 ${DIR_SRCS} 才解决这个问题。
Originally posted by @Arctanxy in https://github.com/walktree/libtorch-yolov3/issues/10#issuecomment-504751473