Tencent / ncnn

ncnn is a high-performance neural network inference framework optimized for the mobile platform
Other
20.22k stars 4.15k forks source link

cmake ncnn项目时错误提示,darknet目录 #3845

Open YangHL-Saber opened 2 years ago

YangHL-Saber commented 2 years ago

detail | 详细描述 | 詳細な説明

(yolo-fastestv2) haha@dlserver1:~/Long/Workspace/ncnn-master/build$ cmake .. -- CMAKE_INSTALL_PREFIX = /home/haha/Long/Workspace/ncnn-master/build/install -- NCNN_VERSION_STRING = 1.0.20220526 CMake Warning at CMakeLists.txt:287 (message): The compiler does not support avx vnni extension. NCNN_AVXVNNI will be OFF.

CMake Warning at CMakeLists.txt:298 (message): The compiler does not support avx512 vnni extension. NCNN_AVX512VNNI will be OFF.

-- Target arch: x86 -- OpenCV library: /usr/local -- version: 2.4.13 -- libraries: opencv_core;opencv_highgui;opencv_imgproc -- include path: /usr/local/include/opencv;/usr/local/include CMake Error at tools/CMakeLists.txt:16 (add_subdirectory): add_subdirectory given source "darknet" which is not an existing directory.

-- Configuring incomplete, errors occurred! See also "/home/llvision/YangHL/Workspace/ncnn-master/build/CMakeFiles/CMakeOutput.log". See also "/home/llvision/YangHL/Workspace/ncnn-master/build/CMakeFiles/CMakeError.log".

3829

darknet的目录不在ncnn的原始项目代码目录里吗?

下面是tools/CMakeLists.txt相关的代码 add_subdirectory(caffe) add_subdirectory(mxnet) add_subdirectory(onnx) add_subdirectory(darknet)

zchrissirhcz commented 2 years ago

ncnn 源码下有 tools/darknet 目录, tools/darknet 目录下有 CMakeLists.txt , 因此如果使用了没有修改过的原版 ncnn 源码工程的话, cmake 执行 add_subdirectory(darknet)不应该报错。

注意, ncnn 并不是把 darknet 整个工程包含进来, https://github.com/Tencent/ncnn/tree/master/tools/darknet 这里是提供了模型转换的代码,即:从头写的、和原版 darknet 没有关系。

可考虑检查编译报错时的 ncnn 工程目录, 和github上原版的是否有差别,例如不小心手动删除了 darknet 目录、别人共享来的 ncnn 工程等。

@YangHL-Saber