├── .gitignore ├── CMakeLists.txt ├── INT8 ├── yolov5s-int8-aciq.bin ├── yolov5s-int8-aciq.param ├── yolov5s-int8.bin ├── yolov5s-int8.param └── yolov5s.table ├── README.md ├── build ├── CMakeCache.txt ├── CMakeFiles │ ├── 3.5.1 │ │ ├── CMakeCCompiler.cmake │ │ ├── CMakeCXXCompiler.cmake │ │ ├── CMakeDetermineCompilerABI_C.bin │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ ├── CMakeSystem.cmake │ │ ├── CompilerIdC │ │ │ ├── CMakeCCompilerId.c │ │ │ └── a.out │ │ └── CompilerIdCXX │ │ │ ├── CMakeCXXCompilerId.cpp │ │ │ └── a.out │ ├── CMakeDirectoryInformation.cmake │ ├── CMakeOutput.log │ ├── Makefile.cmake │ ├── Makefile2 │ ├── TargetDirectories.txt │ ├── cmake.check_cache │ ├── feature_tests.bin │ ├── feature_tests.c │ ├── feature_tests.cxx │ ├── progress.marks │ └── yolov5s.dir │ │ ├── CXX.includecache │ │ ├── DependInfo.cmake │ │ ├── build.make │ │ ├── cmake_clean.cmake │ │ ├── depend.internal │ │ ├── depend.make │ │ ├── flags.make │ │ ├── link.txt │ │ ├── progress.make │ │ └── yolov5.cpp.o ├── Makefile ├── cmake_install.cmake ├── yolov5.jpg └── yolov5s ├── bus.jpg ├── images ├── Screenshot from 2021-05-21 21-01-03.png ├── Screenshot from 2021-05-21 21-01-21.png ├── Screenshot from 2021-05-22 19-24-44.png ├── Screenshot from 2021-05-22 19-26-13.png ├── Screenshot from 2021-05-22 19-47-51.png ├── Screenshot from 2021-05-22 19-49-54.png ├── Screenshot from 2021-06-08 21-47-09.png ├── Screenshot from 2021-06-08 21-48-39.png ├── bus.jpg ├── cat.jpg ├── cat.py ├── yolov5-int8-aciq.jpg ├── yolov5-int8-kl.jpg └── yolov5_ncnn_fp16.jpg ├── layer ├── yolov5focus.cpp └── yolov5focus.h ├── ncnn-20210525-ubuntu-1604-shared ├── bin │ ├── caffe2ncnn │ ├── darknet2ncnn │ ├── mxnet2ncnn │ ├── ncnn2int8 │ ├── ncnn2mem │ ├── ncnn2table │ ├── ncnnmerge │ ├── ncnnoptimize │ └── onnx2ncnn ├── include │ └── ncnn │ │ ├── allocator.h │ │ ├── benchmark.h │ │ ├── blob.h │ │ ├── c_api.h │ │ ├── command.h │ │ ├── cpu.h │ │ ├── datareader.h │ │ ├── gpu.h │ │ ├── layer.h │ │ ├── layer_shader_type.h │ │ ├── layer_shader_type_enum.h │ │ ├── layer_type.h │ │ ├── layer_type_enum.h │ │ ├── mat.h │ │ ├── modelbin.h │ │ ├── ncnn_export.h │ │ ├── net.h │ │ ├── option.h │ │ ├── paramdict.h │ │ ├── pipeline.h │ │ ├── pipelinecache.h │ │ ├── platform.h │ │ ├── simpleocv.h │ │ ├── simpleomp.h │ │ ├── simplestl.h │ │ └── vulkan_header_fix.h └── lib │ ├── cmake │ └── ncnn │ │ ├── ncnn-release.cmake │ │ ├── ncnn.cmake │ │ └── ncnnConfig.cmake │ ├── libncnn.so │ ├── libncnn.so.1 │ └── libncnn.so.1.0.20210525 ├── yolov5.cpp ├── yolov5s-int8-aciq.bin ├── yolov5s-int8-aciq.param ├── yolov5s-int8.bin ├── yolov5s-int8.param ├── yolov5s-opt.bin ├── yolov5s-opt.param ├── yolov5s.bin └── yolov5s.param /.gitignore: -------------------------------------------------------------------------------- 1 | images/cat.py 2 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | project(yolov5s) 4 | 5 | add_definitions(-std=c++11) 6 | add_definitions("-Wall") 7 | 8 | #set(OpenCV_DIR "/opt/intel/openvino_2019.3.334/opencv") 9 | find_package(OpenCV 3.4.8 REQUIRED) 10 | 11 | if(True) 12 | find_package(OpenMP) 13 | if(NOT TARGET OpenMP::OpenMP_CXX AND (OpenMP_CXX_FOUND OR OPENMP_FOUND)) 14 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") 15 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") 16 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") 17 | endif() 18 | endif() 19 | 20 | include_directories(${OpenCV_DIR}/include 21 | ${PROJECT_SOURCE_DIR}/ncnn-20210525-ubuntu-1604-shared/include/ncnn) 22 | 23 | link_directories(${OpenCV_DIR}/lib/ 24 | ${PROJECT_SOURCE_DIR}/ncnn-20210525-ubuntu-1604-shared/lib) 25 | set(OpenCV_LIBS opencv_core 26 | opencv_highgui 27 | opencv_imgproc 28 | opencv_imgcodecs 29 | opencv_videoio) 30 | 31 | set(SRC 32 | yolov5.cpp 33 | ) 34 | 35 | add_executable(yolov5s ${SRC}) 36 | target_link_libraries(yolov5s ncnn ${OpenCV_LIBS}) 37 | if(OpenMP_CXX_FOUND) 38 | if(NCNN_CMAKE_VERBOSE) 39 | message("Building with OpenMP") 40 | endif() 41 | target_link_libraries(yolov5s PUBLIC OpenMP::OpenMP_CXX) 42 | endif() 43 | -------------------------------------------------------------------------------- /INT8/yolov5s-int8-aciq.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/INT8/yolov5s-int8-aciq.bin -------------------------------------------------------------------------------- /INT8/yolov5s-int8.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/INT8/yolov5s-int8.bin -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | YOLOv5转NCNN 2 | 3 | ## update20210608 4 | 5 | 新增yolov5模型剪枝和NCNN INT8量化。 6 | 7 | 8 | 项目持续更新,主要包括yolov5s模型的剪枝,int8量化,ncnn模型转换和Android移植测试。 9 | 10 | 11 | 基于YOLOv5最新[v5.0 release](https://github.com/ultralytics/yolov5/releases/tag/v5.0),和NCNN官方给出example的差别主要有: 12 | 13 | - 激活函数hardswish变为siLu; 14 | - 流程和[详细记录u版YOLOv5目标检测ncnn实现](https://zhuanlan.zhihu.com/p/275989233?utm_source=qq)略微不同 15 | 16 | ## 编译运行 17 | 18 | 动态库用的是官方编译好的ncnn-20210507-ubuntu-1604-shared 19 | 20 | ``` 21 | mkdir build 22 | cd build 23 | cmake .. 24 | make -j8 25 | ./yolov5 ../bus.jpg 26 | ``` 27 | 28 | 可以看到: 29 | 30 |

31 | 32 |

33 | 34 | 35 | 36 | ## 安卓 37 | 38 | 参考https://github.com/nihui/ncnn-android-yolov5 ,使用这里转的v5.0分支的ncnn模型。 39 | 40 | ## Yolov5s剪枝 41 | 见https://github.com/midasklr/yolov5prune 42 | 稀疏训练+Bn层剪枝,可以获得更加紧凑的模型,这里一次稀疏训练+60%Bn层剪枝,模型从28M降低到7M。 43 | 44 | ## 流程 45 | 46 | 以下为yolov5s.pt转NCNN流程,自己训练的模型一样: 47 | 48 | ## pytorch测试和导出onnx 49 | 50 | 先测试下yolov5s效果: 51 | 52 | ``` 53 | python detect.py --weights yolov5s.pt --source data/images 54 | ``` 55 | 56 | 效果不错: 57 | 58 |

59 | 60 |

61 | 62 | 63 | 64 | 导出 onnx,并用 onnx-simplifer 简化模型,这里稍微不同,如果按照[详细记录u版YOLOv5目标检测ncnn实现](https://zhuanlan.zhihu.com/p/275989233?utm_source=qq),那么直接导出来的模型可以看到输出: 65 | 66 | ``` 67 | python models/export.py --weights yolov5s.pt --img 640 --batch 1 68 | ``` 69 | 70 |

71 | 72 |

73 | 74 | 75 | 76 | 可以看到后处理怎么都出来了??? 77 | 78 | 看看models/yolo.py代码发现: 79 | 80 |

81 | 82 |

83 | 84 | inference里面不就对应上面onnx模型那部分输出处理后然后torch.cat起来么,这部分处理我们放在代码里面做,所以可以注释这部分: 85 | 86 |

87 | 88 |

89 | 90 | 这样导出来的模型就是三个输出了: 91 | 92 |

93 | 94 |

95 | 96 | 97 | 98 | ok,输出和[详细记录u版YOLOv5目标检测ncnn实现](https://zhuanlan.zhihu.com/p/275989233?utm_source=qq)对应上了,同时可以看到激活函数silu: 99 | 100 |

101 | 102 |

103 | 104 | 经过onnx-sim简化一下: 105 | 106 | ``` 107 | python -m onnxsim yolov5s.onnx yolov5s-sim.onnx 108 | ``` 109 | 110 | ## 转换和实现focus模块等 111 | 112 | 后续和[详细记录u版YOLOv5目标检测ncnn实现](https://zhuanlan.zhihu.com/p/275989233?utm_source=qq)一样,ncnn转化后激活函数转为swish,可swish的实现: 113 | 114 | ```c++ 115 | Swish::Swish() 116 | { 117 | one_blob_only = true; 118 | support_inplace = true; 119 | } 120 | 121 | int Swish::forward_inplace(Mat& bottom_top_blob, const Option& opt) const 122 | { 123 | int w = bottom_top_blob.w; 124 | int h = bottom_top_blob.h; 125 | int channels = bottom_top_blob.c; 126 | int size = w * h; 127 | 128 | #pragma omp parallel for num_threads(opt.num_threads) 129 | for (int q = 0; q < channels; q++) 130 | { 131 | float* ptr = bottom_top_blob.channel(q); 132 | 133 | for (int i = 0; i < size; i++) 134 | { 135 | float x = ptr[i]; 136 | ptr[i] = static_cast(x / (1.f + expf(-x))); 137 | } 138 | } 139 | 140 | return 0; 141 | } 142 | 143 | } // namespace ncnn 144 | ``` 145 | 146 | 和silu一样,那么就可以正常进行推理了,可能需要注意的就是三个输出节点不要弄错就ok。 147 | 148 | 149 | 150 | ## INT8量化 151 | 152 | ### 1. NCNN源码编译 153 | 154 | 1. 最新ncnn新增支持int8量化 155 | 156 | ``` 157 | git clone https://github.com/Tencent/ncnn.git 158 | cd ncnn 159 | git submodule update --init 160 | ``` 161 | 162 | 2. 增加Focus层 163 | 164 | 将layer/yolov5focus.cpp/.h 两个文件放在ncnn/src/layer下,然后ncnn/src/CMakeList.txt增加: 165 | 166 | ``` 167 | ncnn_add_layer(YoloV5Focus) 168 | ``` 169 | 170 | 3. 编译 171 | 172 | 不同系统的编译见https://github.com/Tencent/ncnn/wiki/how-to-build 173 | 174 | 编译完成后会有: 175 | 176 | ncnn/build/tools/onnx/onnx2ncnn :用于onnx转ncnn的工具 177 | 178 | /ncnn/build/tools/ncnnoptimize 优化工具 179 | 180 | ncnn/build/tools/quantize/ncnn2int8 转int8 181 | 182 | ncnn/build/tools/quantize/ncnn2table 生成校准表 183 | 184 | ### 2. 模型量化 185 | 186 | 参考https://github.com/Tencent/ncnn/wiki/quantized-int8-inference 操作,在ncnn2table工具下,准备我们的检验图片放在images文件夹下,最好是我们训练模型的验证或者测试集,这里使用coco val数据集5k张图片。 187 | 188 | 然后 189 | 190 | ``` 191 | find images/ -type f > imagelist.txt 192 | ./ncnn2table yolov5s-opt.param yolov5s-opt.bin imagelist.txt yolov5s.table mean=[0,0,0] norm=[0.0039215,0.0039215,0.0039215] shape=[416,416,3] pixel=BGR thread=8 method=kl 193 | ``` 194 | 195 |

196 | 197 |

198 | 校准表见INT8/yolov5s.table。 199 | 200 | 然后转化模型: 201 | 202 | ``` 203 | ./ncnn2int8 yolov5s-opt.param yolov5s-opt.bn yolov5s-int8.param yolov5s-int8.bin yolov5s.table 204 | ``` 205 | 206 | 转化后的int8模型见yolov5s-int8.param和yolov5s-int8.bin。 207 | 208 | ### 3. INT8 推理 209 | 210 | 使用最新的动态库:https://github.com/Tencent/ncnn/releases/tag/20210525 211 | 212 | 根据你的系统选择。 213 | 214 | 相关设置: 215 | 216 | ``` 217 | yolov5.opt.num_threads = 8; 218 | yolov5.opt.use_int8_inference = true; 219 | ``` 220 | 221 | FP16模型和INT8模型对比: 222 | 223 |

224 | 225 |

226 | 227 | 228 | kl和aciq两种量化方式,前者损失会更大。 229 | 230 | 231 | | | input | inference time | model size | 232 | | ------------- | ----- | -------------- | ---------- | 233 | | yolov5s | 416 | 22 ms | 14.6 M(fp16) | 234 | | yolov5s-prune | 416 | 18 ms | 1.7 M(fp16) | 235 | | yolov5s-int8 | 416 | 52ms | 887.5k(int8) | 236 | 237 | 目前int8量化后效果还不错,但是推理时间慢了很多,可能原因是int8不针对x86,参考https://github.com/Tencent/ncnn/issues/2974 238 | 后续测试arm上加速效果 239 | -------------------------------------------------------------------------------- /build/CMakeCache.txt: -------------------------------------------------------------------------------- 1 | # This is the CMakeCache file. 2 | # For build in directory: /home/kong/yolov5_prune/yolov5_ncnn/build 3 | # It was generated by CMake: /usr/bin/cmake 4 | # You can edit this file to change values found and used by cmake. 5 | # If you do not want to change any of the values, simply exit the editor. 6 | # If you do want to change a value, simply edit, save, and exit the editor. 7 | # The syntax for the file is as follows: 8 | # KEY:TYPE=VALUE 9 | # KEY is the name of a variable in the cache. 10 | # TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. 11 | # VALUE is the current value for the KEY. 12 | 13 | ######################## 14 | # EXTERNAL cache entries 15 | ######################## 16 | 17 | //Path to a program. 18 | CMAKE_AR:FILEPATH=/usr/bin/ar 19 | 20 | //Choose the type of build, options are: None(CMAKE_CXX_FLAGS or 21 | // CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel. 22 | CMAKE_BUILD_TYPE:STRING= 23 | 24 | //Enable/Disable color output during build. 25 | CMAKE_COLOR_MAKEFILE:BOOL=ON 26 | 27 | //CXX compiler 28 | CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++ 29 | 30 | //Flags used by the compiler during all build types. 31 | CMAKE_CXX_FLAGS:STRING= 32 | 33 | //Flags used by the compiler during debug builds. 34 | CMAKE_CXX_FLAGS_DEBUG:STRING=-g 35 | 36 | //Flags used by the compiler during release builds for minimum 37 | // size. 38 | CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG 39 | 40 | //Flags used by the compiler during release builds. 41 | CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG 42 | 43 | //Flags used by the compiler during release builds with debug info. 44 | CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG 45 | 46 | //C compiler 47 | CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc 48 | 49 | //Flags used by the compiler during all build types. 50 | CMAKE_C_FLAGS:STRING= 51 | 52 | //Flags used by the compiler during debug builds. 53 | CMAKE_C_FLAGS_DEBUG:STRING=-g 54 | 55 | //Flags used by the compiler during release builds for minimum 56 | // size. 57 | CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG 58 | 59 | //Flags used by the compiler during release builds. 60 | CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG 61 | 62 | //Flags used by the compiler during release builds with debug info. 63 | CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG 64 | 65 | //Flags used by the linker. 66 | CMAKE_EXE_LINKER_FLAGS:STRING= 67 | 68 | //Flags used by the linker during debug builds. 69 | CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= 70 | 71 | //Flags used by the linker during release minsize builds. 72 | CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= 73 | 74 | //Flags used by the linker during release builds. 75 | CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= 76 | 77 | //Flags used by the linker during Release with Debug Info builds. 78 | CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= 79 | 80 | //Enable/Disable output of compile commands during generation. 81 | CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF 82 | 83 | //Install path prefix, prepended onto install directories. 84 | CMAKE_INSTALL_PREFIX:PATH=/usr/local 85 | 86 | //Path to a program. 87 | CMAKE_LINKER:FILEPATH=/usr/bin/ld 88 | 89 | //Path to a program. 90 | CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make 91 | 92 | //Flags used by the linker during the creation of modules. 93 | CMAKE_MODULE_LINKER_FLAGS:STRING= 94 | 95 | //Flags used by the linker during debug builds. 96 | CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= 97 | 98 | //Flags used by the linker during release minsize builds. 99 | CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= 100 | 101 | //Flags used by the linker during release builds. 102 | CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= 103 | 104 | //Flags used by the linker during Release with Debug Info builds. 105 | CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= 106 | 107 | //Path to a program. 108 | CMAKE_NM:FILEPATH=/usr/bin/nm 109 | 110 | //Path to a program. 111 | CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy 112 | 113 | //Path to a program. 114 | CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump 115 | 116 | //Value Computed by CMake 117 | CMAKE_PROJECT_NAME:STATIC=yolov5s 118 | 119 | //Path to a program. 120 | CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib 121 | 122 | //Flags used by the linker during the creation of dll's. 123 | CMAKE_SHARED_LINKER_FLAGS:STRING= 124 | 125 | //Flags used by the linker during debug builds. 126 | CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= 127 | 128 | //Flags used by the linker during release minsize builds. 129 | CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= 130 | 131 | //Flags used by the linker during release builds. 132 | CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= 133 | 134 | //Flags used by the linker during Release with Debug Info builds. 135 | CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= 136 | 137 | //If set, runtime paths are not added when installing shared libraries, 138 | // but are added when building. 139 | CMAKE_SKIP_INSTALL_RPATH:BOOL=NO 140 | 141 | //If set, runtime paths are not added when using shared libraries. 142 | CMAKE_SKIP_RPATH:BOOL=NO 143 | 144 | //Flags used by the linker during the creation of static libraries. 145 | CMAKE_STATIC_LINKER_FLAGS:STRING= 146 | 147 | //Flags used by the linker during debug builds. 148 | CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= 149 | 150 | //Flags used by the linker during release minsize builds. 151 | CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= 152 | 153 | //Flags used by the linker during release builds. 154 | CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= 155 | 156 | //Flags used by the linker during Release with Debug Info builds. 157 | CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= 158 | 159 | //Path to a program. 160 | CMAKE_STRIP:FILEPATH=/usr/bin/strip 161 | 162 | //If this value is on, makefiles will be generated without the 163 | // .SILENT directive, and all commands will be echoed to the console 164 | // during the make. This is useful for debugging only. With Visual 165 | // Studio IDE projects all commands are done without /nologo. 166 | CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE 167 | 168 | //The directory containing a CMake configuration file for OpenCV. 169 | OpenCV_DIR:PATH=/usr/local/share/OpenCV 170 | 171 | //C++ compiler flags for OpenMP parallization 172 | OpenMP_CXX_FLAGS:STRING=-fopenmp 173 | 174 | //C compiler flags for OpenMP parallization 175 | OpenMP_C_FLAGS:STRING=-fopenmp 176 | 177 | //Value Computed by CMake 178 | yolov5s_BINARY_DIR:STATIC=/home/kong/yolov5_prune/yolov5_ncnn/build 179 | 180 | //Value Computed by CMake 181 | yolov5s_SOURCE_DIR:STATIC=/home/kong/yolov5_prune/yolov5_ncnn 182 | 183 | 184 | ######################## 185 | # INTERNAL cache entries 186 | ######################## 187 | 188 | //ADVANCED property for variable: CMAKE_AR 189 | CMAKE_AR-ADVANCED:INTERNAL=1 190 | //This is the directory where this CMakeCache.txt was created 191 | CMAKE_CACHEFILE_DIR:INTERNAL=/home/kong/yolov5_prune/yolov5_ncnn/build 192 | //Major version of cmake used to create the current loaded cache 193 | CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 194 | //Minor version of cmake used to create the current loaded cache 195 | CMAKE_CACHE_MINOR_VERSION:INTERNAL=5 196 | //Patch version of cmake used to create the current loaded cache 197 | CMAKE_CACHE_PATCH_VERSION:INTERNAL=1 198 | //ADVANCED property for variable: CMAKE_COLOR_MAKEFILE 199 | CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 200 | //Path to CMake executable. 201 | CMAKE_COMMAND:INTERNAL=/usr/bin/cmake 202 | //Path to cpack program executable. 203 | CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack 204 | //Path to ctest program executable. 205 | CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest 206 | //ADVANCED property for variable: CMAKE_CXX_COMPILER 207 | CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 208 | //ADVANCED property for variable: CMAKE_CXX_FLAGS 209 | CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 210 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG 211 | CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 212 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL 213 | CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 214 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE 215 | CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 216 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO 217 | CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 218 | //ADVANCED property for variable: CMAKE_C_COMPILER 219 | CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 220 | //ADVANCED property for variable: CMAKE_C_FLAGS 221 | CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 222 | //ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG 223 | CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 224 | //ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL 225 | CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 226 | //ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE 227 | CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 228 | //ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO 229 | CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 230 | //Executable file format 231 | CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF 232 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS 233 | CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 234 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG 235 | CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 236 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL 237 | CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 238 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE 239 | CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 240 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO 241 | CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 242 | //ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS 243 | CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 244 | //Name of external makefile project generator. 245 | CMAKE_EXTRA_GENERATOR:INTERNAL= 246 | //Name of generator. 247 | CMAKE_GENERATOR:INTERNAL=Unix Makefiles 248 | //Name of generator platform. 249 | CMAKE_GENERATOR_PLATFORM:INTERNAL= 250 | //Name of generator toolset. 251 | CMAKE_GENERATOR_TOOLSET:INTERNAL= 252 | //Source directory with the top level CMakeLists.txt file for this 253 | // project 254 | CMAKE_HOME_DIRECTORY:INTERNAL=/home/kong/yolov5_prune/yolov5_ncnn 255 | //Install .so files without execute permission. 256 | CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 257 | //ADVANCED property for variable: CMAKE_LINKER 258 | CMAKE_LINKER-ADVANCED:INTERNAL=1 259 | //ADVANCED property for variable: CMAKE_MAKE_PROGRAM 260 | CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 261 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS 262 | CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 263 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG 264 | CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 265 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL 266 | CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 267 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE 268 | CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 269 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO 270 | CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 271 | //ADVANCED property for variable: CMAKE_NM 272 | CMAKE_NM-ADVANCED:INTERNAL=1 273 | //number of local generators 274 | CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 275 | //ADVANCED property for variable: CMAKE_OBJCOPY 276 | CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 277 | //ADVANCED property for variable: CMAKE_OBJDUMP 278 | CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 279 | //ADVANCED property for variable: CMAKE_RANLIB 280 | CMAKE_RANLIB-ADVANCED:INTERNAL=1 281 | //Path to CMake installation. 282 | CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.5 283 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS 284 | CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 285 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG 286 | CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 287 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL 288 | CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 289 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE 290 | CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 291 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO 292 | CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 293 | //ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH 294 | CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 295 | //ADVANCED property for variable: CMAKE_SKIP_RPATH 296 | CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 297 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS 298 | CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 299 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG 300 | CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 301 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL 302 | CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 303 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE 304 | CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 305 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO 306 | CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 307 | //ADVANCED property for variable: CMAKE_STRIP 308 | CMAKE_STRIP-ADVANCED:INTERNAL=1 309 | //uname command 310 | CMAKE_UNAME:INTERNAL=/bin/uname 311 | //ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE 312 | CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 313 | //Details about finding OpenCV 314 | FIND_PACKAGE_MESSAGE_DETAILS_OpenCV:INTERNAL=[/usr/local][v3.4.8(3.4.8)] 315 | //Details about finding OpenMP 316 | FIND_PACKAGE_MESSAGE_DETAILS_OpenMP:INTERNAL=[-fopenmp][-fopenmp][v()] 317 | //ADVANCED property for variable: OpenMP_CXX_FLAGS 318 | OpenMP_CXX_FLAGS-ADVANCED:INTERNAL=1 319 | //ADVANCED property for variable: OpenMP_C_FLAGS 320 | OpenMP_C_FLAGS-ADVANCED:INTERNAL=1 321 | //Test OpenMP_FLAG_DETECTED 322 | OpenMP_FLAG_DETECTED:INTERNAL=1 323 | 324 | -------------------------------------------------------------------------------- /build/CMakeFiles/3.5.1/CMakeCCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_C_COMPILER "/usr/bin/cc") 2 | set(CMAKE_C_COMPILER_ARG1 "") 3 | set(CMAKE_C_COMPILER_ID "GNU") 4 | set(CMAKE_C_COMPILER_VERSION "6.5.0") 5 | set(CMAKE_C_COMPILER_WRAPPER "") 6 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") 7 | set(CMAKE_C_COMPILE_FEATURES "c_function_prototypes;c_restrict;c_variadic_macros;c_static_assert") 8 | set(CMAKE_C90_COMPILE_FEATURES "c_function_prototypes") 9 | set(CMAKE_C99_COMPILE_FEATURES "c_restrict;c_variadic_macros") 10 | set(CMAKE_C11_COMPILE_FEATURES "c_static_assert") 11 | 12 | set(CMAKE_C_PLATFORM_ID "Linux") 13 | set(CMAKE_C_SIMULATE_ID "") 14 | set(CMAKE_C_SIMULATE_VERSION "") 15 | 16 | set(CMAKE_AR "/usr/bin/ar") 17 | set(CMAKE_RANLIB "/usr/bin/ranlib") 18 | set(CMAKE_LINKER "/usr/bin/ld") 19 | set(CMAKE_COMPILER_IS_GNUCC 1) 20 | set(CMAKE_C_COMPILER_LOADED 1) 21 | set(CMAKE_C_COMPILER_WORKS TRUE) 22 | set(CMAKE_C_ABI_COMPILED TRUE) 23 | set(CMAKE_COMPILER_IS_MINGW ) 24 | set(CMAKE_COMPILER_IS_CYGWIN ) 25 | if(CMAKE_COMPILER_IS_CYGWIN) 26 | set(CYGWIN 1) 27 | set(UNIX 1) 28 | endif() 29 | 30 | set(CMAKE_C_COMPILER_ENV_VAR "CC") 31 | 32 | if(CMAKE_COMPILER_IS_MINGW) 33 | set(MINGW 1) 34 | endif() 35 | set(CMAKE_C_COMPILER_ID_RUN 1) 36 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) 37 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) 38 | set(CMAKE_C_LINKER_PREFERENCE 10) 39 | 40 | # Save compiler ABI information. 41 | set(CMAKE_C_SIZEOF_DATA_PTR "8") 42 | set(CMAKE_C_COMPILER_ABI "ELF") 43 | set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 44 | 45 | if(CMAKE_C_SIZEOF_DATA_PTR) 46 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") 47 | endif() 48 | 49 | if(CMAKE_C_COMPILER_ABI) 50 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") 51 | endif() 52 | 53 | if(CMAKE_C_LIBRARY_ARCHITECTURE) 54 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 55 | endif() 56 | 57 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") 58 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) 59 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") 60 | endif() 61 | 62 | 63 | 64 | 65 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "c") 66 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/6;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") 67 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 68 | -------------------------------------------------------------------------------- /build/CMakeFiles/3.5.1/CMakeCXXCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_CXX_COMPILER "/usr/bin/c++") 2 | set(CMAKE_CXX_COMPILER_ARG1 "") 3 | set(CMAKE_CXX_COMPILER_ID "GNU") 4 | set(CMAKE_CXX_COMPILER_VERSION "6.5.0") 5 | set(CMAKE_CXX_COMPILER_WRAPPER "") 6 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14") 7 | set(CMAKE_CXX_COMPILE_FEATURES "cxx_template_template_parameters;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") 8 | set(CMAKE_CXX98_COMPILE_FEATURES "cxx_template_template_parameters") 9 | set(CMAKE_CXX11_COMPILE_FEATURES "cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") 10 | set(CMAKE_CXX14_COMPILE_FEATURES "cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") 11 | 12 | set(CMAKE_CXX_PLATFORM_ID "Linux") 13 | set(CMAKE_CXX_SIMULATE_ID "") 14 | set(CMAKE_CXX_SIMULATE_VERSION "") 15 | 16 | set(CMAKE_AR "/usr/bin/ar") 17 | set(CMAKE_RANLIB "/usr/bin/ranlib") 18 | set(CMAKE_LINKER "/usr/bin/ld") 19 | set(CMAKE_COMPILER_IS_GNUCXX 1) 20 | set(CMAKE_CXX_COMPILER_LOADED 1) 21 | set(CMAKE_CXX_COMPILER_WORKS TRUE) 22 | set(CMAKE_CXX_ABI_COMPILED TRUE) 23 | set(CMAKE_COMPILER_IS_MINGW ) 24 | set(CMAKE_COMPILER_IS_CYGWIN ) 25 | if(CMAKE_COMPILER_IS_CYGWIN) 26 | set(CYGWIN 1) 27 | set(UNIX 1) 28 | endif() 29 | 30 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") 31 | 32 | if(CMAKE_COMPILER_IS_MINGW) 33 | set(MINGW 1) 34 | endif() 35 | set(CMAKE_CXX_COMPILER_ID_RUN 1) 36 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) 37 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP) 38 | set(CMAKE_CXX_LINKER_PREFERENCE 30) 39 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) 40 | 41 | # Save compiler ABI information. 42 | set(CMAKE_CXX_SIZEOF_DATA_PTR "8") 43 | set(CMAKE_CXX_COMPILER_ABI "ELF") 44 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 45 | 46 | if(CMAKE_CXX_SIZEOF_DATA_PTR) 47 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") 48 | endif() 49 | 50 | if(CMAKE_CXX_COMPILER_ABI) 51 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") 52 | endif() 53 | 54 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE) 55 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 56 | endif() 57 | 58 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") 59 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) 60 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") 61 | endif() 62 | 63 | 64 | 65 | 66 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;c") 67 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/6;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") 68 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 69 | -------------------------------------------------------------------------------- /build/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/build/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /build/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/build/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /build/CMakeFiles/3.5.1/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Linux-4.15.0-142-generic") 2 | set(CMAKE_HOST_SYSTEM_NAME "Linux") 3 | set(CMAKE_HOST_SYSTEM_VERSION "4.15.0-142-generic") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") 5 | 6 | 7 | 8 | set(CMAKE_SYSTEM "Linux-4.15.0-142-generic") 9 | set(CMAKE_SYSTEM_NAME "Linux") 10 | set(CMAKE_SYSTEM_VERSION "4.15.0-142-generic") 11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64") 12 | 13 | set(CMAKE_CROSSCOMPILING "FALSE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /build/CMakeFiles/3.5.1/CompilerIdC/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/build/CMakeFiles/3.5.1/CompilerIdC/a.out -------------------------------------------------------------------------------- /build/CMakeFiles/3.5.1/CompilerIdCXX/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/build/CMakeFiles/3.5.1/CompilerIdCXX/a.out -------------------------------------------------------------------------------- /build/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/kong/yolov5_prune/yolov5_ncnn") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/kong/yolov5_prune/yolov5_ncnn/build") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /build/CMakeFiles/Makefile.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # The generator used is: 5 | set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") 6 | 7 | # The top level Makefile was generated from the following files: 8 | set(CMAKE_MAKEFILE_DEPENDS 9 | "CMakeCache.txt" 10 | "../CMakeLists.txt" 11 | "CMakeFiles/3.5.1/CMakeCCompiler.cmake" 12 | "CMakeFiles/3.5.1/CMakeCXXCompiler.cmake" 13 | "CMakeFiles/3.5.1/CMakeSystem.cmake" 14 | "CMakeFiles/feature_tests.c" 15 | "CMakeFiles/feature_tests.cxx" 16 | "/usr/local/share/OpenCV/OpenCVConfig-version.cmake" 17 | "/usr/local/share/OpenCV/OpenCVConfig.cmake" 18 | "/usr/local/share/OpenCV/OpenCVModules-release.cmake" 19 | "/usr/local/share/OpenCV/OpenCVModules.cmake" 20 | "/usr/share/cmake-3.5/Modules/CMakeCCompiler.cmake.in" 21 | "/usr/share/cmake-3.5/Modules/CMakeCCompilerABI.c" 22 | "/usr/share/cmake-3.5/Modules/CMakeCInformation.cmake" 23 | "/usr/share/cmake-3.5/Modules/CMakeCXXCompiler.cmake.in" 24 | "/usr/share/cmake-3.5/Modules/CMakeCXXCompilerABI.cpp" 25 | "/usr/share/cmake-3.5/Modules/CMakeCXXInformation.cmake" 26 | "/usr/share/cmake-3.5/Modules/CMakeCommonLanguageInclude.cmake" 27 | "/usr/share/cmake-3.5/Modules/CMakeCompilerIdDetection.cmake" 28 | "/usr/share/cmake-3.5/Modules/CMakeDetermineCCompiler.cmake" 29 | "/usr/share/cmake-3.5/Modules/CMakeDetermineCXXCompiler.cmake" 30 | "/usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake" 31 | "/usr/share/cmake-3.5/Modules/CMakeDetermineCompiler.cmake" 32 | "/usr/share/cmake-3.5/Modules/CMakeDetermineCompilerABI.cmake" 33 | "/usr/share/cmake-3.5/Modules/CMakeDetermineCompilerId.cmake" 34 | "/usr/share/cmake-3.5/Modules/CMakeDetermineSystem.cmake" 35 | "/usr/share/cmake-3.5/Modules/CMakeFindBinUtils.cmake" 36 | "/usr/share/cmake-3.5/Modules/CMakeGenericSystem.cmake" 37 | "/usr/share/cmake-3.5/Modules/CMakeLanguageInformation.cmake" 38 | "/usr/share/cmake-3.5/Modules/CMakeParseArguments.cmake" 39 | "/usr/share/cmake-3.5/Modules/CMakeParseImplicitLinkInfo.cmake" 40 | "/usr/share/cmake-3.5/Modules/CMakeSystem.cmake.in" 41 | "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInformation.cmake" 42 | "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInitialize.cmake" 43 | "/usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake" 44 | "/usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake" 45 | "/usr/share/cmake-3.5/Modules/CMakeTestCompilerCommon.cmake" 46 | "/usr/share/cmake-3.5/Modules/CMakeUnixFindMake.cmake" 47 | "/usr/share/cmake-3.5/Modules/CheckCSourceCompiles.cmake" 48 | "/usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake" 49 | "/usr/share/cmake-3.5/Modules/Compiler/ADSP-DetermineCompiler.cmake" 50 | "/usr/share/cmake-3.5/Modules/Compiler/ARMCC-DetermineCompiler.cmake" 51 | "/usr/share/cmake-3.5/Modules/Compiler/AppleClang-DetermineCompiler.cmake" 52 | "/usr/share/cmake-3.5/Modules/Compiler/Borland-DetermineCompiler.cmake" 53 | "/usr/share/cmake-3.5/Modules/Compiler/Clang-DetermineCompiler.cmake" 54 | "/usr/share/cmake-3.5/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" 55 | "/usr/share/cmake-3.5/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake" 56 | "/usr/share/cmake-3.5/Modules/Compiler/Compaq-C-DetermineCompiler.cmake" 57 | "/usr/share/cmake-3.5/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake" 58 | "/usr/share/cmake-3.5/Modules/Compiler/Cray-DetermineCompiler.cmake" 59 | "/usr/share/cmake-3.5/Modules/Compiler/Embarcadero-DetermineCompiler.cmake" 60 | "/usr/share/cmake-3.5/Modules/Compiler/Fujitsu-DetermineCompiler.cmake" 61 | "/usr/share/cmake-3.5/Modules/Compiler/GHS-DetermineCompiler.cmake" 62 | "/usr/share/cmake-3.5/Modules/Compiler/GNU-C-FeatureTests.cmake" 63 | "/usr/share/cmake-3.5/Modules/Compiler/GNU-C.cmake" 64 | "/usr/share/cmake-3.5/Modules/Compiler/GNU-CXX-FeatureTests.cmake" 65 | "/usr/share/cmake-3.5/Modules/Compiler/GNU-CXX.cmake" 66 | "/usr/share/cmake-3.5/Modules/Compiler/GNU-DetermineCompiler.cmake" 67 | "/usr/share/cmake-3.5/Modules/Compiler/GNU.cmake" 68 | "/usr/share/cmake-3.5/Modules/Compiler/HP-C-DetermineCompiler.cmake" 69 | "/usr/share/cmake-3.5/Modules/Compiler/HP-CXX-DetermineCompiler.cmake" 70 | "/usr/share/cmake-3.5/Modules/Compiler/IAR-DetermineCompiler.cmake" 71 | "/usr/share/cmake-3.5/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" 72 | "/usr/share/cmake-3.5/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake" 73 | "/usr/share/cmake-3.5/Modules/Compiler/Intel-DetermineCompiler.cmake" 74 | "/usr/share/cmake-3.5/Modules/Compiler/MIPSpro-DetermineCompiler.cmake" 75 | "/usr/share/cmake-3.5/Modules/Compiler/MSVC-DetermineCompiler.cmake" 76 | "/usr/share/cmake-3.5/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake" 77 | "/usr/share/cmake-3.5/Modules/Compiler/PGI-DetermineCompiler.cmake" 78 | "/usr/share/cmake-3.5/Modules/Compiler/PathScale-DetermineCompiler.cmake" 79 | "/usr/share/cmake-3.5/Modules/Compiler/SCO-DetermineCompiler.cmake" 80 | "/usr/share/cmake-3.5/Modules/Compiler/SDCC-C-DetermineCompiler.cmake" 81 | "/usr/share/cmake-3.5/Modules/Compiler/SunPro-C-DetermineCompiler.cmake" 82 | "/usr/share/cmake-3.5/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake" 83 | "/usr/share/cmake-3.5/Modules/Compiler/TI-DetermineCompiler.cmake" 84 | "/usr/share/cmake-3.5/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake" 85 | "/usr/share/cmake-3.5/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake" 86 | "/usr/share/cmake-3.5/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake" 87 | "/usr/share/cmake-3.5/Modules/Compiler/Watcom-DetermineCompiler.cmake" 88 | "/usr/share/cmake-3.5/Modules/Compiler/XL-C-DetermineCompiler.cmake" 89 | "/usr/share/cmake-3.5/Modules/Compiler/XL-CXX-DetermineCompiler.cmake" 90 | "/usr/share/cmake-3.5/Modules/Compiler/zOS-C-DetermineCompiler.cmake" 91 | "/usr/share/cmake-3.5/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake" 92 | "/usr/share/cmake-3.5/Modules/FindOpenMP.cmake" 93 | "/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake" 94 | "/usr/share/cmake-3.5/Modules/FindPackageMessage.cmake" 95 | "/usr/share/cmake-3.5/Modules/Internal/FeatureTesting.cmake" 96 | "/usr/share/cmake-3.5/Modules/MultiArchCross.cmake" 97 | "/usr/share/cmake-3.5/Modules/Platform/Linux-CXX.cmake" 98 | "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-C.cmake" 99 | "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-CXX.cmake" 100 | "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU.cmake" 101 | "/usr/share/cmake-3.5/Modules/Platform/Linux.cmake" 102 | "/usr/share/cmake-3.5/Modules/Platform/UnixPaths.cmake" 103 | ) 104 | 105 | # The corresponding makefile is: 106 | set(CMAKE_MAKEFILE_OUTPUTS 107 | "Makefile" 108 | "CMakeFiles/cmake.check_cache" 109 | ) 110 | 111 | # Byproducts of CMake generate step: 112 | set(CMAKE_MAKEFILE_PRODUCTS 113 | "CMakeFiles/3.5.1/CMakeSystem.cmake" 114 | "CMakeFiles/3.5.1/CMakeCCompiler.cmake" 115 | "CMakeFiles/3.5.1/CMakeCXXCompiler.cmake" 116 | "CMakeFiles/3.5.1/CMakeCCompiler.cmake" 117 | "CMakeFiles/3.5.1/CMakeCXXCompiler.cmake" 118 | "CMakeFiles/CMakeDirectoryInformation.cmake" 119 | ) 120 | 121 | # Dependency information for all targets: 122 | set(CMAKE_DEPEND_INFO_FILES 123 | "CMakeFiles/yolov5s.dir/DependInfo.cmake" 124 | ) 125 | -------------------------------------------------------------------------------- /build/CMakeFiles/Makefile2: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # The main recursive all target 10 | all: 11 | 12 | .PHONY : all 13 | 14 | # The main recursive preinstall target 15 | preinstall: 16 | 17 | .PHONY : preinstall 18 | 19 | #============================================================================= 20 | # Special targets provided by cmake. 21 | 22 | # Disable implicit rules so canonical targets will work. 23 | .SUFFIXES: 24 | 25 | 26 | # Remove some rules from gmake that .SUFFIXES does not remove. 27 | SUFFIXES = 28 | 29 | .SUFFIXES: .hpux_make_needs_suffix_list 30 | 31 | 32 | # Suppress display of executed commands. 33 | $(VERBOSE).SILENT: 34 | 35 | 36 | # A target that is always out of date. 37 | cmake_force: 38 | 39 | .PHONY : cmake_force 40 | 41 | #============================================================================= 42 | # Set environment variables for the build. 43 | 44 | # The shell in which to execute make rules. 45 | SHELL = /bin/sh 46 | 47 | # The CMake executable. 48 | CMAKE_COMMAND = /usr/bin/cmake 49 | 50 | # The command to remove a file. 51 | RM = /usr/bin/cmake -E remove -f 52 | 53 | # Escaping for special characters. 54 | EQUALS = = 55 | 56 | # The top-level source directory on which CMake was run. 57 | CMAKE_SOURCE_DIR = /home/kong/yolov5_prune/yolov5_ncnn 58 | 59 | # The top-level build directory on which CMake was run. 60 | CMAKE_BINARY_DIR = /home/kong/yolov5_prune/yolov5_ncnn/build 61 | 62 | #============================================================================= 63 | # Target rules for target CMakeFiles/yolov5s.dir 64 | 65 | # All Build rule for target. 66 | CMakeFiles/yolov5s.dir/all: 67 | $(MAKE) -f CMakeFiles/yolov5s.dir/build.make CMakeFiles/yolov5s.dir/depend 68 | $(MAKE) -f CMakeFiles/yolov5s.dir/build.make CMakeFiles/yolov5s.dir/build 69 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/kong/yolov5_prune/yolov5_ncnn/build/CMakeFiles --progress-num=1,2 "Built target yolov5s" 70 | .PHONY : CMakeFiles/yolov5s.dir/all 71 | 72 | # Include target in all. 73 | all: CMakeFiles/yolov5s.dir/all 74 | 75 | .PHONY : all 76 | 77 | # Build rule for subdir invocation for target. 78 | CMakeFiles/yolov5s.dir/rule: cmake_check_build_system 79 | $(CMAKE_COMMAND) -E cmake_progress_start /home/kong/yolov5_prune/yolov5_ncnn/build/CMakeFiles 2 80 | $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/yolov5s.dir/all 81 | $(CMAKE_COMMAND) -E cmake_progress_start /home/kong/yolov5_prune/yolov5_ncnn/build/CMakeFiles 0 82 | .PHONY : CMakeFiles/yolov5s.dir/rule 83 | 84 | # Convenience name for target. 85 | yolov5s: CMakeFiles/yolov5s.dir/rule 86 | 87 | .PHONY : yolov5s 88 | 89 | # clean rule for target. 90 | CMakeFiles/yolov5s.dir/clean: 91 | $(MAKE) -f CMakeFiles/yolov5s.dir/build.make CMakeFiles/yolov5s.dir/clean 92 | .PHONY : CMakeFiles/yolov5s.dir/clean 93 | 94 | # clean rule for target. 95 | clean: CMakeFiles/yolov5s.dir/clean 96 | 97 | .PHONY : clean 98 | 99 | #============================================================================= 100 | # Special targets to cleanup operation of make. 101 | 102 | # Special rule to run CMake to check the build system integrity. 103 | # No rule that depends on this can have commands that come from listfiles 104 | # because they might be regenerated. 105 | cmake_check_build_system: 106 | $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 107 | .PHONY : cmake_check_build_system 108 | 109 | -------------------------------------------------------------------------------- /build/CMakeFiles/TargetDirectories.txt: -------------------------------------------------------------------------------- 1 | /home/kong/yolov5_prune/yolov5_ncnn/build/CMakeFiles/edit_cache.dir 2 | /home/kong/yolov5_prune/yolov5_ncnn/build/CMakeFiles/yolov5s.dir 3 | /home/kong/yolov5_prune/yolov5_ncnn/build/CMakeFiles/rebuild_cache.dir 4 | -------------------------------------------------------------------------------- /build/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /build/CMakeFiles/feature_tests.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/build/CMakeFiles/feature_tests.bin -------------------------------------------------------------------------------- /build/CMakeFiles/feature_tests.c: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "C_FEATURE:" 4 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "c_function_prototypes\n" 10 | "C_FEATURE:" 11 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "c_restrict\n" 17 | "C_FEATURE:" 18 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "c_static_assert\n" 24 | "C_FEATURE:" 25 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "c_variadic_macros\n" 31 | 32 | }; 33 | 34 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 35 | -------------------------------------------------------------------------------- /build/CMakeFiles/feature_tests.cxx: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "CXX_FEATURE:" 4 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "cxx_aggregate_default_initializers\n" 10 | "CXX_FEATURE:" 11 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "cxx_alias_templates\n" 17 | "CXX_FEATURE:" 18 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "cxx_alignas\n" 24 | "CXX_FEATURE:" 25 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "cxx_alignof\n" 31 | "CXX_FEATURE:" 32 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 33 | "1" 34 | #else 35 | "0" 36 | #endif 37 | "cxx_attributes\n" 38 | "CXX_FEATURE:" 39 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 40 | "1" 41 | #else 42 | "0" 43 | #endif 44 | "cxx_attribute_deprecated\n" 45 | "CXX_FEATURE:" 46 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 47 | "1" 48 | #else 49 | "0" 50 | #endif 51 | "cxx_auto_type\n" 52 | "CXX_FEATURE:" 53 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 54 | "1" 55 | #else 56 | "0" 57 | #endif 58 | "cxx_binary_literals\n" 59 | "CXX_FEATURE:" 60 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 61 | "1" 62 | #else 63 | "0" 64 | #endif 65 | "cxx_constexpr\n" 66 | "CXX_FEATURE:" 67 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 68 | "1" 69 | #else 70 | "0" 71 | #endif 72 | "cxx_contextual_conversions\n" 73 | "CXX_FEATURE:" 74 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 75 | "1" 76 | #else 77 | "0" 78 | #endif 79 | "cxx_decltype\n" 80 | "CXX_FEATURE:" 81 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 82 | "1" 83 | #else 84 | "0" 85 | #endif 86 | "cxx_decltype_auto\n" 87 | "CXX_FEATURE:" 88 | #if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L 89 | "1" 90 | #else 91 | "0" 92 | #endif 93 | "cxx_decltype_incomplete_return_types\n" 94 | "CXX_FEATURE:" 95 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 96 | "1" 97 | #else 98 | "0" 99 | #endif 100 | "cxx_default_function_template_args\n" 101 | "CXX_FEATURE:" 102 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 103 | "1" 104 | #else 105 | "0" 106 | #endif 107 | "cxx_defaulted_functions\n" 108 | "CXX_FEATURE:" 109 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 110 | "1" 111 | #else 112 | "0" 113 | #endif 114 | "cxx_defaulted_move_initializers\n" 115 | "CXX_FEATURE:" 116 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 117 | "1" 118 | #else 119 | "0" 120 | #endif 121 | "cxx_delegating_constructors\n" 122 | "CXX_FEATURE:" 123 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 124 | "1" 125 | #else 126 | "0" 127 | #endif 128 | "cxx_deleted_functions\n" 129 | "CXX_FEATURE:" 130 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 131 | "1" 132 | #else 133 | "0" 134 | #endif 135 | "cxx_digit_separators\n" 136 | "CXX_FEATURE:" 137 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 138 | "1" 139 | #else 140 | "0" 141 | #endif 142 | "cxx_enum_forward_declarations\n" 143 | "CXX_FEATURE:" 144 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 145 | "1" 146 | #else 147 | "0" 148 | #endif 149 | "cxx_explicit_conversions\n" 150 | "CXX_FEATURE:" 151 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 152 | "1" 153 | #else 154 | "0" 155 | #endif 156 | "cxx_extended_friend_declarations\n" 157 | "CXX_FEATURE:" 158 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 159 | "1" 160 | #else 161 | "0" 162 | #endif 163 | "cxx_extern_templates\n" 164 | "CXX_FEATURE:" 165 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 166 | "1" 167 | #else 168 | "0" 169 | #endif 170 | "cxx_final\n" 171 | "CXX_FEATURE:" 172 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 173 | "1" 174 | #else 175 | "0" 176 | #endif 177 | "cxx_func_identifier\n" 178 | "CXX_FEATURE:" 179 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 180 | "1" 181 | #else 182 | "0" 183 | #endif 184 | "cxx_generalized_initializers\n" 185 | "CXX_FEATURE:" 186 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 187 | "1" 188 | #else 189 | "0" 190 | #endif 191 | "cxx_generic_lambdas\n" 192 | "CXX_FEATURE:" 193 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 194 | "1" 195 | #else 196 | "0" 197 | #endif 198 | "cxx_inheriting_constructors\n" 199 | "CXX_FEATURE:" 200 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 201 | "1" 202 | #else 203 | "0" 204 | #endif 205 | "cxx_inline_namespaces\n" 206 | "CXX_FEATURE:" 207 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 208 | "1" 209 | #else 210 | "0" 211 | #endif 212 | "cxx_lambdas\n" 213 | "CXX_FEATURE:" 214 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 215 | "1" 216 | #else 217 | "0" 218 | #endif 219 | "cxx_lambda_init_captures\n" 220 | "CXX_FEATURE:" 221 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 222 | "1" 223 | #else 224 | "0" 225 | #endif 226 | "cxx_local_type_template_args\n" 227 | "CXX_FEATURE:" 228 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 229 | "1" 230 | #else 231 | "0" 232 | #endif 233 | "cxx_long_long_type\n" 234 | "CXX_FEATURE:" 235 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 236 | "1" 237 | #else 238 | "0" 239 | #endif 240 | "cxx_noexcept\n" 241 | "CXX_FEATURE:" 242 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 243 | "1" 244 | #else 245 | "0" 246 | #endif 247 | "cxx_nonstatic_member_init\n" 248 | "CXX_FEATURE:" 249 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 250 | "1" 251 | #else 252 | "0" 253 | #endif 254 | "cxx_nullptr\n" 255 | "CXX_FEATURE:" 256 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 257 | "1" 258 | #else 259 | "0" 260 | #endif 261 | "cxx_override\n" 262 | "CXX_FEATURE:" 263 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 264 | "1" 265 | #else 266 | "0" 267 | #endif 268 | "cxx_range_for\n" 269 | "CXX_FEATURE:" 270 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 271 | "1" 272 | #else 273 | "0" 274 | #endif 275 | "cxx_raw_string_literals\n" 276 | "CXX_FEATURE:" 277 | #if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L 278 | "1" 279 | #else 280 | "0" 281 | #endif 282 | "cxx_reference_qualified_functions\n" 283 | "CXX_FEATURE:" 284 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 285 | "1" 286 | #else 287 | "0" 288 | #endif 289 | "cxx_relaxed_constexpr\n" 290 | "CXX_FEATURE:" 291 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 292 | "1" 293 | #else 294 | "0" 295 | #endif 296 | "cxx_return_type_deduction\n" 297 | "CXX_FEATURE:" 298 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 299 | "1" 300 | #else 301 | "0" 302 | #endif 303 | "cxx_right_angle_brackets\n" 304 | "CXX_FEATURE:" 305 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 306 | "1" 307 | #else 308 | "0" 309 | #endif 310 | "cxx_rvalue_references\n" 311 | "CXX_FEATURE:" 312 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 313 | "1" 314 | #else 315 | "0" 316 | #endif 317 | "cxx_sizeof_member\n" 318 | "CXX_FEATURE:" 319 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 320 | "1" 321 | #else 322 | "0" 323 | #endif 324 | "cxx_static_assert\n" 325 | "CXX_FEATURE:" 326 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 327 | "1" 328 | #else 329 | "0" 330 | #endif 331 | "cxx_strong_enums\n" 332 | "CXX_FEATURE:" 333 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && __cplusplus 334 | "1" 335 | #else 336 | "0" 337 | #endif 338 | "cxx_template_template_parameters\n" 339 | "CXX_FEATURE:" 340 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 341 | "1" 342 | #else 343 | "0" 344 | #endif 345 | "cxx_thread_local\n" 346 | "CXX_FEATURE:" 347 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 348 | "1" 349 | #else 350 | "0" 351 | #endif 352 | "cxx_trailing_return_types\n" 353 | "CXX_FEATURE:" 354 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 355 | "1" 356 | #else 357 | "0" 358 | #endif 359 | "cxx_unicode_literals\n" 360 | "CXX_FEATURE:" 361 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 362 | "1" 363 | #else 364 | "0" 365 | #endif 366 | "cxx_uniform_initialization\n" 367 | "CXX_FEATURE:" 368 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 369 | "1" 370 | #else 371 | "0" 372 | #endif 373 | "cxx_unrestricted_unions\n" 374 | "CXX_FEATURE:" 375 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 376 | "1" 377 | #else 378 | "0" 379 | #endif 380 | "cxx_user_literals\n" 381 | "CXX_FEATURE:" 382 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 383 | "1" 384 | #else 385 | "0" 386 | #endif 387 | "cxx_variable_templates\n" 388 | "CXX_FEATURE:" 389 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 390 | "1" 391 | #else 392 | "0" 393 | #endif 394 | "cxx_variadic_macros\n" 395 | "CXX_FEATURE:" 396 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 397 | "1" 398 | #else 399 | "0" 400 | #endif 401 | "cxx_variadic_templates\n" 402 | 403 | }; 404 | 405 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 406 | -------------------------------------------------------------------------------- /build/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /build/CMakeFiles/yolov5s.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/home/kong/yolov5_prune/yolov5_ncnn/yolov5.cpp" "/home/kong/yolov5_prune/yolov5_ncnn/build/CMakeFiles/yolov5s.dir/yolov5.cpp.o" 8 | ) 9 | set(CMAKE_CXX_COMPILER_ID "GNU") 10 | 11 | # The include file search paths: 12 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 13 | "/usr/local/share/OpenCV/include" 14 | "../ncnn-20210507-ubuntu-1604-shared/include/ncnn" 15 | "/usr/local/include" 16 | "/usr/local/include/opencv" 17 | ) 18 | 19 | # Targets to which this target links. 20 | set(CMAKE_TARGET_LINKED_INFO_FILES 21 | ) 22 | 23 | # Fortran module output directory. 24 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 25 | -------------------------------------------------------------------------------- /build/CMakeFiles/yolov5s.dir/build.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Delete rule output on recipe failure. 5 | .DELETE_ON_ERROR: 6 | 7 | 8 | #============================================================================= 9 | # Special targets provided by cmake. 10 | 11 | # Disable implicit rules so canonical targets will work. 12 | .SUFFIXES: 13 | 14 | 15 | # Remove some rules from gmake that .SUFFIXES does not remove. 16 | SUFFIXES = 17 | 18 | .SUFFIXES: .hpux_make_needs_suffix_list 19 | 20 | 21 | # Suppress display of executed commands. 22 | $(VERBOSE).SILENT: 23 | 24 | 25 | # A target that is always out of date. 26 | cmake_force: 27 | 28 | .PHONY : cmake_force 29 | 30 | #============================================================================= 31 | # Set environment variables for the build. 32 | 33 | # The shell in which to execute make rules. 34 | SHELL = /bin/sh 35 | 36 | # The CMake executable. 37 | CMAKE_COMMAND = /usr/bin/cmake 38 | 39 | # The command to remove a file. 40 | RM = /usr/bin/cmake -E remove -f 41 | 42 | # Escaping for special characters. 43 | EQUALS = = 44 | 45 | # The top-level source directory on which CMake was run. 46 | CMAKE_SOURCE_DIR = /home/kong/yolov5_prune/yolov5_ncnn 47 | 48 | # The top-level build directory on which CMake was run. 49 | CMAKE_BINARY_DIR = /home/kong/yolov5_prune/yolov5_ncnn/build 50 | 51 | # Include any dependencies generated for this target. 52 | include CMakeFiles/yolov5s.dir/depend.make 53 | 54 | # Include the progress variables for this target. 55 | include CMakeFiles/yolov5s.dir/progress.make 56 | 57 | # Include the compile flags for this target's objects. 58 | include CMakeFiles/yolov5s.dir/flags.make 59 | 60 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: CMakeFiles/yolov5s.dir/flags.make 61 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: ../yolov5.cpp 62 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/kong/yolov5_prune/yolov5_ncnn/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/yolov5s.dir/yolov5.cpp.o" 63 | /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/yolov5s.dir/yolov5.cpp.o -c /home/kong/yolov5_prune/yolov5_ncnn/yolov5.cpp 64 | 65 | CMakeFiles/yolov5s.dir/yolov5.cpp.i: cmake_force 66 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/yolov5s.dir/yolov5.cpp.i" 67 | /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/kong/yolov5_prune/yolov5_ncnn/yolov5.cpp > CMakeFiles/yolov5s.dir/yolov5.cpp.i 68 | 69 | CMakeFiles/yolov5s.dir/yolov5.cpp.s: cmake_force 70 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/yolov5s.dir/yolov5.cpp.s" 71 | /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/kong/yolov5_prune/yolov5_ncnn/yolov5.cpp -o CMakeFiles/yolov5s.dir/yolov5.cpp.s 72 | 73 | CMakeFiles/yolov5s.dir/yolov5.cpp.o.requires: 74 | 75 | .PHONY : CMakeFiles/yolov5s.dir/yolov5.cpp.o.requires 76 | 77 | CMakeFiles/yolov5s.dir/yolov5.cpp.o.provides: CMakeFiles/yolov5s.dir/yolov5.cpp.o.requires 78 | $(MAKE) -f CMakeFiles/yolov5s.dir/build.make CMakeFiles/yolov5s.dir/yolov5.cpp.o.provides.build 79 | .PHONY : CMakeFiles/yolov5s.dir/yolov5.cpp.o.provides 80 | 81 | CMakeFiles/yolov5s.dir/yolov5.cpp.o.provides.build: CMakeFiles/yolov5s.dir/yolov5.cpp.o 82 | 83 | 84 | # Object files for target yolov5s 85 | yolov5s_OBJECTS = \ 86 | "CMakeFiles/yolov5s.dir/yolov5.cpp.o" 87 | 88 | # External object files for target yolov5s 89 | yolov5s_EXTERNAL_OBJECTS = 90 | 91 | yolov5s: CMakeFiles/yolov5s.dir/yolov5.cpp.o 92 | yolov5s: CMakeFiles/yolov5s.dir/build.make 93 | yolov5s: /usr/local/lib/libopencv_highgui.so.3.4.8 94 | yolov5s: /usr/local/lib/libopencv_videoio.so.3.4.8 95 | yolov5s: /usr/local/lib/libopencv_imgcodecs.so.3.4.8 96 | yolov5s: /usr/local/lib/libopencv_imgproc.so.3.4.8 97 | yolov5s: /usr/local/lib/libopencv_core.so.3.4.8 98 | yolov5s: CMakeFiles/yolov5s.dir/link.txt 99 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/kong/yolov5_prune/yolov5_ncnn/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable yolov5s" 100 | $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/yolov5s.dir/link.txt --verbose=$(VERBOSE) 101 | 102 | # Rule to build all files generated by this target. 103 | CMakeFiles/yolov5s.dir/build: yolov5s 104 | 105 | .PHONY : CMakeFiles/yolov5s.dir/build 106 | 107 | CMakeFiles/yolov5s.dir/requires: CMakeFiles/yolov5s.dir/yolov5.cpp.o.requires 108 | 109 | .PHONY : CMakeFiles/yolov5s.dir/requires 110 | 111 | CMakeFiles/yolov5s.dir/clean: 112 | $(CMAKE_COMMAND) -P CMakeFiles/yolov5s.dir/cmake_clean.cmake 113 | .PHONY : CMakeFiles/yolov5s.dir/clean 114 | 115 | CMakeFiles/yolov5s.dir/depend: 116 | cd /home/kong/yolov5_prune/yolov5_ncnn/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/kong/yolov5_prune/yolov5_ncnn /home/kong/yolov5_prune/yolov5_ncnn /home/kong/yolov5_prune/yolov5_ncnn/build /home/kong/yolov5_prune/yolov5_ncnn/build /home/kong/yolov5_prune/yolov5_ncnn/build/CMakeFiles/yolov5s.dir/DependInfo.cmake --color=$(COLOR) 117 | .PHONY : CMakeFiles/yolov5s.dir/depend 118 | 119 | -------------------------------------------------------------------------------- /build/CMakeFiles/yolov5s.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/yolov5s.dir/yolov5.cpp.o" 3 | "yolov5s.pdb" 4 | "yolov5s" 5 | ) 6 | 7 | # Per-language clean rules from dependency scanning. 8 | foreach(lang CXX) 9 | include(CMakeFiles/yolov5s.dir/cmake_clean_${lang}.cmake OPTIONAL) 10 | endforeach() 11 | -------------------------------------------------------------------------------- /build/CMakeFiles/yolov5s.dir/depend.internal: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | CMakeFiles/yolov5s.dir/yolov5.cpp.o 5 | ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/allocator.h 6 | ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/blob.h 7 | ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/command.h 8 | ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/gpu.h 9 | ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/layer.h 10 | ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/mat.h 11 | ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/modelbin.h 12 | ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/ncnn_export.h 13 | ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/net.h 14 | ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/option.h 15 | ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/paramdict.h 16 | ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/pipeline.h 17 | ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/platform.h 18 | ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/simplestl.h 19 | ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/vulkan_header_fix.h 20 | /home/kong/yolov5_prune/yolov5_ncnn/yolov5.cpp 21 | /usr/local/include/opencv/cxcore.h 22 | /usr/local/include/opencv2/calib3d.hpp 23 | /usr/local/include/opencv2/calib3d/calib3d_c.h 24 | /usr/local/include/opencv2/core.hpp 25 | /usr/local/include/opencv2/core/affine.hpp 26 | /usr/local/include/opencv2/core/async.hpp 27 | /usr/local/include/opencv2/core/base.hpp 28 | /usr/local/include/opencv2/core/bufferpool.hpp 29 | /usr/local/include/opencv2/core/check.hpp 30 | /usr/local/include/opencv2/core/core.hpp 31 | /usr/local/include/opencv2/core/core_c.h 32 | /usr/local/include/opencv2/core/cuda.hpp 33 | /usr/local/include/opencv2/core/cuda.inl.hpp 34 | /usr/local/include/opencv2/core/cuda_types.hpp 35 | /usr/local/include/opencv2/core/cv_cpu_dispatch.h 36 | /usr/local/include/opencv2/core/cv_cpu_helper.h 37 | /usr/local/include/opencv2/core/cvdef.h 38 | /usr/local/include/opencv2/core/cvstd.hpp 39 | /usr/local/include/opencv2/core/cvstd.inl.hpp 40 | /usr/local/include/opencv2/core/fast_math.hpp 41 | /usr/local/include/opencv2/core/hal/interface.h 42 | /usr/local/include/opencv2/core/hal/msa_macros.h 43 | /usr/local/include/opencv2/core/mat.hpp 44 | /usr/local/include/opencv2/core/mat.inl.hpp 45 | /usr/local/include/opencv2/core/matx.hpp 46 | /usr/local/include/opencv2/core/neon_utils.hpp 47 | /usr/local/include/opencv2/core/operations.hpp 48 | /usr/local/include/opencv2/core/optim.hpp 49 | /usr/local/include/opencv2/core/ovx.hpp 50 | /usr/local/include/opencv2/core/persistence.hpp 51 | /usr/local/include/opencv2/core/ptr.inl.hpp 52 | /usr/local/include/opencv2/core/saturate.hpp 53 | /usr/local/include/opencv2/core/traits.hpp 54 | /usr/local/include/opencv2/core/types.hpp 55 | /usr/local/include/opencv2/core/types_c.h 56 | /usr/local/include/opencv2/core/utility.hpp 57 | /usr/local/include/opencv2/core/version.hpp 58 | /usr/local/include/opencv2/core/vsx_utils.hpp 59 | /usr/local/include/opencv2/dnn.hpp 60 | /usr/local/include/opencv2/dnn/dict.hpp 61 | /usr/local/include/opencv2/dnn/dnn.hpp 62 | /usr/local/include/opencv2/dnn/dnn.inl.hpp 63 | /usr/local/include/opencv2/dnn/layer.hpp 64 | /usr/local/include/opencv2/dnn/utils/inference_engine.hpp 65 | /usr/local/include/opencv2/features2d.hpp 66 | /usr/local/include/opencv2/flann.hpp 67 | /usr/local/include/opencv2/flann/all_indices.h 68 | /usr/local/include/opencv2/flann/any.h 69 | /usr/local/include/opencv2/flann/autotuned_index.h 70 | /usr/local/include/opencv2/flann/composite_index.h 71 | /usr/local/include/opencv2/flann/config.h 72 | /usr/local/include/opencv2/flann/defines.h 73 | /usr/local/include/opencv2/flann/dist.h 74 | /usr/local/include/opencv2/flann/dynamic_bitset.h 75 | /usr/local/include/opencv2/flann/flann_base.hpp 76 | /usr/local/include/opencv2/flann/general.h 77 | /usr/local/include/opencv2/flann/ground_truth.h 78 | /usr/local/include/opencv2/flann/heap.h 79 | /usr/local/include/opencv2/flann/hierarchical_clustering_index.h 80 | /usr/local/include/opencv2/flann/index_testing.h 81 | /usr/local/include/opencv2/flann/kdtree_index.h 82 | /usr/local/include/opencv2/flann/kdtree_single_index.h 83 | /usr/local/include/opencv2/flann/kmeans_index.h 84 | /usr/local/include/opencv2/flann/linear_index.h 85 | /usr/local/include/opencv2/flann/logger.h 86 | /usr/local/include/opencv2/flann/lsh_index.h 87 | /usr/local/include/opencv2/flann/lsh_table.h 88 | /usr/local/include/opencv2/flann/matrix.h 89 | /usr/local/include/opencv2/flann/miniflann.hpp 90 | /usr/local/include/opencv2/flann/nn_index.h 91 | /usr/local/include/opencv2/flann/params.h 92 | /usr/local/include/opencv2/flann/random.h 93 | /usr/local/include/opencv2/flann/result_set.h 94 | /usr/local/include/opencv2/flann/sampling.h 95 | /usr/local/include/opencv2/flann/saving.h 96 | /usr/local/include/opencv2/flann/timer.h 97 | /usr/local/include/opencv2/highgui.hpp 98 | /usr/local/include/opencv2/highgui/highgui.hpp 99 | /usr/local/include/opencv2/highgui/highgui_c.h 100 | /usr/local/include/opencv2/imgcodecs.hpp 101 | /usr/local/include/opencv2/imgcodecs/imgcodecs_c.h 102 | /usr/local/include/opencv2/imgproc.hpp 103 | /usr/local/include/opencv2/imgproc/imgproc.hpp 104 | /usr/local/include/opencv2/imgproc/imgproc_c.h 105 | /usr/local/include/opencv2/imgproc/types_c.h 106 | /usr/local/include/opencv2/ml.hpp 107 | /usr/local/include/opencv2/ml/ml.inl.hpp 108 | /usr/local/include/opencv2/objdetect.hpp 109 | /usr/local/include/opencv2/objdetect/detection_based_tracker.hpp 110 | /usr/local/include/opencv2/objdetect/objdetect_c.h 111 | /usr/local/include/opencv2/opencv.hpp 112 | /usr/local/include/opencv2/opencv_modules.hpp 113 | /usr/local/include/opencv2/photo.hpp 114 | /usr/local/include/opencv2/photo/photo_c.h 115 | /usr/local/include/opencv2/shape.hpp 116 | /usr/local/include/opencv2/shape/emdL1.hpp 117 | /usr/local/include/opencv2/shape/hist_cost.hpp 118 | /usr/local/include/opencv2/shape/shape_distance.hpp 119 | /usr/local/include/opencv2/shape/shape_transformer.hpp 120 | /usr/local/include/opencv2/stitching.hpp 121 | /usr/local/include/opencv2/stitching/detail/blenders.hpp 122 | /usr/local/include/opencv2/stitching/detail/camera.hpp 123 | /usr/local/include/opencv2/stitching/detail/exposure_compensate.hpp 124 | /usr/local/include/opencv2/stitching/detail/matchers.hpp 125 | /usr/local/include/opencv2/stitching/detail/motion_estimators.hpp 126 | /usr/local/include/opencv2/stitching/detail/seam_finders.hpp 127 | /usr/local/include/opencv2/stitching/detail/util.hpp 128 | /usr/local/include/opencv2/stitching/detail/util_inl.hpp 129 | /usr/local/include/opencv2/stitching/detail/warpers.hpp 130 | /usr/local/include/opencv2/stitching/detail/warpers_inl.hpp 131 | /usr/local/include/opencv2/stitching/warpers.hpp 132 | /usr/local/include/opencv2/superres.hpp 133 | /usr/local/include/opencv2/superres/optical_flow.hpp 134 | /usr/local/include/opencv2/video.hpp 135 | /usr/local/include/opencv2/video/background_segm.hpp 136 | /usr/local/include/opencv2/video/tracking.hpp 137 | /usr/local/include/opencv2/video/tracking_c.h 138 | /usr/local/include/opencv2/videoio.hpp 139 | /usr/local/include/opencv2/videoio/videoio_c.h 140 | /usr/local/include/opencv2/videostab.hpp 141 | /usr/local/include/opencv2/videostab/deblurring.hpp 142 | /usr/local/include/opencv2/videostab/fast_marching.hpp 143 | /usr/local/include/opencv2/videostab/fast_marching_inl.hpp 144 | /usr/local/include/opencv2/videostab/frame_source.hpp 145 | /usr/local/include/opencv2/videostab/global_motion.hpp 146 | /usr/local/include/opencv2/videostab/inpainting.hpp 147 | /usr/local/include/opencv2/videostab/log.hpp 148 | /usr/local/include/opencv2/videostab/motion_core.hpp 149 | /usr/local/include/opencv2/videostab/motion_stabilizing.hpp 150 | /usr/local/include/opencv2/videostab/optical_flow.hpp 151 | /usr/local/include/opencv2/videostab/outlier_rejection.hpp 152 | /usr/local/include/opencv2/videostab/ring_buffer.hpp 153 | /usr/local/include/opencv2/videostab/stabilizer.hpp 154 | /usr/local/include/opencv2/videostab/wobble_suppression.hpp 155 | -------------------------------------------------------------------------------- /build/CMakeFiles/yolov5s.dir/depend.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/allocator.h 5 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/blob.h 6 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/command.h 7 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/gpu.h 8 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/layer.h 9 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/mat.h 10 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/modelbin.h 11 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/ncnn_export.h 12 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/net.h 13 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/option.h 14 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/paramdict.h 15 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/pipeline.h 16 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/platform.h 17 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/simplestl.h 18 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: ../ncnn-20210507-ubuntu-1604-shared/include/ncnn/vulkan_header_fix.h 19 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: ../yolov5.cpp 20 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv/cxcore.h 21 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/calib3d.hpp 22 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/calib3d/calib3d_c.h 23 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core.hpp 24 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/affine.hpp 25 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/async.hpp 26 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/base.hpp 27 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/bufferpool.hpp 28 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/check.hpp 29 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/core.hpp 30 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/core_c.h 31 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/cuda.hpp 32 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/cuda.inl.hpp 33 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/cuda_types.hpp 34 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/cv_cpu_dispatch.h 35 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/cv_cpu_helper.h 36 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/cvdef.h 37 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/cvstd.hpp 38 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/cvstd.inl.hpp 39 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/fast_math.hpp 40 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/hal/interface.h 41 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/hal/msa_macros.h 42 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/mat.hpp 43 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/mat.inl.hpp 44 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/matx.hpp 45 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/neon_utils.hpp 46 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/operations.hpp 47 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/optim.hpp 48 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/ovx.hpp 49 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/persistence.hpp 50 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/ptr.inl.hpp 51 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/saturate.hpp 52 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/traits.hpp 53 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/types.hpp 54 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/types_c.h 55 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/utility.hpp 56 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/version.hpp 57 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/core/vsx_utils.hpp 58 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/dnn.hpp 59 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/dnn/dict.hpp 60 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/dnn/dnn.hpp 61 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/dnn/dnn.inl.hpp 62 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/dnn/layer.hpp 63 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/dnn/utils/inference_engine.hpp 64 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/features2d.hpp 65 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann.hpp 66 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/all_indices.h 67 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/any.h 68 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/autotuned_index.h 69 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/composite_index.h 70 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/config.h 71 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/defines.h 72 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/dist.h 73 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/dynamic_bitset.h 74 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/flann_base.hpp 75 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/general.h 76 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/ground_truth.h 77 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/heap.h 78 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/hierarchical_clustering_index.h 79 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/index_testing.h 80 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/kdtree_index.h 81 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/kdtree_single_index.h 82 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/kmeans_index.h 83 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/linear_index.h 84 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/logger.h 85 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/lsh_index.h 86 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/lsh_table.h 87 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/matrix.h 88 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/miniflann.hpp 89 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/nn_index.h 90 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/params.h 91 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/random.h 92 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/result_set.h 93 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/sampling.h 94 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/saving.h 95 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/flann/timer.h 96 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/highgui.hpp 97 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/highgui/highgui.hpp 98 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/highgui/highgui_c.h 99 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/imgcodecs.hpp 100 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/imgcodecs/imgcodecs_c.h 101 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/imgproc.hpp 102 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/imgproc/imgproc.hpp 103 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/imgproc/imgproc_c.h 104 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/imgproc/types_c.h 105 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/ml.hpp 106 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/ml/ml.inl.hpp 107 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/objdetect.hpp 108 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/objdetect/detection_based_tracker.hpp 109 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/objdetect/objdetect_c.h 110 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/opencv.hpp 111 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/opencv_modules.hpp 112 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/photo.hpp 113 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/photo/photo_c.h 114 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/shape.hpp 115 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/shape/emdL1.hpp 116 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/shape/hist_cost.hpp 117 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/shape/shape_distance.hpp 118 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/shape/shape_transformer.hpp 119 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/stitching.hpp 120 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/stitching/detail/blenders.hpp 121 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/stitching/detail/camera.hpp 122 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/stitching/detail/exposure_compensate.hpp 123 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/stitching/detail/matchers.hpp 124 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/stitching/detail/motion_estimators.hpp 125 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/stitching/detail/seam_finders.hpp 126 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/stitching/detail/util.hpp 127 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/stitching/detail/util_inl.hpp 128 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/stitching/detail/warpers.hpp 129 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/stitching/detail/warpers_inl.hpp 130 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/stitching/warpers.hpp 131 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/superres.hpp 132 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/superres/optical_flow.hpp 133 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/video.hpp 134 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/video/background_segm.hpp 135 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/video/tracking.hpp 136 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/video/tracking_c.h 137 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/videoio.hpp 138 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/videoio/videoio_c.h 139 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/videostab.hpp 140 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/videostab/deblurring.hpp 141 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/videostab/fast_marching.hpp 142 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/videostab/fast_marching_inl.hpp 143 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/videostab/frame_source.hpp 144 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/videostab/global_motion.hpp 145 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/videostab/inpainting.hpp 146 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/videostab/log.hpp 147 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/videostab/motion_core.hpp 148 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/videostab/motion_stabilizing.hpp 149 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/videostab/optical_flow.hpp 150 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/videostab/outlier_rejection.hpp 151 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/videostab/ring_buffer.hpp 152 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/videostab/stabilizer.hpp 153 | CMakeFiles/yolov5s.dir/yolov5.cpp.o: /usr/local/include/opencv2/videostab/wobble_suppression.hpp 154 | 155 | -------------------------------------------------------------------------------- /build/CMakeFiles/yolov5s.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # compile CXX with /usr/bin/c++ 5 | CXX_FLAGS = -fopenmp -std=c++11 -Wall 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/usr/local/share/OpenCV/include -I/home/kong/yolov5_prune/yolov5_ncnn/ncnn-20210507-ubuntu-1604-shared/include/ncnn -isystem /usr/local/include -isystem /usr/local/include/opencv 10 | 11 | -------------------------------------------------------------------------------- /build/CMakeFiles/yolov5s.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/c++ -fopenmp CMakeFiles/yolov5s.dir/yolov5.cpp.o -o yolov5s -L/usr/local/share/OpenCV/lib -L/home/kong/yolov5_prune/yolov5_ncnn/ncnn-20210507-ubuntu-1604-shared/lib -rdynamic -lncnn /usr/local/lib/libopencv_highgui.so.3.4.8 /usr/local/lib/libopencv_videoio.so.3.4.8 /usr/local/lib/libopencv_imgcodecs.so.3.4.8 /usr/local/lib/libopencv_imgproc.so.3.4.8 /usr/local/lib/libopencv_core.so.3.4.8 -Wl,-rpath,/usr/local/share/OpenCV/lib:/home/kong/yolov5_prune/yolov5_ncnn/ncnn-20210507-ubuntu-1604-shared/lib:/usr/local/lib 2 | -------------------------------------------------------------------------------- /build/CMakeFiles/yolov5s.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 1 2 | CMAKE_PROGRESS_2 = 2 3 | 4 | -------------------------------------------------------------------------------- /build/CMakeFiles/yolov5s.dir/yolov5.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/build/CMakeFiles/yolov5s.dir/yolov5.cpp.o -------------------------------------------------------------------------------- /build/Makefile: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # Allow only one "make -f Makefile2" at a time, but pass parallelism. 10 | .NOTPARALLEL: 11 | 12 | 13 | #============================================================================= 14 | # Special targets provided by cmake. 15 | 16 | # Disable implicit rules so canonical targets will work. 17 | .SUFFIXES: 18 | 19 | 20 | # Remove some rules from gmake that .SUFFIXES does not remove. 21 | SUFFIXES = 22 | 23 | .SUFFIXES: .hpux_make_needs_suffix_list 24 | 25 | 26 | # Suppress display of executed commands. 27 | $(VERBOSE).SILENT: 28 | 29 | 30 | # A target that is always out of date. 31 | cmake_force: 32 | 33 | .PHONY : cmake_force 34 | 35 | #============================================================================= 36 | # Set environment variables for the build. 37 | 38 | # The shell in which to execute make rules. 39 | SHELL = /bin/sh 40 | 41 | # The CMake executable. 42 | CMAKE_COMMAND = /usr/bin/cmake 43 | 44 | # The command to remove a file. 45 | RM = /usr/bin/cmake -E remove -f 46 | 47 | # Escaping for special characters. 48 | EQUALS = = 49 | 50 | # The top-level source directory on which CMake was run. 51 | CMAKE_SOURCE_DIR = /home/kong/yolov5_prune/yolov5_ncnn 52 | 53 | # The top-level build directory on which CMake was run. 54 | CMAKE_BINARY_DIR = /home/kong/yolov5_prune/yolov5_ncnn/build 55 | 56 | #============================================================================= 57 | # Targets provided globally by CMake. 58 | 59 | # Special rule for the target edit_cache 60 | edit_cache: 61 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." 62 | /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. 63 | .PHONY : edit_cache 64 | 65 | # Special rule for the target edit_cache 66 | edit_cache/fast: edit_cache 67 | 68 | .PHONY : edit_cache/fast 69 | 70 | # Special rule for the target rebuild_cache 71 | rebuild_cache: 72 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." 73 | /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 74 | .PHONY : rebuild_cache 75 | 76 | # Special rule for the target rebuild_cache 77 | rebuild_cache/fast: rebuild_cache 78 | 79 | .PHONY : rebuild_cache/fast 80 | 81 | # The main all target 82 | all: cmake_check_build_system 83 | $(CMAKE_COMMAND) -E cmake_progress_start /home/kong/yolov5_prune/yolov5_ncnn/build/CMakeFiles /home/kong/yolov5_prune/yolov5_ncnn/build/CMakeFiles/progress.marks 84 | $(MAKE) -f CMakeFiles/Makefile2 all 85 | $(CMAKE_COMMAND) -E cmake_progress_start /home/kong/yolov5_prune/yolov5_ncnn/build/CMakeFiles 0 86 | .PHONY : all 87 | 88 | # The main clean target 89 | clean: 90 | $(MAKE) -f CMakeFiles/Makefile2 clean 91 | .PHONY : clean 92 | 93 | # The main clean target 94 | clean/fast: clean 95 | 96 | .PHONY : clean/fast 97 | 98 | # Prepare targets for installation. 99 | preinstall: all 100 | $(MAKE) -f CMakeFiles/Makefile2 preinstall 101 | .PHONY : preinstall 102 | 103 | # Prepare targets for installation. 104 | preinstall/fast: 105 | $(MAKE) -f CMakeFiles/Makefile2 preinstall 106 | .PHONY : preinstall/fast 107 | 108 | # clear depends 109 | depend: 110 | $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 111 | .PHONY : depend 112 | 113 | #============================================================================= 114 | # Target rules for targets named yolov5s 115 | 116 | # Build rule for target. 117 | yolov5s: cmake_check_build_system 118 | $(MAKE) -f CMakeFiles/Makefile2 yolov5s 119 | .PHONY : yolov5s 120 | 121 | # fast build rule for target. 122 | yolov5s/fast: 123 | $(MAKE) -f CMakeFiles/yolov5s.dir/build.make CMakeFiles/yolov5s.dir/build 124 | .PHONY : yolov5s/fast 125 | 126 | yolov5.o: yolov5.cpp.o 127 | 128 | .PHONY : yolov5.o 129 | 130 | # target to build an object file 131 | yolov5.cpp.o: 132 | $(MAKE) -f CMakeFiles/yolov5s.dir/build.make CMakeFiles/yolov5s.dir/yolov5.cpp.o 133 | .PHONY : yolov5.cpp.o 134 | 135 | yolov5.i: yolov5.cpp.i 136 | 137 | .PHONY : yolov5.i 138 | 139 | # target to preprocess a source file 140 | yolov5.cpp.i: 141 | $(MAKE) -f CMakeFiles/yolov5s.dir/build.make CMakeFiles/yolov5s.dir/yolov5.cpp.i 142 | .PHONY : yolov5.cpp.i 143 | 144 | yolov5.s: yolov5.cpp.s 145 | 146 | .PHONY : yolov5.s 147 | 148 | # target to generate assembly for a file 149 | yolov5.cpp.s: 150 | $(MAKE) -f CMakeFiles/yolov5s.dir/build.make CMakeFiles/yolov5s.dir/yolov5.cpp.s 151 | .PHONY : yolov5.cpp.s 152 | 153 | # Help Target 154 | help: 155 | @echo "The following are some of the valid targets for this Makefile:" 156 | @echo "... all (the default if no target is provided)" 157 | @echo "... clean" 158 | @echo "... depend" 159 | @echo "... edit_cache" 160 | @echo "... yolov5s" 161 | @echo "... rebuild_cache" 162 | @echo "... yolov5.o" 163 | @echo "... yolov5.i" 164 | @echo "... yolov5.s" 165 | .PHONY : help 166 | 167 | 168 | 169 | #============================================================================= 170 | # Special targets to cleanup operation of make. 171 | 172 | # Special rule to run CMake to check the build system integrity. 173 | # No rule that depends on this can have commands that come from listfiles 174 | # because they might be regenerated. 175 | cmake_check_build_system: 176 | $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 177 | .PHONY : cmake_check_build_system 178 | 179 | -------------------------------------------------------------------------------- /build/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /home/kong/yolov5_prune/yolov5_ncnn 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | if(CMAKE_INSTALL_COMPONENT) 36 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") 37 | else() 38 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") 39 | endif() 40 | 41 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT 42 | "${CMAKE_INSTALL_MANIFEST_FILES}") 43 | file(WRITE "/home/kong/yolov5_prune/yolov5_ncnn/build/${CMAKE_INSTALL_MANIFEST}" 44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}") 45 | -------------------------------------------------------------------------------- /build/yolov5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/build/yolov5.jpg -------------------------------------------------------------------------------- /build/yolov5s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/build/yolov5s -------------------------------------------------------------------------------- /bus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/bus.jpg -------------------------------------------------------------------------------- /images/Screenshot from 2021-05-21 21-01-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/images/Screenshot from 2021-05-21 21-01-03.png -------------------------------------------------------------------------------- /images/Screenshot from 2021-05-21 21-01-21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/images/Screenshot from 2021-05-21 21-01-21.png -------------------------------------------------------------------------------- /images/Screenshot from 2021-05-22 19-24-44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/images/Screenshot from 2021-05-22 19-24-44.png -------------------------------------------------------------------------------- /images/Screenshot from 2021-05-22 19-26-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/images/Screenshot from 2021-05-22 19-26-13.png -------------------------------------------------------------------------------- /images/Screenshot from 2021-05-22 19-47-51.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/images/Screenshot from 2021-05-22 19-47-51.png -------------------------------------------------------------------------------- /images/Screenshot from 2021-05-22 19-49-54.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/images/Screenshot from 2021-05-22 19-49-54.png -------------------------------------------------------------------------------- /images/Screenshot from 2021-06-08 21-47-09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/images/Screenshot from 2021-06-08 21-47-09.png -------------------------------------------------------------------------------- /images/Screenshot from 2021-06-08 21-48-39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/images/Screenshot from 2021-06-08 21-48-39.png -------------------------------------------------------------------------------- /images/bus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/images/bus.jpg -------------------------------------------------------------------------------- /images/cat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/images/cat.jpg -------------------------------------------------------------------------------- /images/cat.py: -------------------------------------------------------------------------------- 1 | import os 2 | import cv2 3 | import numpy as np 4 | im1 = cv2.imread("yolov5_ncnn_fp16.jpg") 5 | im2 = cv2.imread("yolov5-int8-kl.jpg") 6 | im3 = cv2.imread("yolov5-int8-aciq.jpg") 7 | 8 | im1 = cv2.putText(im1, "NCNN FP16", (100,100), cv2.FONT_HERSHEY_PLAIN, 4, (0,255,0), 3) 9 | im2 = cv2.putText(im2, "NCNN INT8 KL", (100,100), cv2.FONT_HERSHEY_PLAIN, 4, (0,255,0), 3) 10 | im3 = cv2.putText(im3, "NCNN INT8 ACIQ", (100,100), cv2.FONT_HERSHEY_PLAIN, 4, (0,255,0), 3) 11 | im = np.hstack([im1,im2,im3]) 12 | 13 | cv2.imwrite("cat.jpg",im) 14 | -------------------------------------------------------------------------------- /images/yolov5-int8-aciq.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/images/yolov5-int8-aciq.jpg -------------------------------------------------------------------------------- /images/yolov5-int8-kl.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/images/yolov5-int8-kl.jpg -------------------------------------------------------------------------------- /images/yolov5_ncnn_fp16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/images/yolov5_ncnn_fp16.jpg -------------------------------------------------------------------------------- /layer/yolov5focus.cpp: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #include "yolov5focus.h" 16 | 17 | #include 18 | 19 | namespace ncnn { 20 | 21 | YoloV5Focus::YoloV5Focus() 22 | { 23 | one_blob_only = true; 24 | } 25 | 26 | int YoloV5Focus::forward(const ncnn::Mat& bottom_blob, ncnn::Mat& top_blob, const ncnn::Option& opt) const 27 | { 28 | int w = bottom_blob.w; 29 | int h = bottom_blob.h; 30 | int channels = bottom_blob.c; 31 | 32 | int outw = w / 2; 33 | int outh = h / 2; 34 | int outc = channels * 4; 35 | 36 | top_blob.create(outw, outh, outc, 4u, 1, opt.blob_allocator); 37 | if (top_blob.empty()) 38 | return -100; 39 | 40 | #pragma omp parallel for num_threads(opt.num_threads) 41 | for (int p = 0; p < outc; p++) 42 | { 43 | const float* ptr = bottom_blob.channel(p % channels).row((p / channels) % 2) + ((p / channels) / 2); 44 | float* outptr = top_blob.channel(p); 45 | 46 | for (int i = 0; i < outh; i++) 47 | { 48 | for (int j = 0; j < outw; j++) 49 | { 50 | *outptr = *ptr; 51 | 52 | outptr += 1; 53 | ptr += 2; 54 | } 55 | 56 | ptr += w; 57 | } 58 | } 59 | 60 | return 0; 61 | } 62 | } // namespace ncnn 63 | -------------------------------------------------------------------------------- /layer/yolov5focus.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef LAYER_YOLOV5FOCUS_H 16 | #define LAYER_YOLOV5FOCUS_H 17 | 18 | #include "layer.h" 19 | 20 | namespace ncnn { 21 | 22 | class YoloV5Focus : public Layer 23 | { 24 | public: 25 | YoloV5Focus(); 26 | 27 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 28 | }; 29 | 30 | } // namespace ncnn 31 | 32 | #endif // LAYER_YOLOV5FOCUS_H 33 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/bin/caffe2ncnn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/ncnn-20210525-ubuntu-1604-shared/bin/caffe2ncnn -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/bin/darknet2ncnn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/ncnn-20210525-ubuntu-1604-shared/bin/darknet2ncnn -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/bin/mxnet2ncnn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/ncnn-20210525-ubuntu-1604-shared/bin/mxnet2ncnn -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/bin/ncnn2int8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/ncnn-20210525-ubuntu-1604-shared/bin/ncnn2int8 -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/bin/ncnn2mem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/ncnn-20210525-ubuntu-1604-shared/bin/ncnn2mem -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/bin/ncnn2table: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/ncnn-20210525-ubuntu-1604-shared/bin/ncnn2table -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/bin/ncnnmerge: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/ncnn-20210525-ubuntu-1604-shared/bin/ncnnmerge -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/bin/ncnnoptimize: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/ncnn-20210525-ubuntu-1604-shared/bin/ncnnoptimize -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/bin/onnx2ncnn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/ncnn-20210525-ubuntu-1604-shared/bin/onnx2ncnn -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/benchmark.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_BENCHMARK_H 16 | #define NCNN_BENCHMARK_H 17 | 18 | #include "layer.h" 19 | #include "mat.h" 20 | #include "platform.h" 21 | 22 | namespace ncnn { 23 | 24 | // get now timestamp in ms 25 | NCNN_EXPORT double get_current_time(); 26 | 27 | #if NCNN_BENCHMARK 28 | 29 | NCNN_EXPORT void benchmark(const Layer* layer, double start, double end); 30 | NCNN_EXPORT void benchmark(const Layer* layer, const Mat& bottom_blob, Mat& top_blob, double start, double end); 31 | 32 | #endif // NCNN_BENCHMARK 33 | 34 | } // namespace ncnn 35 | 36 | #endif // NCNN_BENCHMARK_H 37 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/blob.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_BLOB_H 16 | #define NCNN_BLOB_H 17 | 18 | #include "mat.h" 19 | #include "platform.h" 20 | 21 | namespace ncnn { 22 | 23 | class NCNN_EXPORT Blob 24 | { 25 | public: 26 | // empty 27 | Blob(); 28 | 29 | public: 30 | #if NCNN_STRING 31 | // blob name 32 | std::string name; 33 | #endif // NCNN_STRING 34 | // layer index which produce this blob as output 35 | int producer; 36 | // layer index which need this blob as input 37 | int consumer; 38 | // shape hint 39 | Mat shape; 40 | }; 41 | 42 | } // namespace ncnn 43 | 44 | #endif // NCNN_BLOB_H 45 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/command.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_COMMAND_H 16 | #define NCNN_COMMAND_H 17 | 18 | #include "platform.h" 19 | 20 | #if NCNN_VULKAN 21 | 22 | #include "mat.h" 23 | 24 | #include 25 | 26 | namespace ncnn { 27 | 28 | class Pipeline; 29 | #if NCNN_PLATFORM_API 30 | #if __ANDROID_API__ >= 26 31 | class ImportAndroidHardwareBufferPipeline; 32 | #endif // __ANDROID_API__ >= 26 33 | #endif // NCNN_PLATFORM_API 34 | class VkComputePrivate; 35 | class NCNN_EXPORT VkCompute 36 | { 37 | public: 38 | explicit VkCompute(const VulkanDevice* vkdev); 39 | virtual ~VkCompute(); 40 | 41 | public: 42 | void record_upload(const Mat& src, VkMat& dst, const Option& opt); 43 | 44 | void record_upload(const Mat& src, VkImageMat& dst, const Option& opt); 45 | 46 | void record_download(const VkMat& src, Mat& dst, const Option& opt); 47 | 48 | void record_download(const VkImageMat& src, Mat& dst, const Option& opt); 49 | 50 | void record_buffer_to_image(const VkMat& src, VkImageMat& dst, const Option& opt); 51 | 52 | void record_image_to_buffer(const VkImageMat& src, VkMat& dst, const Option& opt); 53 | 54 | void record_clone(const Mat& src, VkMat& dst, const Option& opt); 55 | 56 | void record_clone(const Mat& src, VkImageMat& dst, const Option& opt); 57 | 58 | void record_clone(const VkMat& src, Mat& dst, const Option& opt); 59 | 60 | void record_clone(const VkImageMat& src, Mat& dst, const Option& opt); 61 | 62 | void record_clone(const VkMat& src, VkMat& dst, const Option& opt); 63 | 64 | void record_clone(const VkImageMat& src, VkImageMat& dst, const Option& opt); 65 | 66 | void record_clone(const VkMat& src, VkImageMat& dst, const Option& opt); 67 | 68 | void record_clone(const VkImageMat& src, VkMat& dst, const Option& opt); 69 | 70 | void record_pipeline(const Pipeline* pipeline, const std::vector& bindings, const std::vector& constants, const VkMat& dispatcher); 71 | 72 | void record_pipeline(const Pipeline* pipeline, const std::vector& bindings, const std::vector& constants, const VkImageMat& dispatcher); 73 | 74 | void record_pipeline(const Pipeline* pipeline, const std::vector& buffer_bindings, const std::vector& image_bindings, const std::vector& constants, const VkMat& dispatcher); 75 | void record_pipeline(const Pipeline* pipeline, const std::vector& buffer_bindings, const std::vector& image_bindings, const std::vector& constants, const VkImageMat& dispatcher); 76 | void record_pipeline(const Pipeline* pipeline, const std::vector& buffer_bindings, const std::vector& image_bindings, const std::vector& constants, const Mat& dispatcher); 77 | 78 | #if NCNN_BENCHMARK 79 | void record_write_timestamp(uint32_t query); 80 | #endif // NCNN_BENCHMARK 81 | 82 | #if NCNN_PLATFORM_API 83 | #if __ANDROID_API__ >= 26 84 | void record_import_android_hardware_buffer(const ImportAndroidHardwareBufferPipeline* pipeline, const VkImageMat& src, const VkMat& dst); 85 | 86 | void record_import_android_hardware_buffer(const ImportAndroidHardwareBufferPipeline* pipeline, const VkImageMat& src, const VkImageMat& dst); 87 | #endif // __ANDROID_API__ >= 26 88 | #endif // NCNN_PLATFORM_API 89 | 90 | int submit_and_wait(); 91 | 92 | int reset(); 93 | 94 | #if NCNN_BENCHMARK 95 | int create_query_pool(uint32_t query_count); 96 | 97 | int get_query_pool_results(uint32_t first_query, uint32_t query_count, std::vector& results); 98 | #endif // NCNN_BENCHMARK 99 | 100 | protected: 101 | const VulkanDevice* vkdev; 102 | 103 | void barrier_readwrite(const VkMat& binding); 104 | void barrier_readwrite(const VkImageMat& binding); 105 | void barrier_readonly(const VkImageMat& binding); 106 | 107 | private: 108 | VkComputePrivate* const d; 109 | }; 110 | 111 | class VkTransferPrivate; 112 | class NCNN_EXPORT VkTransfer 113 | { 114 | public: 115 | explicit VkTransfer(const VulkanDevice* vkdev); 116 | virtual ~VkTransfer(); 117 | 118 | public: 119 | void record_upload(const Mat& src, VkMat& dst, const Option& opt, bool flatten = true); 120 | 121 | void record_upload(const Mat& src, VkImageMat& dst, const Option& opt); 122 | 123 | int submit_and_wait(); 124 | 125 | protected: 126 | const VulkanDevice* vkdev; 127 | 128 | private: 129 | VkTransferPrivate* const d; 130 | }; 131 | 132 | } // namespace ncnn 133 | 134 | #endif // NCNN_VULKAN 135 | 136 | #endif // NCNN_COMMAND_H 137 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/cpu.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_CPU_H 16 | #define NCNN_CPU_H 17 | 18 | #include 19 | 20 | #if defined __ANDROID__ || defined __linux__ 21 | #include // cpu_set_t 22 | #endif 23 | 24 | #include "platform.h" 25 | 26 | namespace ncnn { 27 | 28 | class NCNN_EXPORT CpuSet 29 | { 30 | public: 31 | CpuSet(); 32 | void enable(int cpu); 33 | void disable(int cpu); 34 | void disable_all(); 35 | bool is_enabled(int cpu) const; 36 | int num_enabled() const; 37 | 38 | public: 39 | #if defined __ANDROID__ || defined __linux__ 40 | cpu_set_t cpu_set; 41 | #endif 42 | #if __APPLE__ 43 | unsigned int policy; 44 | #endif 45 | }; 46 | 47 | // test optional cpu features 48 | // neon = armv7 neon or aarch64 asimd 49 | NCNN_EXPORT int cpu_support_arm_neon(); 50 | // vfpv4 = armv7 fp16 + fma 51 | NCNN_EXPORT int cpu_support_arm_vfpv4(); 52 | // asimdhp = aarch64 asimd half precision 53 | NCNN_EXPORT int cpu_support_arm_asimdhp(); 54 | // asimddp = aarch64 asimd dot product 55 | NCNN_EXPORT int cpu_support_arm_asimddp(); 56 | 57 | // avx2 = x86_64 avx2 + fma + f16c 58 | NCNN_EXPORT int cpu_support_x86_avx2(); 59 | 60 | // v = riscv vector 61 | NCNN_EXPORT int cpu_support_riscv_v(); 62 | // zfh = riscv half-precision float 63 | NCNN_EXPORT int cpu_support_riscv_zfh(); 64 | // vlenb = riscv vector length in bytes 65 | NCNN_EXPORT int cpu_riscv_vlenb(); 66 | 67 | // cpu info 68 | NCNN_EXPORT int get_cpu_count(); 69 | NCNN_EXPORT int get_little_cpu_count(); 70 | NCNN_EXPORT int get_big_cpu_count(); 71 | 72 | // bind all threads on little clusters if powersave enabled 73 | // affects HMP arch cpu like ARM big.LITTLE 74 | // only implemented on android at the moment 75 | // switching powersave is expensive and not thread-safe 76 | // 0 = all cores enabled(default) 77 | // 1 = only little clusters enabled 78 | // 2 = only big clusters enabled 79 | // return 0 if success for setter function 80 | NCNN_EXPORT int get_cpu_powersave(); 81 | NCNN_EXPORT int set_cpu_powersave(int powersave); 82 | 83 | // convenient wrapper 84 | NCNN_EXPORT const CpuSet& get_cpu_thread_affinity_mask(int powersave); 85 | 86 | // set explicit thread affinity 87 | NCNN_EXPORT int set_cpu_thread_affinity(const CpuSet& thread_affinity_mask); 88 | 89 | // misc function wrapper for openmp routines 90 | NCNN_EXPORT int get_omp_num_threads(); 91 | NCNN_EXPORT void set_omp_num_threads(int num_threads); 92 | 93 | NCNN_EXPORT int get_omp_dynamic(); 94 | NCNN_EXPORT void set_omp_dynamic(int dynamic); 95 | 96 | NCNN_EXPORT int get_omp_thread_num(); 97 | 98 | NCNN_EXPORT int get_kmp_blocktime(); 99 | NCNN_EXPORT void set_kmp_blocktime(int time_ms); 100 | 101 | // need to flush denormals on Intel Chipset. 102 | // Other architectures such as ARM can be added as needed. 103 | // 0 = DAZ OFF, FTZ OFF 104 | // 1 = DAZ ON , FTZ OFF 105 | // 2 = DAZ OFF, FTZ ON 106 | // 3 = DAZ ON, FTZ ON 107 | NCNN_EXPORT int get_flush_denormals(); 108 | NCNN_EXPORT int set_flush_denormals(int flush_denormals); 109 | 110 | } // namespace ncnn 111 | 112 | #endif // NCNN_CPU_H 113 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/datareader.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_DATAREADER_H 16 | #define NCNN_DATAREADER_H 17 | 18 | #include "platform.h" 19 | #if NCNN_STDIO 20 | #include 21 | #endif 22 | 23 | #if NCNN_PLATFORM_API 24 | #if __ANDROID_API__ >= 9 25 | #include 26 | #endif 27 | #endif // NCNN_PLATFORM_API 28 | 29 | namespace ncnn { 30 | 31 | // data read wrapper 32 | class NCNN_EXPORT DataReader 33 | { 34 | public: 35 | DataReader(); 36 | virtual ~DataReader(); 37 | 38 | #if NCNN_STRING 39 | // parse plain param text 40 | // return 1 if scan success 41 | virtual int scan(const char* format, void* p) const; 42 | #endif // NCNN_STRING 43 | 44 | // read binary param and model data 45 | // return bytes read 46 | virtual size_t read(void* buf, size_t size) const; 47 | }; 48 | 49 | #if NCNN_STDIO 50 | class DataReaderFromStdioPrivate; 51 | class NCNN_EXPORT DataReaderFromStdio : public DataReader 52 | { 53 | public: 54 | explicit DataReaderFromStdio(FILE* fp); 55 | virtual ~DataReaderFromStdio(); 56 | 57 | #if NCNN_STRING 58 | virtual int scan(const char* format, void* p) const; 59 | #endif // NCNN_STRING 60 | virtual size_t read(void* buf, size_t size) const; 61 | 62 | private: 63 | DataReaderFromStdio(const DataReaderFromStdio&); 64 | DataReaderFromStdio& operator=(const DataReaderFromStdio&); 65 | 66 | private: 67 | DataReaderFromStdioPrivate* const d; 68 | }; 69 | #endif // NCNN_STDIO 70 | 71 | class DataReaderFromMemoryPrivate; 72 | class NCNN_EXPORT DataReaderFromMemory : public DataReader 73 | { 74 | public: 75 | explicit DataReaderFromMemory(const unsigned char*& mem); 76 | virtual ~DataReaderFromMemory(); 77 | 78 | #if NCNN_STRING 79 | virtual int scan(const char* format, void* p) const; 80 | #endif // NCNN_STRING 81 | virtual size_t read(void* buf, size_t size) const; 82 | 83 | private: 84 | DataReaderFromMemory(const DataReaderFromMemory&); 85 | DataReaderFromMemory& operator=(const DataReaderFromMemory&); 86 | 87 | private: 88 | DataReaderFromMemoryPrivate* const d; 89 | }; 90 | 91 | #if NCNN_PLATFORM_API 92 | #if __ANDROID_API__ >= 9 93 | class DataReaderFromAndroidAssetPrivate; 94 | class NCNN_EXPORT DataReaderFromAndroidAsset : public DataReader 95 | { 96 | public: 97 | explicit DataReaderFromAndroidAsset(AAsset* asset); 98 | virtual ~DataReaderFromAndroidAsset(); 99 | 100 | #if NCNN_STRING 101 | virtual int scan(const char* format, void* p) const; 102 | #endif // NCNN_STRING 103 | virtual size_t read(void* buf, size_t size) const; 104 | 105 | private: 106 | DataReaderFromAndroidAsset(const DataReaderFromAndroidAsset&); 107 | DataReaderFromAndroidAsset& operator=(const DataReaderFromAndroidAsset&); 108 | 109 | private: 110 | DataReaderFromAndroidAssetPrivate* const d; 111 | }; 112 | #endif // __ANDROID_API__ >= 9 113 | #endif // NCNN_PLATFORM_API 114 | 115 | } // namespace ncnn 116 | 117 | #endif // NCNN_DATAREADER_H 118 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/layer.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_LAYER_H 16 | #define NCNN_LAYER_H 17 | 18 | #include "mat.h" 19 | #include "modelbin.h" 20 | #include "option.h" 21 | #include "paramdict.h" 22 | #include "platform.h" 23 | 24 | #include 25 | 26 | #if NCNN_VULKAN 27 | #include "command.h" 28 | #include "pipeline.h" 29 | 30 | #include 31 | #endif // NCNN_VULKAN 32 | 33 | namespace ncnn { 34 | 35 | class NCNN_EXPORT Layer 36 | { 37 | public: 38 | // empty 39 | Layer(); 40 | // virtual destructor 41 | virtual ~Layer(); 42 | 43 | // load layer specific parameter from parsed dict 44 | // return 0 if success 45 | virtual int load_param(const ParamDict& pd); 46 | 47 | // load layer specific weight data from model binary 48 | // return 0 if success 49 | virtual int load_model(const ModelBin& mb); 50 | 51 | // layer implementation specific setup 52 | // return 0 if success 53 | virtual int create_pipeline(const Option& opt); 54 | 55 | // layer implementation specific clean 56 | // return 0 if success 57 | virtual int destroy_pipeline(const Option& opt); 58 | 59 | public: 60 | // one input and one output blob 61 | bool one_blob_only; 62 | 63 | // support inplace inference 64 | bool support_inplace; 65 | 66 | // support vulkan compute 67 | bool support_vulkan; 68 | 69 | // accept input blob with packed storage 70 | bool support_packing; 71 | 72 | // accept bf16 73 | bool support_bf16_storage; 74 | 75 | // accept fp16 76 | bool support_fp16_storage; 77 | 78 | // accept int8 79 | bool support_int8_storage; 80 | 81 | // shader image storage 82 | bool support_image_storage; 83 | 84 | // shader tensor storage 85 | bool support_tensor_storage; 86 | 87 | // TODO drop these fields 88 | bool support_weight_fp16_storage; 89 | 90 | bool support_reserved_0; 91 | bool support_reserved_1; 92 | bool support_reserved_2; 93 | bool support_reserved_3; 94 | bool support_reserved_4; 95 | bool support_reserved_5; 96 | bool support_reserved_6; 97 | bool support_reserved_7; 98 | bool support_reserved_8; 99 | bool support_reserved_9; 100 | bool support_reserved_10; 101 | bool support_reserved_11; 102 | bool support_reserved_12; 103 | bool support_reserved_13; 104 | 105 | public: 106 | // implement inference 107 | // return 0 if success 108 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; 109 | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; 110 | 111 | // implement inplace inference 112 | // return 0 if success 113 | virtual int forward_inplace(std::vector& bottom_top_blobs, const Option& opt) const; 114 | virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; 115 | 116 | #if NCNN_VULKAN 117 | public: 118 | // upload weight blob from host to device 119 | virtual int upload_model(VkTransfer& cmd, const Option& opt); 120 | 121 | public: 122 | // implement inference 123 | // return 0 if success 124 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, VkCompute& cmd, const Option& opt) const; 125 | virtual int forward(const VkMat& bottom_blob, VkMat& top_blob, VkCompute& cmd, const Option& opt) const; 126 | 127 | // implement inference 128 | // return 0 if success 129 | virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, VkCompute& cmd, const Option& opt) const; 130 | virtual int forward(const VkImageMat& bottom_blob, VkImageMat& top_blob, VkCompute& cmd, const Option& opt) const; 131 | 132 | // implement inplace inference 133 | // return 0 if success 134 | virtual int forward_inplace(std::vector& bottom_top_blobs, VkCompute& cmd, const Option& opt) const; 135 | virtual int forward_inplace(VkMat& bottom_top_blob, VkCompute& cmd, const Option& opt) const; 136 | 137 | // implement inplace inference 138 | // return 0 if success 139 | virtual int forward_inplace(std::vector& bottom_top_blobs, VkCompute& cmd, const Option& opt) const; 140 | virtual int forward_inplace(VkImageMat& bottom_top_blob, VkCompute& cmd, const Option& opt) const; 141 | 142 | public: 143 | // assigned immediately after creating this layer 144 | const VulkanDevice* vkdev; 145 | #endif // NCNN_VULKAN 146 | 147 | public: 148 | // custom user data 149 | void* userdata; 150 | // layer type index 151 | int typeindex; 152 | #if NCNN_STRING 153 | // layer type name 154 | std::string type; 155 | // layer name 156 | std::string name; 157 | #endif // NCNN_STRING 158 | // blob index which this layer needs as input 159 | std::vector bottoms; 160 | // blob index which this layer produces as output 161 | std::vector tops; 162 | // shape hint 163 | std::vector bottom_shapes; 164 | std::vector top_shapes; 165 | }; 166 | 167 | // layer factory function 168 | typedef Layer* (*layer_creator_func)(void*); 169 | typedef void (*layer_destroyer_func)(Layer*, void*); 170 | 171 | struct layer_registry_entry 172 | { 173 | #if NCNN_STRING 174 | // layer type name 175 | const char* name; 176 | #endif // NCNN_STRING 177 | // layer factory entry 178 | layer_creator_func creator; 179 | }; 180 | 181 | struct custom_layer_registry_entry 182 | { 183 | #if NCNN_STRING 184 | // layer type name 185 | const char* name; 186 | #endif // NCNN_STRING 187 | // layer factory entry 188 | layer_creator_func creator; 189 | layer_destroyer_func destroyer; 190 | void* userdata; 191 | }; 192 | 193 | #if NCNN_STRING 194 | // get layer type from type name 195 | NCNN_EXPORT int layer_to_index(const char* type); 196 | // create layer from type name 197 | NCNN_EXPORT Layer* create_layer(const char* type); 198 | #endif // NCNN_STRING 199 | // create layer from layer type 200 | NCNN_EXPORT Layer* create_layer(int index); 201 | 202 | #define DEFINE_LAYER_CREATOR(name) \ 203 | ::ncnn::Layer* name##_layer_creator(void* /*userdata*/) \ 204 | { \ 205 | return new name; \ 206 | } 207 | 208 | #define DEFINE_LAYER_DESTROYER(name) \ 209 | void name##_layer_destroyer(::ncnn::Layer* layer, void* /*userdata*/) \ 210 | { \ 211 | delete layer; \ 212 | } 213 | 214 | } // namespace ncnn 215 | 216 | #endif // NCNN_LAYER_H 217 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/layer_shader_type.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_LAYER_SHADER_TYPE_H 16 | #define NCNN_LAYER_SHADER_TYPE_H 17 | 18 | namespace ncnn { 19 | 20 | namespace LayerShaderType { 21 | enum LayerShaderType 22 | { 23 | #include "layer_shader_type_enum.h" 24 | }; 25 | } // namespace LayerShaderType 26 | 27 | } // namespace ncnn 28 | 29 | #endif // NCNN_LAYER_SHADER_TYPE_H 30 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/layer_shader_type_enum.h: -------------------------------------------------------------------------------- 1 | // Layer Shader Enum header 2 | // 3 | // This file is auto-generated by cmake, don't edit it. 4 | 5 | absval = 0, 6 | absval_pack4 = 1, 7 | absval_pack8 = 2, 8 | batchnorm = 3, 9 | batchnorm_pack4 = 4, 10 | batchnorm_pack8 = 5, 11 | concat = 6, 12 | concat_pack4 = 7, 13 | concat_pack4to1 = 8, 14 | concat_pack8 = 9, 15 | concat_pack8to1 = 10, 16 | concat_pack8to4 = 11, 17 | convolution = 12, 18 | convolution_1x1s1d1 = 13, 19 | convolution_pack1to4 = 14, 20 | convolution_pack1to8 = 15, 21 | convolution_pack4 = 16, 22 | convolution_pack4_1x1s1d1 = 17, 23 | convolution_pack4_3x3s1d1_winograd23_gemm = 18, 24 | convolution_pack4_3x3s1d1_winograd23_transform_input = 19, 25 | convolution_pack4_3x3s1d1_winograd23_transform_output = 20, 26 | convolution_pack4to1 = 21, 27 | convolution_pack4to8 = 22, 28 | convolution_pack8 = 23, 29 | convolution_pack8_1x1s1d1 = 24, 30 | convolution_pack8_3x3s1d1_winograd23_gemm = 25, 31 | convolution_pack8_3x3s1d1_winograd23_transform_input = 26, 32 | convolution_pack8_3x3s1d1_winograd23_transform_output = 27, 33 | convolution_pack8to1 = 28, 34 | convolution_pack8to4 = 29, 35 | crop = 30, 36 | crop_pack1to4 = 31, 37 | crop_pack1to8 = 32, 38 | crop_pack4 = 33, 39 | crop_pack4to1 = 34, 40 | crop_pack4to8 = 35, 41 | crop_pack8 = 36, 42 | crop_pack8to1 = 37, 43 | crop_pack8to4 = 38, 44 | deconvolution = 39, 45 | deconvolution_pack1to4 = 40, 46 | deconvolution_pack1to8 = 41, 47 | deconvolution_pack4 = 42, 48 | deconvolution_pack4to1 = 43, 49 | deconvolution_pack4to8 = 44, 50 | deconvolution_pack8 = 45, 51 | deconvolution_pack8to1 = 46, 52 | deconvolution_pack8to4 = 47, 53 | dropout = 48, 54 | dropout_pack4 = 49, 55 | dropout_pack8 = 50, 56 | eltwise = 51, 57 | eltwise_pack4 = 52, 58 | eltwise_pack8 = 53, 59 | flatten = 54, 60 | flatten_pack1to4 = 55, 61 | flatten_pack1to8 = 56, 62 | flatten_pack4 = 57, 63 | flatten_pack4to8 = 58, 64 | flatten_pack8 = 59, 65 | innerproduct = 60, 66 | innerproduct_gemm = 61, 67 | innerproduct_gemm_wp1to4 = 62, 68 | innerproduct_gemm_wp1to8 = 63, 69 | innerproduct_gemm_wp4 = 64, 70 | innerproduct_gemm_wp4to1 = 65, 71 | innerproduct_gemm_wp4to8 = 66, 72 | innerproduct_gemm_wp8 = 67, 73 | innerproduct_gemm_wp8to1 = 68, 74 | innerproduct_gemm_wp8to4 = 69, 75 | innerproduct_pack1to4 = 70, 76 | innerproduct_pack1to8 = 71, 77 | innerproduct_pack4 = 72, 78 | innerproduct_pack4to1 = 73, 79 | innerproduct_pack4to8 = 74, 80 | innerproduct_pack8 = 75, 81 | innerproduct_pack8to1 = 76, 82 | innerproduct_pack8to4 = 77, 83 | lrn_norm = 78, 84 | lrn_norm_across_channel_pack4 = 79, 85 | lrn_norm_across_channel_pack8 = 80, 86 | lrn_norm_within_channel_pack4 = 81, 87 | lrn_norm_within_channel_pack8 = 82, 88 | lrn_square_pad = 83, 89 | lrn_square_pad_across_channel_pack4 = 84, 90 | lrn_square_pad_across_channel_pack8 = 85, 91 | lrn_square_pad_within_channel_pack4 = 86, 92 | lrn_square_pad_within_channel_pack8 = 87, 93 | pooling = 88, 94 | pooling_adaptive = 89, 95 | pooling_adaptive_pack4 = 90, 96 | pooling_adaptive_pack8 = 91, 97 | pooling_global = 92, 98 | pooling_global_pack4 = 93, 99 | pooling_global_pack8 = 94, 100 | pooling_pack4 = 95, 101 | pooling_pack8 = 96, 102 | prelu = 97, 103 | prelu_pack4 = 98, 104 | prelu_pack8 = 99, 105 | relu = 100, 106 | relu_pack4 = 101, 107 | relu_pack8 = 102, 108 | reshape = 103, 109 | reshape_pack1to4 = 104, 110 | reshape_pack1to8 = 105, 111 | reshape_pack4 = 106, 112 | reshape_pack4to1 = 107, 113 | reshape_pack4to8 = 108, 114 | reshape_pack8 = 109, 115 | reshape_pack8to1 = 110, 116 | reshape_pack8to4 = 111, 117 | scale = 112, 118 | scale_pack4 = 113, 119 | scale_pack8 = 114, 120 | sigmoid = 115, 121 | sigmoid_pack4 = 116, 122 | sigmoid_pack8 = 117, 123 | slice = 118, 124 | slice_pack1to4 = 119, 125 | slice_pack1to8 = 120, 126 | slice_pack4 = 121, 127 | slice_pack4to8 = 122, 128 | slice_pack8 = 123, 129 | softmax_div_sum = 124, 130 | softmax_div_sum_pack4 = 125, 131 | softmax_div_sum_pack8 = 126, 132 | softmax_exp_sub_max = 127, 133 | softmax_exp_sub_max_pack4 = 128, 134 | softmax_exp_sub_max_pack8 = 129, 135 | softmax_reduce_max = 130, 136 | softmax_reduce_max_pack4 = 131, 137 | softmax_reduce_max_pack8 = 132, 138 | softmax_reduce_sum = 133, 139 | softmax_reduce_sum_pack4 = 134, 140 | softmax_reduce_sum_pack8 = 135, 141 | tanh = 136, 142 | tanh_pack4 = 137, 143 | tanh_pack8 = 138, 144 | binaryop = 139, 145 | binaryop_broadcast = 140, 146 | binaryop_broadcast_a1_pack4 = 141, 147 | binaryop_broadcast_a1_pack8 = 142, 148 | binaryop_broadcast_b1_pack4 = 143, 149 | binaryop_broadcast_b1_pack8 = 144, 150 | binaryop_broadcast_pack4 = 145, 151 | binaryop_broadcast_pack8 = 146, 152 | binaryop_pack4 = 147, 153 | binaryop_pack8 = 148, 154 | unaryop = 149, 155 | unaryop_pack4 = 150, 156 | unaryop_pack8 = 151, 157 | convolutiondepthwise = 152, 158 | convolutiondepthwise_group = 153, 159 | convolutiondepthwise_group_pack1to4 = 154, 160 | convolutiondepthwise_group_pack1to8 = 155, 161 | convolutiondepthwise_group_pack4 = 156, 162 | convolutiondepthwise_group_pack4to1 = 157, 163 | convolutiondepthwise_group_pack4to8 = 158, 164 | convolutiondepthwise_group_pack8 = 159, 165 | convolutiondepthwise_group_pack8to1 = 160, 166 | convolutiondepthwise_group_pack8to4 = 161, 167 | convolutiondepthwise_pack4 = 162, 168 | convolutiondepthwise_pack8 = 163, 169 | padding = 164, 170 | padding_pack1to4 = 165, 171 | padding_pack1to8 = 166, 172 | padding_pack4 = 167, 173 | padding_pack4to1 = 168, 174 | padding_pack4to8 = 169, 175 | padding_pack8 = 170, 176 | padding_pack8to1 = 171, 177 | padding_pack8to4 = 172, 178 | normalize_coeffs = 173, 179 | normalize_coeffs_pack4 = 174, 180 | normalize_coeffs_pack8 = 175, 181 | normalize_norm = 176, 182 | normalize_norm_pack4 = 177, 183 | normalize_norm_pack8 = 178, 184 | normalize_reduce_sum4_fp16_to_fp32 = 179, 185 | normalize_reduce_sum4_fp16_to_fp32_pack4 = 180, 186 | normalize_reduce_sum4_fp16_to_fp32_pack8 = 181, 187 | normalize_reduce_sum4_fp32 = 182, 188 | normalize_reduce_sum4_fp32_pack4 = 183, 189 | normalize_reduce_sum4_fp32_pack8 = 184, 190 | permute = 185, 191 | permute_pack1to4 = 186, 192 | permute_pack1to8 = 187, 193 | permute_pack4 = 188, 194 | permute_pack4to1 = 189, 195 | permute_pack4to8 = 190, 196 | permute_pack8 = 191, 197 | permute_pack8to1 = 192, 198 | permute_pack8to4 = 193, 199 | priorbox = 194, 200 | priorbox_mxnet = 195, 201 | interp = 196, 202 | interp_bicubic = 197, 203 | interp_bicubic_coeffs = 198, 204 | interp_bicubic_pack4 = 199, 205 | interp_bicubic_pack8 = 200, 206 | interp_pack4 = 201, 207 | interp_pack8 = 202, 208 | deconvolutiondepthwise = 203, 209 | deconvolutiondepthwise_group = 204, 210 | deconvolutiondepthwise_group_pack1to4 = 205, 211 | deconvolutiondepthwise_group_pack1to8 = 206, 212 | deconvolutiondepthwise_group_pack4 = 207, 213 | deconvolutiondepthwise_group_pack4to1 = 208, 214 | deconvolutiondepthwise_group_pack4to8 = 209, 215 | deconvolutiondepthwise_group_pack8 = 210, 216 | deconvolutiondepthwise_group_pack8to1 = 211, 217 | deconvolutiondepthwise_group_pack8to4 = 212, 218 | deconvolutiondepthwise_pack4 = 213, 219 | deconvolutiondepthwise_pack8 = 214, 220 | shufflechannel = 215, 221 | shufflechannel_pack4 = 216, 222 | shufflechannel_pack8 = 217, 223 | instancenorm_coeffs = 218, 224 | instancenorm_coeffs_pack4 = 219, 225 | instancenorm_coeffs_pack8 = 220, 226 | instancenorm_norm = 221, 227 | instancenorm_norm_pack4 = 222, 228 | instancenorm_norm_pack8 = 223, 229 | instancenorm_reduce_mean = 224, 230 | instancenorm_reduce_mean_pack4 = 225, 231 | instancenorm_reduce_mean_pack8 = 226, 232 | instancenorm_reduce_sum4_fp16_to_fp32 = 227, 233 | instancenorm_reduce_sum4_fp16_to_fp32_pack4 = 228, 234 | instancenorm_reduce_sum4_fp16_to_fp32_pack8 = 229, 235 | instancenorm_reduce_sum4_fp32 = 230, 236 | instancenorm_reduce_sum4_fp32_pack4 = 231, 237 | instancenorm_reduce_sum4_fp32_pack8 = 232, 238 | instancenorm_sub_mean_square = 233, 239 | instancenorm_sub_mean_square_pack4 = 234, 240 | instancenorm_sub_mean_square_pack8 = 235, 241 | clip = 236, 242 | clip_pack4 = 237, 243 | clip_pack8 = 238, 244 | reorg = 239, 245 | reorg_pack1to4 = 240, 246 | reorg_pack1to8 = 241, 247 | reorg_pack4 = 242, 248 | reorg_pack4to8 = 243, 249 | reorg_pack8 = 244, 250 | packing = 245, 251 | packing_fp16_to_fp32 = 246, 252 | packing_fp32_to_fp16 = 247, 253 | packing_pack1to4 = 248, 254 | packing_pack1to4_fp16_to_fp32 = 249, 255 | packing_pack1to4_fp32_to_fp16 = 250, 256 | packing_pack1to8 = 251, 257 | packing_pack1to8_fp16_to_fp32 = 252, 258 | packing_pack1to8_fp32_to_fp16 = 253, 259 | packing_pack4 = 254, 260 | packing_pack4_fp16_to_fp32 = 255, 261 | packing_pack4_fp32_to_fp16 = 256, 262 | packing_pack4to1 = 257, 263 | packing_pack4to1_fp16_to_fp32 = 258, 264 | packing_pack4to1_fp32_to_fp16 = 259, 265 | packing_pack4to8 = 260, 266 | packing_pack4to8_fp16_to_fp32 = 261, 267 | packing_pack4to8_fp32_to_fp16 = 262, 268 | packing_pack8 = 263, 269 | packing_pack8_fp16_to_fp32 = 264, 270 | packing_pack8_fp32_to_fp16 = 265, 271 | packing_pack8to1 = 266, 272 | packing_pack8to1_fp16_to_fp32 = 267, 273 | packing_pack8to1_fp32_to_fp16 = 268, 274 | packing_pack8to4 = 269, 275 | packing_pack8to4_fp16_to_fp32 = 270, 276 | packing_pack8to4_fp32_to_fp16 = 271, 277 | cast_fp16_to_fp32 = 272, 278 | cast_fp16_to_fp32_pack4 = 273, 279 | cast_fp16_to_fp32_pack8 = 274, 280 | cast_fp32_to_fp16 = 275, 281 | cast_fp32_to_fp16_pack4 = 276, 282 | cast_fp32_to_fp16_pack8 = 277, 283 | hardsigmoid = 278, 284 | hardsigmoid_pack4 = 279, 285 | hardsigmoid_pack8 = 280, 286 | hardswish = 281, 287 | hardswish_pack4 = 282, 288 | hardswish_pack8 = 283, 289 | pixelshuffle = 284, 290 | pixelshuffle_pack4 = 285, 291 | pixelshuffle_pack4to1 = 286, 292 | pixelshuffle_pack8 = 287, 293 | pixelshuffle_pack8to1 = 288, 294 | pixelshuffle_pack8to4 = 289, 295 | deepcopy = 290, 296 | deepcopy_pack4 = 291, 297 | deepcopy_pack8 = 292, 298 | mish = 293, 299 | mish_pack4 = 294, 300 | mish_pack8 = 295, 301 | swish = 296, 302 | swish_pack4 = 297, 303 | swish_pack8 = 298, 304 | convert_ycbcr = 299, 305 | 306 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/layer_type.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_LAYER_TYPE_H 16 | #define NCNN_LAYER_TYPE_H 17 | 18 | namespace ncnn { 19 | 20 | namespace LayerType { 21 | enum LayerType 22 | { 23 | #include "layer_type_enum.h" 24 | CustomBit = (1 << 8), 25 | }; 26 | } // namespace LayerType 27 | 28 | } // namespace ncnn 29 | 30 | #endif // NCNN_LAYER_TYPE_H 31 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/layer_type_enum.h: -------------------------------------------------------------------------------- 1 | // Layer Type Enum header 2 | // 3 | // This file is auto-generated by cmake, don't edit it. 4 | 5 | AbsVal = 0, 6 | ArgMax = 1, 7 | BatchNorm = 2, 8 | Bias = 3, 9 | BNLL = 4, 10 | Concat = 5, 11 | Convolution = 6, 12 | Crop = 7, 13 | Deconvolution = 8, 14 | Dropout = 9, 15 | Eltwise = 10, 16 | ELU = 11, 17 | Embed = 12, 18 | Exp = 13, 19 | Flatten = 14, 20 | InnerProduct = 15, 21 | Input = 16, 22 | Log = 17, 23 | LRN = 18, 24 | MemoryData = 19, 25 | MVN = 20, 26 | Pooling = 21, 27 | Power = 22, 28 | PReLU = 23, 29 | Proposal = 24, 30 | Reduction = 25, 31 | ReLU = 26, 32 | Reshape = 27, 33 | ROIPooling = 28, 34 | Scale = 29, 35 | Sigmoid = 30, 36 | Slice = 31, 37 | Softmax = 32, 38 | Split = 33, 39 | SPP = 34, 40 | TanH = 35, 41 | Threshold = 36, 42 | Tile = 37, 43 | RNN = 38, 44 | LSTM = 39, 45 | BinaryOp = 40, 46 | UnaryOp = 41, 47 | ConvolutionDepthWise = 42, 48 | Padding = 43, 49 | Squeeze = 44, 50 | ExpandDims = 45, 51 | Normalize = 46, 52 | Permute = 47, 53 | PriorBox = 48, 54 | DetectionOutput = 49, 55 | Interp = 50, 56 | DeconvolutionDepthWise = 51, 57 | ShuffleChannel = 52, 58 | InstanceNorm = 53, 59 | Clip = 54, 60 | Reorg = 55, 61 | YoloDetectionOutput = 56, 62 | Quantize = 57, 63 | Dequantize = 58, 64 | Yolov3DetectionOutput = 59, 65 | PSROIPooling = 60, 66 | ROIAlign = 61, 67 | Packing = 62, 68 | Requantize = 63, 69 | Cast = 64, 70 | HardSigmoid = 65, 71 | SELU = 66, 72 | HardSwish = 67, 73 | Noop = 68, 74 | PixelShuffle = 69, 75 | DeepCopy = 70, 76 | Mish = 71, 77 | StatisticsPooling = 72, 78 | Swish = 73, 79 | Gemm = 74, 80 | GroupNorm = 75, 81 | LayerNorm = 76, 82 | Softplus = 77, 83 | GRU = 78, 84 | MultiHeadAttention = 79, 85 | GELU = 80, 86 | 87 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/modelbin.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_MODELBIN_H 16 | #define NCNN_MODELBIN_H 17 | 18 | #include "mat.h" 19 | 20 | namespace ncnn { 21 | 22 | class DataReader; 23 | class NCNN_EXPORT ModelBin 24 | { 25 | public: 26 | ModelBin(); 27 | virtual ~ModelBin(); 28 | // element type 29 | // 0 = auto 30 | // 1 = float32 31 | // 2 = float16 32 | // 3 = int8 33 | // load vec 34 | virtual Mat load(int w, int type) const = 0; 35 | // load image 36 | virtual Mat load(int w, int h, int type) const; 37 | // load dim 38 | virtual Mat load(int w, int h, int c, int type) const; 39 | }; 40 | 41 | class ModelBinFromDataReaderPrivate; 42 | class NCNN_EXPORT ModelBinFromDataReader : public ModelBin 43 | { 44 | public: 45 | explicit ModelBinFromDataReader(const DataReader& dr); 46 | virtual ~ModelBinFromDataReader(); 47 | 48 | virtual Mat load(int w, int type) const; 49 | 50 | private: 51 | ModelBinFromDataReader(const ModelBinFromDataReader&); 52 | ModelBinFromDataReader& operator=(const ModelBinFromDataReader&); 53 | 54 | private: 55 | ModelBinFromDataReaderPrivate* const d; 56 | }; 57 | 58 | class ModelBinFromMatArrayPrivate; 59 | class NCNN_EXPORT ModelBinFromMatArray : public ModelBin 60 | { 61 | public: 62 | // construct from weight blob array 63 | explicit ModelBinFromMatArray(const Mat* weights); 64 | virtual ~ModelBinFromMatArray(); 65 | 66 | virtual Mat load(int w, int type) const; 67 | 68 | private: 69 | ModelBinFromMatArray(const ModelBinFromMatArray&); 70 | ModelBinFromMatArray& operator=(const ModelBinFromMatArray&); 71 | 72 | private: 73 | ModelBinFromMatArrayPrivate* const d; 74 | }; 75 | 76 | } // namespace ncnn 77 | 78 | #endif // NCNN_MODELBIN_H 79 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/ncnn_export.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef NCNN_EXPORT_H 3 | #define NCNN_EXPORT_H 4 | 5 | #ifdef NCNN_STATIC_DEFINE 6 | # define NCNN_EXPORT 7 | # define NCNN_NO_EXPORT 8 | #else 9 | # ifndef NCNN_EXPORT 10 | # ifdef ncnn_EXPORTS 11 | /* We are building this library */ 12 | # define NCNN_EXPORT __attribute__((visibility("default"))) 13 | # else 14 | /* We are using this library */ 15 | # define NCNN_EXPORT __attribute__((visibility("default"))) 16 | # endif 17 | # endif 18 | 19 | # ifndef NCNN_NO_EXPORT 20 | # define NCNN_NO_EXPORT __attribute__((visibility("hidden"))) 21 | # endif 22 | #endif 23 | 24 | #ifndef NCNN_DEPRECATED 25 | # define NCNN_DEPRECATED __attribute__ ((__deprecated__)) 26 | #endif 27 | 28 | #ifndef NCNN_DEPRECATED_EXPORT 29 | # define NCNN_DEPRECATED_EXPORT NCNN_EXPORT NCNN_DEPRECATED 30 | #endif 31 | 32 | #ifndef NCNN_DEPRECATED_NO_EXPORT 33 | # define NCNN_DEPRECATED_NO_EXPORT NCNN_NO_EXPORT NCNN_DEPRECATED 34 | #endif 35 | 36 | #if 0 /* DEFINE_NO_DEPRECATED */ 37 | # ifndef NCNN_NO_DEPRECATED 38 | # define NCNN_NO_DEPRECATED 39 | # endif 40 | #endif 41 | 42 | #endif /* NCNN_EXPORT_H */ 43 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/net.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_NET_H 16 | #define NCNN_NET_H 17 | 18 | #include "blob.h" 19 | #include "layer.h" 20 | #include "mat.h" 21 | #include "option.h" 22 | #include "platform.h" 23 | 24 | #if NCNN_PLATFORM_API 25 | #if __ANDROID_API__ >= 9 26 | #include 27 | #endif // __ANDROID_API__ >= 9 28 | #endif // NCNN_PLATFORM_API 29 | 30 | namespace ncnn { 31 | 32 | #if NCNN_VULKAN 33 | class VkCompute; 34 | #endif // NCNN_VULKAN 35 | class DataReader; 36 | class Extractor; 37 | class NetPrivate; 38 | class NCNN_EXPORT Net 39 | { 40 | public: 41 | // empty init 42 | Net(); 43 | // clear and destroy 44 | virtual ~Net(); 45 | 46 | public: 47 | // option can be changed before loading 48 | Option opt; 49 | 50 | #if NCNN_VULKAN 51 | // set gpu device by index 52 | void set_vulkan_device(int device_index); 53 | 54 | // set gpu device by device handle, no owner transfer 55 | void set_vulkan_device(const VulkanDevice* vkdev); 56 | 57 | const VulkanDevice* vulkan_device() const; 58 | #endif // NCNN_VULKAN 59 | 60 | #if NCNN_STRING 61 | // register custom layer by layer type name 62 | // return 0 if success 63 | int register_custom_layer(const char* type, layer_creator_func creator, layer_destroyer_func destroyer = 0, void* userdata = 0); 64 | #endif // NCNN_STRING 65 | // register custom layer by layer type 66 | // return 0 if success 67 | int register_custom_layer(int index, layer_creator_func creator, layer_destroyer_func destroyer = 0, void* userdata = 0); 68 | 69 | #if NCNN_STRING 70 | int load_param(const DataReader& dr); 71 | #endif // NCNN_STRING 72 | 73 | int load_param_bin(const DataReader& dr); 74 | 75 | int load_model(const DataReader& dr); 76 | 77 | #if NCNN_STDIO 78 | #if NCNN_STRING 79 | // load network structure from plain param file 80 | // return 0 if success 81 | int load_param(FILE* fp); 82 | int load_param(const char* protopath); 83 | int load_param_mem(const char* mem); 84 | #endif // NCNN_STRING 85 | // load network structure from binary param file 86 | // return 0 if success 87 | int load_param_bin(FILE* fp); 88 | int load_param_bin(const char* protopath); 89 | 90 | // load network weight data from model file 91 | // return 0 if success 92 | int load_model(FILE* fp); 93 | int load_model(const char* modelpath); 94 | #endif // NCNN_STDIO 95 | 96 | // load network structure from external memory 97 | // memory pointer must be 32-bit aligned 98 | // return bytes consumed 99 | int load_param(const unsigned char* mem); 100 | 101 | // reference network weight data from external memory 102 | // weight data is not copied but referenced 103 | // so external memory should be retained when used 104 | // memory pointer must be 32-bit aligned 105 | // return bytes consumed 106 | int load_model(const unsigned char* mem); 107 | 108 | #if NCNN_PLATFORM_API 109 | #if __ANDROID_API__ >= 9 110 | #if NCNN_STRING 111 | // convenient load network structure from android asset plain param file 112 | int load_param(AAsset* asset); 113 | int load_param(AAssetManager* mgr, const char* assetpath); 114 | #endif // NCNN_STRING 115 | // convenient load network structure from android asset binary param file 116 | int load_param_bin(AAsset* asset); 117 | int load_param_bin(AAssetManager* mgr, const char* assetpath); 118 | 119 | // convenient load network weight data from android asset model file 120 | int load_model(AAsset* asset); 121 | int load_model(AAssetManager* mgr, const char* assetpath); 122 | #endif // __ANDROID_API__ >= 9 123 | #endif // NCNN_PLATFORM_API 124 | 125 | // unload network structure and weight data 126 | void clear(); 127 | 128 | // construct an Extractor from network 129 | Extractor create_extractor() const; 130 | 131 | // get input/output indexes/names 132 | const std::vector& input_indexes() const; 133 | const std::vector& output_indexes() const; 134 | #if NCNN_STRING 135 | const std::vector& input_names() const; 136 | const std::vector& output_names() const; 137 | #endif 138 | 139 | const std::vector& blobs() const; 140 | const std::vector& layers() const; 141 | 142 | std::vector& mutable_blobs(); 143 | std::vector& mutable_layers(); 144 | 145 | protected: 146 | friend class Extractor; 147 | #if NCNN_STRING 148 | int find_blob_index_by_name(const char* name) const; 149 | int find_layer_index_by_name(const char* name) const; 150 | virtual int custom_layer_to_index(const char* type); 151 | virtual Layer* create_custom_layer(const char* type); 152 | #endif // NCNN_STRING 153 | virtual Layer* create_custom_layer(int index); 154 | 155 | private: 156 | Net(const Net&); 157 | Net& operator=(const Net&); 158 | 159 | private: 160 | NetPrivate* const d; 161 | }; 162 | 163 | class ExtractorPrivate; 164 | class NCNN_EXPORT Extractor 165 | { 166 | public: 167 | virtual ~Extractor(); 168 | 169 | // copy 170 | Extractor(const Extractor&); 171 | 172 | // assign 173 | Extractor& operator=(const Extractor&); 174 | 175 | // clear blob mats and alloctors 176 | void clear(); 177 | 178 | // enable light mode 179 | // intermediate blob will be recycled when enabled 180 | // enabled by default 181 | void set_light_mode(bool enable); 182 | 183 | // set thread count for this extractor 184 | // this will overwrite the global setting 185 | // default count is system depended 186 | void set_num_threads(int num_threads); 187 | 188 | // set blob memory allocator 189 | void set_blob_allocator(Allocator* allocator); 190 | 191 | // set workspace memory allocator 192 | void set_workspace_allocator(Allocator* allocator); 193 | 194 | #if NCNN_VULKAN 195 | void set_vulkan_compute(bool enable); 196 | 197 | void set_blob_vkallocator(VkAllocator* allocator); 198 | 199 | void set_workspace_vkallocator(VkAllocator* allocator); 200 | 201 | void set_staging_vkallocator(VkAllocator* allocator); 202 | #endif // NCNN_VULKAN 203 | 204 | #if NCNN_STRING 205 | // set input by blob name 206 | // return 0 if success 207 | int input(const char* blob_name, const Mat& in); 208 | 209 | // get result by blob name 210 | // return 0 if success 211 | // type = 0, default 212 | // type = 1, do not convert fp16/bf16 or / and packing 213 | int extract(const char* blob_name, Mat& feat, int type = 0); 214 | #endif // NCNN_STRING 215 | 216 | // set input by blob index 217 | // return 0 if success 218 | int input(int blob_index, const Mat& in); 219 | 220 | // get result by blob index 221 | // return 0 if success 222 | // type = 0, default 223 | // type = 1, do not convert fp16/bf16 or / and packing 224 | int extract(int blob_index, Mat& feat, int type = 0); 225 | 226 | #if NCNN_VULKAN 227 | #if NCNN_STRING 228 | // set input by blob name 229 | // return 0 if success 230 | int input(const char* blob_name, const VkMat& in); 231 | 232 | // get result by blob name 233 | // return 0 if success 234 | int extract(const char* blob_name, VkMat& feat, VkCompute& cmd); 235 | 236 | // set input by blob name 237 | // return 0 if success 238 | int input(const char* blob_name, const VkImageMat& in); 239 | 240 | // get result by blob name 241 | // return 0 if success 242 | int extract(const char* blob_name, VkImageMat& feat, VkCompute& cmd); 243 | #endif // NCNN_STRING 244 | 245 | // set input by blob index 246 | // return 0 if success 247 | int input(int blob_index, const VkMat& in); 248 | 249 | // get result by blob index 250 | // return 0 if success 251 | int extract(int blob_index, VkMat& feat, VkCompute& cmd); 252 | 253 | // set input by blob index 254 | // return 0 if success 255 | int input(int blob_index, const VkImageMat& in); 256 | 257 | // get result by blob index 258 | // return 0 if success 259 | int extract(int blob_index, VkImageMat& feat, VkCompute& cmd); 260 | #endif // NCNN_VULKAN 261 | 262 | protected: 263 | friend Extractor Net::create_extractor() const; 264 | Extractor(const Net* net, size_t blob_count); 265 | 266 | private: 267 | ExtractorPrivate* const d; 268 | }; 269 | 270 | } // namespace ncnn 271 | 272 | #endif // NCNN_NET_H 273 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/option.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_OPTION_H 16 | #define NCNN_OPTION_H 17 | 18 | #include "platform.h" 19 | 20 | namespace ncnn { 21 | 22 | #if NCNN_VULKAN 23 | class VkAllocator; 24 | class PipelineCache; 25 | #endif // NCNN_VULKAN 26 | 27 | class Allocator; 28 | class NCNN_EXPORT Option 29 | { 30 | public: 31 | // default option 32 | Option(); 33 | 34 | public: 35 | // light mode 36 | // intermediate blob will be recycled when enabled 37 | // enabled by default 38 | bool lightmode; 39 | 40 | // thread count 41 | // default value is the one returned by get_cpu_count() 42 | int num_threads; 43 | 44 | // blob memory allocator 45 | Allocator* blob_allocator; 46 | 47 | // workspace memory allocator 48 | Allocator* workspace_allocator; 49 | 50 | #if NCNN_VULKAN 51 | // blob memory allocator 52 | VkAllocator* blob_vkallocator; 53 | 54 | // workspace memory allocator 55 | VkAllocator* workspace_vkallocator; 56 | 57 | // staging memory allocator 58 | VkAllocator* staging_vkallocator; 59 | 60 | // pipeline cache 61 | PipelineCache* pipeline_cache; 62 | #endif // NCNN_VULKAN 63 | 64 | // the time openmp threads busy-wait for more work before going to sleep 65 | // default value is 20ms to keep the cores enabled 66 | // without too much extra power consumption afterwards 67 | int openmp_blocktime; 68 | 69 | // enable winograd convolution optimization 70 | // improve convolution 3x3 stride1 performance, may consume more memory 71 | // changes should be applied before loading network structure and weight 72 | // enabled by default 73 | bool use_winograd_convolution; 74 | 75 | // enable sgemm convolution optimization 76 | // improve convolution 1x1 stride1 performance, may consume more memory 77 | // changes should be applied before loading network structure and weight 78 | // enabled by default 79 | bool use_sgemm_convolution; 80 | 81 | // enable quantized int8 inference 82 | // use low-precision int8 path for quantized model 83 | // changes should be applied before loading network structure and weight 84 | // enabled by default 85 | bool use_int8_inference; 86 | 87 | // enable vulkan compute 88 | bool use_vulkan_compute; 89 | 90 | // enable bf16 data type for storage 91 | // improve most operator performance on all arm devices, may consume more memory 92 | bool use_bf16_storage; 93 | 94 | // enable options for gpu inference 95 | bool use_fp16_packed; 96 | bool use_fp16_storage; 97 | bool use_fp16_arithmetic; 98 | bool use_int8_packed; 99 | bool use_int8_storage; 100 | bool use_int8_arithmetic; 101 | 102 | // enable simd-friendly packed memory layout 103 | // improve all operator performance on all arm devices, will consume more memory 104 | // changes should be applied before loading network structure and weight 105 | // enabled by default 106 | bool use_packing_layout; 107 | 108 | bool use_shader_pack8; 109 | 110 | // subgroup option 111 | bool use_subgroup_basic; 112 | bool use_subgroup_vote; 113 | bool use_subgroup_ballot; 114 | bool use_subgroup_shuffle; 115 | 116 | // turn on for adreno 117 | bool use_image_storage; 118 | bool use_tensor_storage; 119 | 120 | // used for fp16 weight storage in AVX 121 | // TODO drop this option 122 | bool use_weight_fp16_storage; 123 | 124 | // enable DAZ(Denormals-Are-Zero) and FTZ(Flush-To-Zero) 125 | // default value is 3 126 | // 0 = DAZ OFF, FTZ OFF 127 | // 1 = DAZ ON , FTZ OFF 128 | // 2 = DAZ OFF, FTZ ON 129 | // 3 = DAZ ON, FTZ ON 130 | int flush_denormals; 131 | 132 | bool use_local_pool_allocator; 133 | 134 | bool use_reserved_1; 135 | bool use_reserved_2; 136 | bool use_reserved_3; 137 | bool use_reserved_4; 138 | bool use_reserved_5; 139 | bool use_reserved_6; 140 | bool use_reserved_7; 141 | bool use_reserved_8; 142 | bool use_reserved_9; 143 | bool use_reserved_10; 144 | bool use_reserved_11; 145 | }; 146 | 147 | } // namespace ncnn 148 | 149 | #endif // NCNN_OPTION_H 150 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/paramdict.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_PARAMDICT_H 16 | #define NCNN_PARAMDICT_H 17 | 18 | #include "mat.h" 19 | 20 | // at most 32 parameters 21 | #define NCNN_MAX_PARAM_COUNT 32 22 | 23 | namespace ncnn { 24 | 25 | class DataReader; 26 | class Net; 27 | class ParamDictPrivate; 28 | class NCNN_EXPORT ParamDict 29 | { 30 | public: 31 | // empty 32 | ParamDict(); 33 | 34 | virtual ~ParamDict(); 35 | 36 | // copy 37 | ParamDict(const ParamDict&); 38 | 39 | // assign 40 | ParamDict& operator=(const ParamDict&); 41 | 42 | // get type 43 | int type(int id) const; 44 | 45 | // get int 46 | int get(int id, int def) const; 47 | // get float 48 | float get(int id, float def) const; 49 | // get array 50 | Mat get(int id, const Mat& def) const; 51 | 52 | // set int 53 | void set(int id, int i); 54 | // set float 55 | void set(int id, float f); 56 | // set array 57 | void set(int id, const Mat& v); 58 | 59 | protected: 60 | friend class Net; 61 | 62 | void clear(); 63 | 64 | int load_param(const DataReader& dr); 65 | int load_param_bin(const DataReader& dr); 66 | 67 | private: 68 | ParamDictPrivate* const d; 69 | }; 70 | 71 | } // namespace ncnn 72 | 73 | #endif // NCNN_PARAMDICT_H 74 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/pipeline.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_PIPELINE_H 16 | #define NCNN_PIPELINE_H 17 | 18 | #include "mat.h" 19 | #include "platform.h" 20 | #if NCNN_VULKAN 21 | #include "gpu.h" 22 | 23 | #include 24 | #endif // NCNN_VULKAN 25 | 26 | namespace ncnn { 27 | 28 | #if NCNN_VULKAN 29 | class Option; 30 | class PipelinePrivate; 31 | class NCNN_EXPORT Pipeline 32 | { 33 | public: 34 | explicit Pipeline(const VulkanDevice* vkdev); 35 | virtual ~Pipeline(); 36 | 37 | public: 38 | void set_optimal_local_size_xyz(int w = 4, int h = 4, int c = 4); 39 | void set_optimal_local_size_xyz(const Mat& local_size_xyz); 40 | void set_local_size_xyz(int w, int h, int c); 41 | 42 | int create(const uint32_t* spv_data, size_t spv_data_size, const std::vector& specializations); 43 | 44 | int create(int shader_type_index, const Option& opt, const std::vector& specializations); 45 | 46 | public: 47 | VkShaderModule shader_module() const; 48 | VkDescriptorSetLayout descriptorset_layout() const; 49 | VkPipelineLayout pipeline_layout() const; 50 | VkPipeline pipeline() const; 51 | VkDescriptorUpdateTemplateKHR descriptor_update_template() const; 52 | 53 | const ShaderInfo& shader_info() const; 54 | 55 | uint32_t local_size_x() const; 56 | uint32_t local_size_y() const; 57 | uint32_t local_size_z() const; 58 | 59 | protected: 60 | void set_shader_module(VkShaderModule shader_module); 61 | void set_descriptorset_layout(VkDescriptorSetLayout descriptorset_layout); 62 | void set_pipeline_layout(VkPipelineLayout pipeline_layout); 63 | void set_pipeline(VkPipeline pipeline); 64 | void set_descriptor_update_template(VkDescriptorUpdateTemplateKHR descriptor_update_template); 65 | 66 | void set_shader_info(const ShaderInfo& shader_info); 67 | 68 | public: 69 | const VulkanDevice* vkdev; 70 | 71 | private: 72 | Pipeline(const Pipeline&); 73 | Pipeline& operator=(const Pipeline&); 74 | 75 | private: 76 | PipelinePrivate* const d; 77 | }; 78 | 79 | #if NCNN_PLATFORM_API 80 | #if __ANDROID_API__ >= 26 81 | class VkCompute; 82 | class NCNN_EXPORT ImportAndroidHardwareBufferPipeline : private Pipeline 83 | { 84 | public: 85 | explicit ImportAndroidHardwareBufferPipeline(const VulkanDevice* vkdev); 86 | virtual ~ImportAndroidHardwareBufferPipeline(); 87 | 88 | int create(VkAndroidHardwareBufferImageAllocator* ahb_im_allocator, int type_to, int rotate_from, const Option& opt); 89 | int create(VkAndroidHardwareBufferImageAllocator* ahb_im_allocator, int type_to, int rotate_from, int target_width, int target_height, const Option& opt); 90 | void destroy(); 91 | 92 | friend class VkCompute; 93 | 94 | protected: 95 | int create_shader_module(const Option& opt); 96 | int create_sampler(VkAndroidHardwareBufferImageAllocator* ahb_im_allocator); 97 | int create_descriptorset_layout(); 98 | 99 | public: 100 | int type_to; 101 | int rotate_from; 102 | bool need_resize; 103 | 104 | VkSampler sampler; 105 | }; 106 | #endif // __ANDROID_API__ >= 26 107 | #endif // NCNN_PLATFORM_API 108 | 109 | #endif // NCNN_VULKAN 110 | 111 | } // namespace ncnn 112 | 113 | #endif // NCNN_PIPELINE_H 114 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/pipelinecache.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_PIPELINECACHE_H 16 | #define NCNN_PIPELINECACHE_H 17 | 18 | #include "platform.h" 19 | 20 | #if NCNN_VULKAN 21 | #include 22 | #endif // NCNN_VULKAN 23 | 24 | #include "mat.h" 25 | #include "gpu.h" 26 | 27 | namespace ncnn { 28 | 29 | #if NCNN_VULKAN 30 | 31 | class VulkanDevice; 32 | class PipelineCachePrivate; 33 | class NCNN_EXPORT PipelineCache 34 | { 35 | public: 36 | explicit PipelineCache(const VulkanDevice* _vkdev); 37 | 38 | virtual ~PipelineCache(); 39 | 40 | void clear(); 41 | 42 | int get_pipeline(const uint32_t* spv_data, size_t spv_data_size, const std::vector& specializations, 43 | uint32_t local_size_x, uint32_t local_size_y, uint32_t local_size_z, 44 | VkShaderModule* shader_module, 45 | VkDescriptorSetLayout* descriptorset_layout, 46 | VkPipelineLayout* pipeline_layout, 47 | VkPipeline* pipeline, 48 | VkDescriptorUpdateTemplateKHR* descriptor_update_template, 49 | ShaderInfo& shader_info) const; 50 | 51 | int get_pipeline(int shader_type_index, const Option& opt, const std::vector& specializations, 52 | uint32_t local_size_x, uint32_t local_size_y, uint32_t local_size_z, 53 | VkShaderModule* shader_module, 54 | VkDescriptorSetLayout* descriptorset_layout, 55 | VkPipelineLayout* pipeline_layout, 56 | VkPipeline* pipeline, 57 | VkDescriptorUpdateTemplateKHR* descriptor_update_template, 58 | ShaderInfo& shader_info) const; 59 | 60 | protected: 61 | int create_shader_module(int shader_type_index, const Option& opt, uint32_t local_size_x, uint32_t local_size_y, uint32_t local_size_z, 62 | VkShaderModule* _shader_module, ShaderInfo& si) const; 63 | 64 | int new_pipeline(VkShaderModule shader_module, const ShaderInfo& shader_info, const std::vector& specializations, 65 | VkDescriptorSetLayout* descriptorset_layout, 66 | VkPipelineLayout* pipeline_layout, 67 | VkPipeline* pipeline, 68 | VkDescriptorUpdateTemplateKHR* descriptor_update_template) const; 69 | 70 | protected: 71 | const VulkanDevice* vkdev; 72 | 73 | private: 74 | PipelineCache(const PipelineCache&); 75 | PipelineCache& operator=(const PipelineCache&); 76 | 77 | private: 78 | PipelineCachePrivate* const d; 79 | }; 80 | 81 | #endif // NCNN_VULKAN 82 | 83 | } // namespace ncnn 84 | 85 | #endif // NCNN_PIPELINECACHE_H 86 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/platform.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_PLATFORM_H 16 | #define NCNN_PLATFORM_H 17 | 18 | #define NCNN_STDIO 1 19 | #define NCNN_STRING 1 20 | #define NCNN_SIMPLEOCV 0 21 | #define NCNN_SIMPLEOMP 0 22 | #define NCNN_SIMPLESTL 0 23 | #define NCNN_THREADS 1 24 | #define NCNN_BENCHMARK 0 25 | #define NCNN_PLATFORM_API 1 26 | #define NCNN_PIXEL 1 27 | #define NCNN_PIXEL_ROTATE 1 28 | #define NCNN_PIXEL_AFFINE 1 29 | #define NCNN_PIXEL_DRAWING 1 30 | #define NCNN_VULKAN 1 31 | #define NCNN_RUNTIME_CPU 1 32 | #define NCNN_AVX2 1 33 | #define NCNN_ARM82 0 34 | #define NCNN_ARM82DOT 0 35 | #define NCNN_RVV 0 36 | #define NCNN_INT8 1 37 | 38 | #define NCNN_VERSION_STRING "1.0.20210525" 39 | 40 | #include "ncnn_export.h" 41 | 42 | #ifdef __cplusplus 43 | 44 | #if NCNN_THREADS 45 | #if (defined _WIN32 && !(defined __MINGW32__)) 46 | #define WIN32_LEAN_AND_MEAN 47 | #include 48 | #include 49 | #else 50 | #include 51 | #endif 52 | #endif // NCNN_THREADS 53 | 54 | #if __ANDROID_API__ >= 26 55 | #define VK_USE_PLATFORM_ANDROID_KHR 56 | #endif // __ANDROID_API__ >= 26 57 | 58 | namespace ncnn { 59 | 60 | #if NCNN_THREADS 61 | #if (defined _WIN32 && !(defined __MINGW32__)) 62 | class NCNN_EXPORT Mutex 63 | { 64 | public: 65 | Mutex() { InitializeSRWLock(&srwlock); } 66 | ~Mutex() {} 67 | void lock() { AcquireSRWLockExclusive(&srwlock); } 68 | void unlock() { ReleaseSRWLockExclusive(&srwlock); } 69 | private: 70 | friend class ConditionVariable; 71 | // NOTE SRWLock is available from windows vista 72 | SRWLOCK srwlock; 73 | }; 74 | 75 | class NCNN_EXPORT ConditionVariable 76 | { 77 | public: 78 | ConditionVariable() { InitializeConditionVariable(&condvar); } 79 | ~ConditionVariable() {} 80 | void wait(Mutex& mutex) { SleepConditionVariableSRW(&condvar, &mutex.srwlock, INFINITE, 0); } 81 | void broadcast() { WakeAllConditionVariable(&condvar); } 82 | void signal() { WakeConditionVariable(&condvar); } 83 | private: 84 | CONDITION_VARIABLE condvar; 85 | }; 86 | 87 | static unsigned __stdcall start_wrapper(void* args); 88 | class NCNN_EXPORT Thread 89 | { 90 | public: 91 | Thread(void* (*start)(void*), void* args = 0) { _start = start; _args = args; handle = (HANDLE)_beginthreadex(0, 0, start_wrapper, this, 0, 0); } 92 | ~Thread() {} 93 | void join() { WaitForSingleObject(handle, INFINITE); CloseHandle(handle); } 94 | private: 95 | friend unsigned __stdcall start_wrapper(void* args) 96 | { 97 | Thread* t = (Thread*)args; 98 | t->_start(t->_args); 99 | return 0; 100 | } 101 | HANDLE handle; 102 | void* (*_start)(void*); 103 | void* _args; 104 | }; 105 | 106 | class NCNN_EXPORT ThreadLocalStorage 107 | { 108 | public: 109 | ThreadLocalStorage() { key = TlsAlloc(); } 110 | ~ThreadLocalStorage() { TlsFree(key); } 111 | void set(void* value) { TlsSetValue(key, (LPVOID)value); } 112 | void* get() { return (void*)TlsGetValue(key); } 113 | private: 114 | DWORD key; 115 | }; 116 | #else // (defined _WIN32 && !(defined __MINGW32__)) 117 | class NCNN_EXPORT Mutex 118 | { 119 | public: 120 | Mutex() { pthread_mutex_init(&mutex, 0); } 121 | ~Mutex() { pthread_mutex_destroy(&mutex); } 122 | void lock() { pthread_mutex_lock(&mutex); } 123 | void unlock() { pthread_mutex_unlock(&mutex); } 124 | private: 125 | friend class ConditionVariable; 126 | pthread_mutex_t mutex; 127 | }; 128 | 129 | class NCNN_EXPORT ConditionVariable 130 | { 131 | public: 132 | ConditionVariable() { pthread_cond_init(&cond, 0); } 133 | ~ConditionVariable() { pthread_cond_destroy(&cond); } 134 | void wait(Mutex& mutex) { pthread_cond_wait(&cond, &mutex.mutex); } 135 | void broadcast() { pthread_cond_broadcast(&cond); } 136 | void signal() { pthread_cond_signal(&cond); } 137 | private: 138 | pthread_cond_t cond; 139 | }; 140 | 141 | class NCNN_EXPORT Thread 142 | { 143 | public: 144 | Thread(void* (*start)(void*), void* args = 0) { pthread_create(&t, 0, start, args); } 145 | ~Thread() {} 146 | void join() { pthread_join(t, 0); } 147 | private: 148 | pthread_t t; 149 | }; 150 | 151 | class NCNN_EXPORT ThreadLocalStorage 152 | { 153 | public: 154 | ThreadLocalStorage() { pthread_key_create(&key, 0); } 155 | ~ThreadLocalStorage() { pthread_key_delete(key); } 156 | void set(void* value) { pthread_setspecific(key, value); } 157 | void* get() { return pthread_getspecific(key); } 158 | private: 159 | pthread_key_t key; 160 | }; 161 | #endif // (defined _WIN32 && !(defined __MINGW32__)) 162 | #else // NCNN_THREADS 163 | class NCNN_EXPORT Mutex 164 | { 165 | public: 166 | Mutex() {} 167 | ~Mutex() {} 168 | void lock() {} 169 | void unlock() {} 170 | }; 171 | 172 | class NCNN_EXPORT ConditionVariable 173 | { 174 | public: 175 | ConditionVariable() {} 176 | ~ConditionVariable() {} 177 | void wait(Mutex& /*mutex*/) {} 178 | void broadcast() {} 179 | void signal() {} 180 | }; 181 | 182 | class NCNN_EXPORT Thread 183 | { 184 | public: 185 | Thread(void* (*/*start*/)(void*), void* /*args*/ = 0) {} 186 | ~Thread() {} 187 | void join() {} 188 | }; 189 | 190 | class NCNN_EXPORT ThreadLocalStorage 191 | { 192 | public: 193 | ThreadLocalStorage() { data = 0; } 194 | ~ThreadLocalStorage() {} 195 | void set(void* value) { data = value; } 196 | void* get() { return data; } 197 | private: 198 | void* data; 199 | }; 200 | #endif // NCNN_THREADS 201 | 202 | class NCNN_EXPORT MutexLockGuard 203 | { 204 | public: 205 | MutexLockGuard(Mutex& _mutex) : mutex(_mutex) { mutex.lock(); } 206 | ~MutexLockGuard() { mutex.unlock(); } 207 | private: 208 | Mutex& mutex; 209 | }; 210 | 211 | } // namespace ncnn 212 | 213 | #if NCNN_SIMPLESTL 214 | #include "simplestl.h" 215 | #else 216 | #include 217 | #include 218 | #include 219 | #include 220 | #endif 221 | 222 | #endif // __cplusplus 223 | 224 | #if NCNN_STDIO 225 | #if NCNN_PLATFORM_API && __ANDROID_API__ >= 8 226 | #include 227 | #define NCNN_LOGE(...) do { \ 228 | fprintf(stderr, ##__VA_ARGS__); fprintf(stderr, "\n"); \ 229 | __android_log_print(ANDROID_LOG_WARN, "ncnn", ##__VA_ARGS__); } while(0) 230 | #else // NCNN_PLATFORM_API && __ANDROID_API__ >= 8 231 | #include 232 | #define NCNN_LOGE(...) do { \ 233 | fprintf(stderr, ##__VA_ARGS__); fprintf(stderr, "\n"); } while(0) 234 | #endif // NCNN_PLATFORM_API && __ANDROID_API__ >= 8 235 | #else 236 | #define NCNN_LOGE(...) 237 | #endif 238 | 239 | #endif // NCNN_PLATFORM_H 240 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/simpleocv.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_SIMPLEOCV_H 16 | #define NCNN_SIMPLEOCV_H 17 | 18 | #include "platform.h" 19 | 20 | #if NCNN_SIMPLEOCV 21 | 22 | #include 23 | #include 24 | #include "allocator.h" 25 | #include "mat.h" 26 | 27 | #if defined(_MSC_VER) || defined(__GNUC__) 28 | #pragma push_macro("min") 29 | #pragma push_macro("max") 30 | #undef min 31 | #undef max 32 | #endif 33 | 34 | #ifndef NCNN_XADD 35 | using ncnn::NCNN_XADD; 36 | #endif 37 | 38 | typedef unsigned char uchar; 39 | typedef unsigned short ushort; 40 | typedef unsigned int uint; 41 | 42 | enum 43 | { 44 | CV_LOAD_IMAGE_UNCHANGED = -1, 45 | CV_LOAD_IMAGE_GRAYSCALE = 0, 46 | CV_LOAD_IMAGE_COLOR = 1, 47 | }; 48 | 49 | enum 50 | { 51 | CV_IMWRITE_JPEG_QUALITY = 1 52 | }; 53 | 54 | // minimal opencv style data structure implementation 55 | namespace cv { 56 | 57 | template 58 | static inline _Tp saturate_cast(int v) 59 | { 60 | return _Tp(v); 61 | } 62 | template<> 63 | inline uchar saturate_cast(int v) 64 | { 65 | return (uchar)((unsigned)v <= UCHAR_MAX ? v : v > 0 ? UCHAR_MAX : 0); 66 | } 67 | 68 | template 69 | struct Scalar_ 70 | { 71 | Scalar_() 72 | { 73 | v[0] = 0; 74 | v[1] = 0; 75 | v[2] = 0; 76 | v[3] = 0; 77 | } 78 | Scalar_(_Tp _v0) 79 | { 80 | v[0] = _v0; 81 | v[1] = 0; 82 | v[2] = 0; 83 | v[3] = 0; 84 | } 85 | Scalar_(_Tp _v0, _Tp _v1, _Tp _v2) 86 | { 87 | v[0] = _v0; 88 | v[1] = _v1; 89 | v[2] = _v2; 90 | v[3] = 0; 91 | } 92 | Scalar_(_Tp _v0, _Tp _v1, _Tp _v2, _Tp _v3) 93 | { 94 | v[0] = _v0; 95 | v[1] = _v1; 96 | v[2] = _v2; 97 | v[3] = _v3; 98 | } 99 | 100 | const _Tp operator[](const int i) const 101 | { 102 | return v[i]; 103 | } 104 | 105 | _Tp operator[](const int i) 106 | { 107 | return v[i]; 108 | } 109 | 110 | _Tp v[4]; 111 | }; 112 | 113 | typedef Scalar_ Scalar; 114 | 115 | template 116 | struct Point_ 117 | { 118 | Point_() 119 | : x(0), y(0) 120 | { 121 | } 122 | Point_(_Tp _x, _Tp _y) 123 | : x(_x), y(_y) 124 | { 125 | } 126 | 127 | _Tp x; 128 | _Tp y; 129 | }; 130 | 131 | typedef Point_ Point; 132 | typedef Point_ Point2f; 133 | 134 | template 135 | struct Size_ 136 | { 137 | Size_() 138 | : width(0), height(0) 139 | { 140 | } 141 | Size_(_Tp _w, _Tp _h) 142 | : width(_w), height(_h) 143 | { 144 | } 145 | 146 | _Tp width; 147 | _Tp height; 148 | }; 149 | 150 | typedef Size_ Size; 151 | typedef Size_ Size2f; 152 | 153 | template 154 | struct Rect_ 155 | { 156 | Rect_() 157 | : x(0), y(0), width(0), height(0) 158 | { 159 | } 160 | Rect_(_Tp _x, _Tp _y, _Tp _w, _Tp _h) 161 | : x(_x), y(_y), width(_w), height(_h) 162 | { 163 | } 164 | Rect_(Point_<_Tp> _p, Size_<_Tp> _size) 165 | : x(_p.x), y(_p.y), width(_size.width), height(_size.height) 166 | { 167 | } 168 | 169 | _Tp x; 170 | _Tp y; 171 | _Tp width; 172 | _Tp height; 173 | 174 | // area 175 | _Tp area() const 176 | { 177 | return width * height; 178 | } 179 | }; 180 | 181 | template 182 | static inline Rect_<_Tp>& operator&=(Rect_<_Tp>& a, const Rect_<_Tp>& b) 183 | { 184 | _Tp x1 = std::max(a.x, b.x), y1 = std::max(a.y, b.y); 185 | a.width = std::min(a.x + a.width, b.x + b.width) - x1; 186 | a.height = std::min(a.y + a.height, b.y + b.height) - y1; 187 | a.x = x1; 188 | a.y = y1; 189 | if (a.width <= 0 || a.height <= 0) 190 | a = Rect_<_Tp>(); 191 | return a; 192 | } 193 | 194 | template 195 | static inline Rect_<_Tp>& operator|=(Rect_<_Tp>& a, const Rect_<_Tp>& b) 196 | { 197 | _Tp x1 = std::min(a.x, b.x), y1 = std::min(a.y, b.y); 198 | a.width = std::max(a.x + a.width, b.x + b.width) - x1; 199 | a.height = std::max(a.y + a.height, b.y + b.height) - y1; 200 | a.x = x1; 201 | a.y = y1; 202 | return a; 203 | } 204 | 205 | template 206 | static inline Rect_<_Tp> operator&(const Rect_<_Tp>& a, const Rect_<_Tp>& b) 207 | { 208 | Rect_<_Tp> c = a; 209 | return c &= b; 210 | } 211 | 212 | template 213 | static inline Rect_<_Tp> operator|(const Rect_<_Tp>& a, const Rect_<_Tp>& b) 214 | { 215 | Rect_<_Tp> c = a; 216 | return c |= b; 217 | } 218 | 219 | typedef Rect_ Rect; 220 | typedef Rect_ Rect2f; 221 | 222 | #define CV_8UC1 1 223 | #define CV_8UC3 3 224 | #define CV_8UC4 4 225 | #define CV_32FC1 4 226 | 227 | struct NCNN_EXPORT Mat 228 | { 229 | Mat() 230 | : data(0), refcount(0), rows(0), cols(0), c(0) 231 | { 232 | } 233 | 234 | Mat(int _rows, int _cols, int flags) 235 | : data(0), refcount(0) 236 | { 237 | create(_rows, _cols, flags); 238 | } 239 | 240 | // copy 241 | Mat(const Mat& m) 242 | : data(m.data), refcount(m.refcount) 243 | { 244 | if (refcount) 245 | NCNN_XADD(refcount, 1); 246 | 247 | rows = m.rows; 248 | cols = m.cols; 249 | c = m.c; 250 | } 251 | 252 | Mat(int _rows, int _cols, int flags, void* _data) 253 | : data((unsigned char*)_data), refcount(0) 254 | { 255 | rows = _rows; 256 | cols = _cols; 257 | c = flags; 258 | } 259 | 260 | ~Mat() 261 | { 262 | release(); 263 | } 264 | 265 | // assign 266 | Mat& operator=(const Mat& m) 267 | { 268 | if (this == &m) 269 | return *this; 270 | 271 | if (m.refcount) 272 | NCNN_XADD(m.refcount, 1); 273 | 274 | release(); 275 | 276 | data = m.data; 277 | refcount = m.refcount; 278 | 279 | rows = m.rows; 280 | cols = m.cols; 281 | c = m.c; 282 | 283 | return *this; 284 | } 285 | 286 | Mat& operator=(const Scalar& s) 287 | { 288 | if (total() > 0) 289 | { 290 | uchar* p = data; 291 | for (int i = 0; i < cols * rows; i++) 292 | { 293 | for (int j = 0; j < c; j++) 294 | { 295 | *p++ = s[j]; 296 | } 297 | } 298 | } 299 | 300 | return *this; 301 | } 302 | 303 | void create(int _rows, int _cols, int flags) 304 | { 305 | release(); 306 | 307 | rows = _rows; 308 | cols = _cols; 309 | c = flags; 310 | 311 | if (total() > 0) 312 | { 313 | // refcount address must be aligned, so we expand totalsize here 314 | size_t totalsize = (total() + 3) >> 2 << 2; 315 | data = (uchar*)ncnn::fastMalloc(totalsize + (int)sizeof(*refcount)); 316 | refcount = (int*)(((uchar*)data) + totalsize); 317 | *refcount = 1; 318 | } 319 | } 320 | 321 | void release() 322 | { 323 | if (refcount && NCNN_XADD(refcount, -1) == 1) 324 | ncnn::fastFree(data); 325 | 326 | data = 0; 327 | 328 | rows = 0; 329 | cols = 0; 330 | c = 0; 331 | 332 | refcount = 0; 333 | } 334 | 335 | Mat clone() const 336 | { 337 | if (empty()) 338 | return Mat(); 339 | 340 | Mat m(rows, cols, c); 341 | 342 | if (total() > 0) 343 | { 344 | memcpy(m.data, data, total()); 345 | } 346 | 347 | return m; 348 | } 349 | 350 | bool empty() const 351 | { 352 | return data == 0 || total() == 0; 353 | } 354 | 355 | int channels() const 356 | { 357 | return c; 358 | } 359 | 360 | int type() const 361 | { 362 | return c; 363 | } 364 | 365 | size_t total() const 366 | { 367 | return cols * rows * c; 368 | } 369 | 370 | const uchar* ptr(int y) const 371 | { 372 | return data + y * cols * c; 373 | } 374 | 375 | uchar* ptr(int y) 376 | { 377 | return data + y * cols * c; 378 | } 379 | 380 | template 381 | const _Tp* ptr(int y) const 382 | { 383 | return (const _Tp*)data + y * cols * c; 384 | } 385 | 386 | template 387 | _Tp* ptr(int y) 388 | { 389 | return (_Tp*)data + y * cols * c; 390 | } 391 | 392 | // roi 393 | Mat operator()(const Rect& roi) const 394 | { 395 | if (empty()) 396 | return Mat(); 397 | 398 | Mat m(roi.height, roi.width, c); 399 | 400 | int sy = roi.y; 401 | for (int y = 0; y < roi.height; y++) 402 | { 403 | const uchar* sptr = ptr(sy) + roi.x * c; 404 | uchar* dptr = m.ptr(y); 405 | memcpy(dptr, sptr, roi.width * c); 406 | sy++; 407 | } 408 | 409 | return m; 410 | } 411 | 412 | uchar* data; 413 | 414 | // pointer to the reference counter; 415 | // when points to user-allocated data, the pointer is NULL 416 | int* refcount; 417 | 418 | int rows; 419 | int cols; 420 | 421 | int c; 422 | }; 423 | 424 | enum ImreadModes 425 | { 426 | IMREAD_UNCHANGED = -1, 427 | IMREAD_GRAYSCALE = 0, 428 | IMREAD_COLOR = 1 429 | }; 430 | 431 | NCNN_EXPORT Mat imread(const std::string& path, int flags = IMREAD_COLOR); 432 | 433 | enum ImwriteFlags 434 | { 435 | IMWRITE_JPEG_QUALITY = 1 436 | }; 437 | 438 | NCNN_EXPORT bool imwrite(const std::string& path, const Mat& m, const std::vector& params = std::vector()); 439 | 440 | #if NCNN_PIXEL 441 | NCNN_EXPORT void resize(const Mat& src, Mat& dst, const Size& size, float sw = 0.f, float sh = 0.f, int flags = 0); 442 | #endif // NCNN_PIXEL 443 | 444 | #if NCNN_PIXEL_DRAWING 445 | 446 | enum 447 | { 448 | FILLED = -1 449 | }; 450 | 451 | NCNN_EXPORT void rectangle(Mat& img, Point pt1, Point pt2, const Scalar& color, int thickness = 1); 452 | 453 | NCNN_EXPORT void rectangle(Mat& img, Rect rec, const Scalar& color, int thickness = 1); 454 | 455 | NCNN_EXPORT void circle(Mat& img, Point center, int radius, const Scalar& color, int thickness = 1); 456 | 457 | NCNN_EXPORT void line(Mat& img, Point p0, Point p1, const Scalar& color, int thickness = 1); 458 | 459 | enum 460 | { 461 | FONT_HERSHEY_SIMPLEX = 0 462 | }; 463 | 464 | NCNN_EXPORT void putText(Mat& img, const std::string& text, Point org, int fontFace, double fontScale, Scalar color, int thickness = 1); 465 | 466 | NCNN_EXPORT Size getTextSize(const std::string& text, int fontFace, double fontScale, int thickness, int* baseLine); 467 | 468 | #endif // NCNN_PIXEL_DRAWING 469 | 470 | } // namespace cv 471 | 472 | #if defined(_MSC_VER) || defined(__GNUC__) 473 | #pragma pop_macro("min") 474 | #pragma pop_macro("max") 475 | #endif 476 | 477 | #endif // NCNN_SIMPLEOCV 478 | 479 | #endif // NCNN_SIMPLEOCV_H 480 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/simpleomp.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_SIMPLEOMP_H 16 | #define NCNN_SIMPLEOMP_H 17 | 18 | #include "platform.h" 19 | 20 | #if NCNN_SIMPLEOMP 21 | 22 | #include 23 | 24 | // This minimal openmp runtime implementation only supports the llvm openmp abi 25 | // and only supports #pragma omp parallel for num_threads(X) 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | NCNN_EXPORT int omp_get_max_threads(); 32 | 33 | NCNN_EXPORT void omp_set_num_threads(int num_threads); 34 | 35 | NCNN_EXPORT int omp_get_dynamic(); 36 | 37 | NCNN_EXPORT void omp_set_dynamic(int dynamic); 38 | 39 | NCNN_EXPORT int omp_get_num_threads(); 40 | 41 | NCNN_EXPORT int omp_get_thread_num(); 42 | 43 | NCNN_EXPORT int kmp_get_blocktime(); 44 | 45 | NCNN_EXPORT void kmp_set_blocktime(int blocktime); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif // NCNN_SIMPLEOMP 52 | 53 | #endif // NCNN_SIMPLEOMP_H 54 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/include/ncnn/vulkan_header_fix.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making ncnn available. 2 | // 3 | // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. 4 | // 5 | // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // https://opensource.org/licenses/BSD-3-Clause 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef NCNN_VULKAN_HEADER_FIX_H 16 | #define NCNN_VULKAN_HEADER_FIX_H 17 | 18 | #include 19 | 20 | // This header contains new structure and function declearation to fix build with old vulkan sdk 21 | 22 | #if VK_HEADER_VERSION < 70 23 | #define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES (VkStructureType)1000094000 24 | typedef enum VkSubgroupFeatureFlagBits 25 | { 26 | VK_SUBGROUP_FEATURE_BASIC_BIT = 0x00000001, 27 | VK_SUBGROUP_FEATURE_VOTE_BIT = 0x00000002, 28 | VK_SUBGROUP_FEATURE_ARITHMETIC_BIT = 0x00000004, 29 | VK_SUBGROUP_FEATURE_BALLOT_BIT = 0x00000008, 30 | VK_SUBGROUP_FEATURE_SHUFFLE_BIT = 0x00000010, 31 | VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT = 0x00000020, 32 | VK_SUBGROUP_FEATURE_CLUSTERED_BIT = 0x00000040, 33 | VK_SUBGROUP_FEATURE_QUAD_BIT = 0x00000080, 34 | VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV = 0x00000100, 35 | VK_SUBGROUP_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF 36 | } VkSubgroupFeatureFlagBits; 37 | typedef VkFlags VkSubgroupFeatureFlags; 38 | typedef struct VkPhysicalDeviceSubgroupProperties 39 | { 40 | VkStructureType sType; 41 | void* pNext; 42 | uint32_t subgroupSize; 43 | VkShaderStageFlags supportedStages; 44 | VkSubgroupFeatureFlags supportedOperations; 45 | VkBool32 quadOperationsInAllStages; 46 | } VkPhysicalDeviceSubgroupProperties; 47 | #define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES (VkStructureType)1000168000 48 | #define VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT (VkStructureType)1000168001 49 | typedef struct VkPhysicalDeviceMaintenance3Properties 50 | { 51 | VkStructureType sType; 52 | void* pNext; 53 | uint32_t maxPerSetDescriptors; 54 | VkDeviceSize maxMemoryAllocationSize; 55 | } VkPhysicalDeviceMaintenance3Properties; 56 | typedef struct VkDescriptorSetLayoutSupport 57 | { 58 | VkStructureType sType; 59 | void* pNext; 60 | VkBool32 supported; 61 | } VkDescriptorSetLayoutSupport; 62 | typedef VkPhysicalDeviceMaintenance3Properties VkPhysicalDeviceMaintenance3PropertiesKHR; 63 | typedef VkDescriptorSetLayoutSupport VkDescriptorSetLayoutSupportKHR; 64 | typedef void(VKAPI_PTR* PFN_vkGetDescriptorSetLayoutSupportKHR)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport); 65 | #endif // VK_HEADER_VERSION < 70 66 | 67 | #if VK_HEADER_VERSION < 80 68 | #define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR (VkStructureType)1000177000 69 | typedef struct VkPhysicalDevice8BitStorageFeaturesKHR 70 | { 71 | VkStructureType sType; 72 | void* pNext; 73 | VkBool32 storageBuffer8BitAccess; 74 | VkBool32 uniformAndStorageBuffer8BitAccess; 75 | VkBool32 storagePushConstant8; 76 | } VkPhysicalDevice8BitStorageFeaturesKHR; 77 | #define VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR (VkStructureType)1000109000 78 | #define VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR (VkStructureType)1000109001 79 | #define VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR (VkStructureType)1000109002 80 | #define VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR (VkStructureType)1000109003 81 | #define VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR (VkStructureType)1000109004 82 | #define VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR (VkStructureType)1000109005 83 | #define VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR (VkStructureType)1000109006 84 | typedef struct VkAttachmentDescription2KHR 85 | { 86 | VkStructureType sType; 87 | const void* pNext; 88 | VkAttachmentDescriptionFlags flags; 89 | VkFormat format; 90 | VkSampleCountFlagBits samples; 91 | VkAttachmentLoadOp loadOp; 92 | VkAttachmentStoreOp storeOp; 93 | VkAttachmentLoadOp stencilLoadOp; 94 | VkAttachmentStoreOp stencilStoreOp; 95 | VkImageLayout initialLayout; 96 | VkImageLayout finalLayout; 97 | } VkAttachmentDescription2KHR; 98 | typedef struct VkAttachmentReference2KHR 99 | { 100 | VkStructureType sType; 101 | const void* pNext; 102 | uint32_t attachment; 103 | VkImageLayout layout; 104 | VkImageAspectFlags aspectMask; 105 | } VkAttachmentReference2KHR; 106 | typedef struct VkSubpassDescription2KHR 107 | { 108 | VkStructureType sType; 109 | const void* pNext; 110 | VkSubpassDescriptionFlags flags; 111 | VkPipelineBindPoint pipelineBindPoint; 112 | uint32_t viewMask; 113 | uint32_t inputAttachmentCount; 114 | const VkAttachmentReference2KHR* pInputAttachments; 115 | uint32_t colorAttachmentCount; 116 | const VkAttachmentReference2KHR* pColorAttachments; 117 | const VkAttachmentReference2KHR* pResolveAttachments; 118 | const VkAttachmentReference2KHR* pDepthStencilAttachment; 119 | uint32_t preserveAttachmentCount; 120 | const uint32_t* pPreserveAttachments; 121 | } VkSubpassDescription2KHR; 122 | typedef struct VkSubpassDependency2KHR 123 | { 124 | VkStructureType sType; 125 | const void* pNext; 126 | uint32_t srcSubpass; 127 | uint32_t dstSubpass; 128 | VkPipelineStageFlags srcStageMask; 129 | VkPipelineStageFlags dstStageMask; 130 | VkAccessFlags srcAccessMask; 131 | VkAccessFlags dstAccessMask; 132 | VkDependencyFlags dependencyFlags; 133 | int32_t viewOffset; 134 | } VkSubpassDependency2KHR; 135 | typedef struct VkRenderPassCreateInfo2KHR 136 | { 137 | VkStructureType sType; 138 | const void* pNext; 139 | VkRenderPassCreateFlags flags; 140 | uint32_t attachmentCount; 141 | const VkAttachmentDescription2KHR* pAttachments; 142 | uint32_t subpassCount; 143 | const VkSubpassDescription2KHR* pSubpasses; 144 | uint32_t dependencyCount; 145 | const VkSubpassDependency2KHR* pDependencies; 146 | uint32_t correlatedViewMaskCount; 147 | const uint32_t* pCorrelatedViewMasks; 148 | } VkRenderPassCreateInfo2KHR; 149 | typedef struct VkSubpassBeginInfoKHR 150 | { 151 | VkStructureType sType; 152 | const void* pNext; 153 | VkSubpassContents contents; 154 | } VkSubpassBeginInfoKHR; 155 | 156 | typedef struct VkSubpassEndInfoKHR 157 | { 158 | VkStructureType sType; 159 | const void* pNext; 160 | } VkSubpassEndInfoKHR; 161 | typedef VkResult(VKAPI_PTR* PFN_vkCreateRenderPass2KHR)(VkDevice device, const VkRenderPassCreateInfo2KHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass); 162 | typedef void(VKAPI_PTR* PFN_vkCmdBeginRenderPass2KHR)(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfoKHR* pSubpassBeginInfo); 163 | typedef void(VKAPI_PTR* PFN_vkCmdNextSubpass2KHR)(VkCommandBuffer commandBuffer, const VkSubpassBeginInfoKHR* pSubpassBeginInfo, const VkSubpassEndInfoKHR* pSubpassEndInfo); 164 | typedef void(VKAPI_PTR* PFN_vkCmdEndRenderPass2KHR)(VkCommandBuffer commandBuffer, const VkSubpassEndInfoKHR* pSubpassEndInfo); 165 | #endif // VK_HEADER_VERSION < 80 166 | 167 | #if VK_HEADER_VERSION < 95 168 | #define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR (VkStructureType)1000082000 169 | typedef struct VkPhysicalDeviceFloat16Int8FeaturesKHR 170 | { 171 | VkStructureType sType; 172 | void* pNext; 173 | VkBool32 shaderFloat16; 174 | VkBool32 shaderInt8; 175 | } VkPhysicalDeviceFloat16Int8FeaturesKHR; 176 | #endif // VK_HEADER_VERSION < 95 177 | 178 | #if VK_HEADER_VERSION < 97 179 | #define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT (VkStructureType)1000237000 180 | typedef struct VkPhysicalDeviceMemoryBudgetPropertiesEXT 181 | { 182 | VkStructureType sType; 183 | void* pNext; 184 | VkDeviceSize heapBudget[VK_MAX_MEMORY_HEAPS]; 185 | VkDeviceSize heapUsage[VK_MAX_MEMORY_HEAPS]; 186 | } VkPhysicalDeviceMemoryBudgetPropertiesEXT; 187 | #endif // VK_HEADER_VERSION < 97 188 | 189 | #endif // NCNN_VULKAN_HEADER_FIX_H 190 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/lib/cmake/ncnn/ncnn-release.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Release". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "ncnn" for configuration "Release" 9 | set_property(TARGET ncnn APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 10 | set_target_properties(ncnn PROPERTIES 11 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libncnn.so.1.0.20210525" 12 | IMPORTED_SONAME_RELEASE "libncnn.so.1" 13 | ) 14 | 15 | list(APPEND _IMPORT_CHECK_TARGETS ncnn ) 16 | list(APPEND _IMPORT_CHECK_FILES_FOR_ncnn "${_IMPORT_PREFIX}/lib/libncnn.so.1.0.20210525" ) 17 | 18 | # Commands beyond this point should not need to know the version. 19 | set(CMAKE_IMPORT_FILE_VERSION) 20 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/lib/cmake/ncnn/ncnn.cmake: -------------------------------------------------------------------------------- 1 | # Generated by CMake 2 | 3 | if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) 4 | message(FATAL_ERROR "CMake >= 2.6.0 required") 5 | endif() 6 | cmake_policy(PUSH) 7 | cmake_policy(VERSION 2.6...3.18) 8 | #---------------------------------------------------------------- 9 | # Generated CMake target import file. 10 | #---------------------------------------------------------------- 11 | 12 | # Commands may need to know the format version. 13 | set(CMAKE_IMPORT_FILE_VERSION 1) 14 | 15 | # Protect against multiple inclusion, which would fail when already imported targets are added once more. 16 | set(_targetsDefined) 17 | set(_targetsNotDefined) 18 | set(_expectedTargets) 19 | foreach(_expectedTarget ncnn) 20 | list(APPEND _expectedTargets ${_expectedTarget}) 21 | if(NOT TARGET ${_expectedTarget}) 22 | list(APPEND _targetsNotDefined ${_expectedTarget}) 23 | endif() 24 | if(TARGET ${_expectedTarget}) 25 | list(APPEND _targetsDefined ${_expectedTarget}) 26 | endif() 27 | endforeach() 28 | if("${_targetsDefined}" STREQUAL "${_expectedTargets}") 29 | unset(_targetsDefined) 30 | unset(_targetsNotDefined) 31 | unset(_expectedTargets) 32 | set(CMAKE_IMPORT_FILE_VERSION) 33 | cmake_policy(POP) 34 | return() 35 | endif() 36 | if(NOT "${_targetsDefined}" STREQUAL "") 37 | message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") 38 | endif() 39 | unset(_targetsDefined) 40 | unset(_targetsNotDefined) 41 | unset(_expectedTargets) 42 | 43 | 44 | # Compute the installation prefix relative to this file. 45 | get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) 46 | get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) 47 | get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) 48 | get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) 49 | if(_IMPORT_PREFIX STREQUAL "/") 50 | set(_IMPORT_PREFIX "") 51 | endif() 52 | 53 | # Create imported target ncnn 54 | add_library(ncnn SHARED IMPORTED) 55 | 56 | set_target_properties(ncnn PROPERTIES 57 | INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/ncnn" 58 | INTERFACE_LINK_LIBRARIES "OpenMP::OpenMP_CXX;Threads::Threads;Vulkan::Vulkan" 59 | INTERFACE_POSITION_INDEPENDENT_CODE "ON" 60 | ) 61 | 62 | if(CMAKE_VERSION VERSION_LESS 2.8.12) 63 | message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") 64 | endif() 65 | 66 | # Load information for each installed configuration. 67 | get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) 68 | file(GLOB CONFIG_FILES "${_DIR}/ncnn-*.cmake") 69 | foreach(f ${CONFIG_FILES}) 70 | include(${f}) 71 | endforeach() 72 | 73 | # Cleanup temporary variables. 74 | set(_IMPORT_PREFIX) 75 | 76 | # Loop over all imported files and verify that they actually exist 77 | foreach(target ${_IMPORT_CHECK_TARGETS} ) 78 | foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) 79 | if(NOT EXISTS "${file}" ) 80 | message(FATAL_ERROR "The imported target \"${target}\" references the file 81 | \"${file}\" 82 | but this file does not exist. Possible reasons include: 83 | * The file was deleted, renamed, or moved to another location. 84 | * An install or uninstall procedure did not complete successfully. 85 | * The installation package was faulty and contained 86 | \"${CMAKE_CURRENT_LIST_FILE}\" 87 | but not all the files it references. 88 | ") 89 | endif() 90 | endforeach() 91 | unset(_IMPORT_CHECK_FILES_FOR_${target}) 92 | endforeach() 93 | unset(_IMPORT_CHECK_TARGETS) 94 | 95 | # This file does not depend on other imported targets which have 96 | # been exported from the same project but in a separate export set. 97 | 98 | # Commands beyond this point should not need to know the version. 99 | set(CMAKE_IMPORT_FILE_VERSION) 100 | cmake_policy(POP) 101 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/lib/cmake/ncnn/ncnnConfig.cmake: -------------------------------------------------------------------------------- 1 | set(NCNN_OPENMP ON) 2 | set(NCNN_THREADS ON) 3 | set(NCNN_VULKAN ON) 4 | set(NCNN_SHARED_LIB ON) 5 | set(NCNN_SYSTEM_GLSLANG OFF) 6 | 7 | if(NCNN_OPENMP) 8 | find_package(OpenMP) 9 | endif() 10 | 11 | if(NCNN_THREADS) 12 | set(CMAKE_THREAD_PREFER_PTHREAD TRUE) 13 | set(THREADS_PREFER_PTHREAD_FLAG TRUE) 14 | find_package(Threads REQUIRED) 15 | endif() 16 | 17 | if(NCNN_VULKAN) 18 | find_package(Vulkan REQUIRED) 19 | 20 | if(NOT NCNN_SHARED_LIB) 21 | if(NCNN_SYSTEM_GLSLANG) 22 | set(GLSLANG_TARGET_DIR "") 23 | else() 24 | set(GLSLANG_TARGET_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../lib/cmake") 25 | endif(NCNN_SYSTEM_GLSLANG) 26 | 27 | include(${GLSLANG_TARGET_DIR}/OSDependentTargets.cmake) 28 | include(${GLSLANG_TARGET_DIR}/OGLCompilerTargets.cmake) 29 | if(EXISTS "${GLSLANG_TARGET_DIR}/HLSLTargets.cmake") 30 | # hlsl support can be optional 31 | include("${GLSLANG_TARGET_DIR}/HLSLTargets.cmake") 32 | endif() 33 | include(${GLSLANG_TARGET_DIR}/glslangTargets.cmake) 34 | include(${GLSLANG_TARGET_DIR}/SPIRVTargets.cmake) 35 | endif() 36 | endif(NCNN_VULKAN) 37 | 38 | include(${CMAKE_CURRENT_LIST_DIR}/ncnn.cmake) 39 | -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/lib/libncnn.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/ncnn-20210525-ubuntu-1604-shared/lib/libncnn.so -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/lib/libncnn.so.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/ncnn-20210525-ubuntu-1604-shared/lib/libncnn.so.1 -------------------------------------------------------------------------------- /ncnn-20210525-ubuntu-1604-shared/lib/libncnn.so.1.0.20210525: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/ncnn-20210525-ubuntu-1604-shared/lib/libncnn.so.1.0.20210525 -------------------------------------------------------------------------------- /yolov5s-int8-aciq.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/yolov5s-int8-aciq.bin -------------------------------------------------------------------------------- /yolov5s-int8.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/yolov5s-int8.bin -------------------------------------------------------------------------------- /yolov5s-opt.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/yolov5s-opt.bin -------------------------------------------------------------------------------- /yolov5s-opt.param: -------------------------------------------------------------------------------- 1 | 7767517 2 | 176 200 3 | Input images 0 1 images 4 | YoloV5Focus focus 1 1 images 167 5 | Convolution Conv_41 1 1 167 168 0=32 1=3 4=1 5=1 6=3456 6 | Swish Mul_43 1 1 168 170 7 | Convolution Conv_44 1 1 170 171 0=64 1=3 3=2 4=1 5=1 6=18432 8 | Swish Mul_46 1 1 171 173 9 | Split splitncnn_0 1 2 173 173_splitncnn_0 173_splitncnn_1 10 | Convolution Conv_47 1 1 173_splitncnn_1 174 0=32 1=1 5=1 6=2048 11 | Swish Mul_49 1 1 174 176 12 | Split splitncnn_1 1 2 176 176_splitncnn_0 176_splitncnn_1 13 | Convolution Conv_50 1 1 176_splitncnn_1 177 0=32 1=1 5=1 6=1024 14 | Swish Mul_52 1 1 177 179 15 | Convolution Conv_53 1 1 179 180 0=32 1=3 4=1 5=1 6=9216 16 | Swish Mul_55 1 1 180 182 17 | BinaryOp Add_56 2 1 176_splitncnn_0 182 183 18 | Convolution Conv_57 1 1 173_splitncnn_0 184 0=32 1=1 5=1 6=2048 19 | Swish Mul_59 1 1 184 186 20 | Concat Concat_60 2 1 183 186 187 21 | Convolution Conv_61 1 1 187 188 0=64 1=1 5=1 6=4096 22 | Swish Mul_63 1 1 188 190 23 | Convolution Conv_64 1 1 190 191 0=128 1=3 3=2 4=1 5=1 6=73728 24 | Swish Mul_66 1 1 191 193 25 | Split splitncnn_2 1 2 193 193_splitncnn_0 193_splitncnn_1 26 | Convolution Conv_67 1 1 193_splitncnn_1 194 0=64 1=1 5=1 6=8192 27 | Swish Mul_69 1 1 194 196 28 | Split splitncnn_3 1 2 196 196_splitncnn_0 196_splitncnn_1 29 | Convolution Conv_70 1 1 196_splitncnn_1 197 0=64 1=1 5=1 6=4096 30 | Swish Mul_72 1 1 197 199 31 | Convolution Conv_73 1 1 199 200 0=64 1=3 4=1 5=1 6=36864 32 | Swish Mul_75 1 1 200 202 33 | BinaryOp Add_76 2 1 196_splitncnn_0 202 203 34 | Split splitncnn_4 1 2 203 203_splitncnn_0 203_splitncnn_1 35 | Convolution Conv_77 1 1 203_splitncnn_1 204 0=64 1=1 5=1 6=4096 36 | Swish Mul_79 1 1 204 206 37 | Convolution Conv_80 1 1 206 207 0=64 1=3 4=1 5=1 6=36864 38 | Swish Mul_82 1 1 207 209 39 | BinaryOp Add_83 2 1 203_splitncnn_0 209 210 40 | Split splitncnn_5 1 2 210 210_splitncnn_0 210_splitncnn_1 41 | Convolution Conv_84 1 1 210_splitncnn_1 211 0=64 1=1 5=1 6=4096 42 | Swish Mul_86 1 1 211 213 43 | Convolution Conv_87 1 1 213 214 0=64 1=3 4=1 5=1 6=36864 44 | Swish Mul_89 1 1 214 216 45 | BinaryOp Add_90 2 1 210_splitncnn_0 216 217 46 | Convolution Conv_91 1 1 193_splitncnn_0 218 0=64 1=1 5=1 6=8192 47 | Swish Mul_93 1 1 218 220 48 | Concat Concat_94 2 1 217 220 221 49 | Convolution Conv_95 1 1 221 222 0=128 1=1 5=1 6=16384 50 | Swish Mul_97 1 1 222 224 51 | Split splitncnn_6 1 2 224 224_splitncnn_0 224_splitncnn_1 52 | Convolution Conv_98 1 1 224_splitncnn_1 225 0=256 1=3 3=2 4=1 5=1 6=294912 53 | Swish Mul_100 1 1 225 227 54 | Split splitncnn_7 1 2 227 227_splitncnn_0 227_splitncnn_1 55 | Convolution Conv_101 1 1 227_splitncnn_1 228 0=128 1=1 5=1 6=32768 56 | Swish Mul_103 1 1 228 230 57 | Split splitncnn_8 1 2 230 230_splitncnn_0 230_splitncnn_1 58 | Convolution Conv_104 1 1 230_splitncnn_1 231 0=128 1=1 5=1 6=16384 59 | Swish Mul_106 1 1 231 233 60 | Convolution Conv_107 1 1 233 234 0=128 1=3 4=1 5=1 6=147456 61 | Swish Mul_109 1 1 234 236 62 | BinaryOp Add_110 2 1 230_splitncnn_0 236 237 63 | Split splitncnn_9 1 2 237 237_splitncnn_0 237_splitncnn_1 64 | Convolution Conv_111 1 1 237_splitncnn_1 238 0=128 1=1 5=1 6=16384 65 | Swish Mul_113 1 1 238 240 66 | Convolution Conv_114 1 1 240 241 0=128 1=3 4=1 5=1 6=147456 67 | Swish Mul_116 1 1 241 243 68 | BinaryOp Add_117 2 1 237_splitncnn_0 243 244 69 | Split splitncnn_10 1 2 244 244_splitncnn_0 244_splitncnn_1 70 | Convolution Conv_118 1 1 244_splitncnn_1 245 0=128 1=1 5=1 6=16384 71 | Swish Mul_120 1 1 245 247 72 | Convolution Conv_121 1 1 247 248 0=128 1=3 4=1 5=1 6=147456 73 | Swish Mul_123 1 1 248 250 74 | BinaryOp Add_124 2 1 244_splitncnn_0 250 251 75 | Convolution Conv_125 1 1 227_splitncnn_0 252 0=128 1=1 5=1 6=32768 76 | Swish Mul_127 1 1 252 254 77 | Concat Concat_128 2 1 251 254 255 78 | Convolution Conv_129 1 1 255 256 0=256 1=1 5=1 6=65536 79 | Swish Mul_131 1 1 256 258 80 | Split splitncnn_11 1 2 258 258_splitncnn_0 258_splitncnn_1 81 | Convolution Conv_132 1 1 258_splitncnn_1 259 0=512 1=3 3=2 4=1 5=1 6=1179648 82 | Swish Mul_134 1 1 259 261 83 | Convolution Conv_135 1 1 261 262 0=256 1=1 5=1 6=131072 84 | Swish Mul_137 1 1 262 264 85 | Split splitncnn_12 1 4 264 264_splitncnn_0 264_splitncnn_1 264_splitncnn_2 264_splitncnn_3 86 | Pooling MaxPool_138 1 1 264_splitncnn_3 265 1=5 3=2 5=1 87 | Pooling MaxPool_139 1 1 264_splitncnn_2 266 1=9 3=4 5=1 88 | Pooling MaxPool_140 1 1 264_splitncnn_1 267 1=13 3=6 5=1 89 | Concat Concat_141 4 1 264_splitncnn_0 265 266 267 268 90 | Convolution Conv_142 1 1 268 269 0=512 1=1 5=1 6=524288 91 | Swish Mul_144 1 1 269 271 92 | Split splitncnn_13 1 2 271 271_splitncnn_0 271_splitncnn_1 93 | Convolution Conv_145 1 1 271_splitncnn_1 272 0=256 1=1 5=1 6=131072 94 | Swish Mul_147 1 1 272 274 95 | Convolution Conv_148 1 1 274 275 0=256 1=1 5=1 6=65536 96 | Swish Mul_150 1 1 275 277 97 | Convolution Conv_151 1 1 277 278 0=256 1=3 4=1 5=1 6=589824 98 | Swish Mul_153 1 1 278 280 99 | Convolution Conv_154 1 1 271_splitncnn_0 281 0=256 1=1 5=1 6=131072 100 | Swish Mul_156 1 1 281 283 101 | Concat Concat_157 2 1 280 283 284 102 | Convolution Conv_158 1 1 284 285 0=512 1=1 5=1 6=262144 103 | Swish Mul_160 1 1 285 287 104 | Convolution Conv_161 1 1 287 288 0=256 1=1 5=1 6=131072 105 | Swish Mul_163 1 1 288 290 106 | Split splitncnn_14 1 2 290 290_splitncnn_0 290_splitncnn_1 107 | Interp Resize_165 1 1 290_splitncnn_1 295 0=1 1=2.000000e+00 2=2.000000e+00 108 | Concat Concat_166 2 1 295 258_splitncnn_0 296 109 | Split splitncnn_15 1 2 296 296_splitncnn_0 296_splitncnn_1 110 | Convolution Conv_167 1 1 296_splitncnn_1 297 0=128 1=1 5=1 6=65536 111 | Swish Mul_169 1 1 297 299 112 | Convolution Conv_170 1 1 299 300 0=128 1=1 5=1 6=16384 113 | Swish Mul_172 1 1 300 302 114 | Convolution Conv_173 1 1 302 303 0=128 1=3 4=1 5=1 6=147456 115 | Swish Mul_175 1 1 303 305 116 | Convolution Conv_176 1 1 296_splitncnn_0 306 0=128 1=1 5=1 6=65536 117 | Swish Mul_178 1 1 306 308 118 | Concat Concat_179 2 1 305 308 309 119 | Convolution Conv_180 1 1 309 310 0=256 1=1 5=1 6=65536 120 | Swish Mul_182 1 1 310 312 121 | Convolution Conv_183 1 1 312 313 0=128 1=1 5=1 6=32768 122 | Swish Mul_185 1 1 313 315 123 | Split splitncnn_16 1 2 315 315_splitncnn_0 315_splitncnn_1 124 | Interp Resize_187 1 1 315_splitncnn_1 320 0=1 1=2.000000e+00 2=2.000000e+00 125 | Concat Concat_188 2 1 320 224_splitncnn_0 321 126 | Split splitncnn_17 1 2 321 321_splitncnn_0 321_splitncnn_1 127 | Convolution Conv_189 1 1 321_splitncnn_1 322 0=64 1=1 5=1 6=16384 128 | Swish Mul_191 1 1 322 324 129 | Convolution Conv_192 1 1 324 325 0=64 1=1 5=1 6=4096 130 | Swish Mul_194 1 1 325 327 131 | Convolution Conv_195 1 1 327 328 0=64 1=3 4=1 5=1 6=36864 132 | Swish Mul_197 1 1 328 330 133 | Convolution Conv_198 1 1 321_splitncnn_0 331 0=64 1=1 5=1 6=16384 134 | Swish Mul_200 1 1 331 333 135 | Concat Concat_201 2 1 330 333 334 136 | Convolution Conv_202 1 1 334 335 0=128 1=1 5=1 6=16384 137 | Swish Mul_204 1 1 335 337 138 | Split splitncnn_18 1 2 337 337_splitncnn_0 337_splitncnn_1 139 | Convolution Conv_205 1 1 337_splitncnn_1 338 0=128 1=3 3=2 4=1 5=1 6=147456 140 | Swish Mul_207 1 1 338 340 141 | Concat Concat_208 2 1 340 315_splitncnn_0 341 142 | Split splitncnn_19 1 2 341 341_splitncnn_0 341_splitncnn_1 143 | Convolution Conv_209 1 1 341_splitncnn_1 342 0=128 1=1 5=1 6=32768 144 | Swish Mul_211 1 1 342 344 145 | Convolution Conv_212 1 1 344 345 0=128 1=1 5=1 6=16384 146 | Swish Mul_214 1 1 345 347 147 | Convolution Conv_215 1 1 347 348 0=128 1=3 4=1 5=1 6=147456 148 | Swish Mul_217 1 1 348 350 149 | Convolution Conv_218 1 1 341_splitncnn_0 351 0=128 1=1 5=1 6=32768 150 | Swish Mul_220 1 1 351 353 151 | Concat Concat_221 2 1 350 353 354 152 | Convolution Conv_222 1 1 354 355 0=256 1=1 5=1 6=65536 153 | Swish Mul_224 1 1 355 357 154 | Split splitncnn_20 1 2 357 357_splitncnn_0 357_splitncnn_1 155 | Convolution Conv_225 1 1 357_splitncnn_1 358 0=256 1=3 3=2 4=1 5=1 6=589824 156 | Swish Mul_227 1 1 358 360 157 | Concat Concat_228 2 1 360 290_splitncnn_0 361 158 | Split splitncnn_21 1 2 361 361_splitncnn_0 361_splitncnn_1 159 | Convolution Conv_229 1 1 361_splitncnn_1 362 0=256 1=1 5=1 6=131072 160 | Swish Mul_231 1 1 362 364 161 | Convolution Conv_232 1 1 364 365 0=256 1=1 5=1 6=65536 162 | Swish Mul_234 1 1 365 367 163 | Convolution Conv_235 1 1 367 368 0=256 1=3 4=1 5=1 6=589824 164 | Swish Mul_237 1 1 368 370 165 | Convolution Conv_238 1 1 361_splitncnn_0 371 0=256 1=1 5=1 6=131072 166 | Swish Mul_240 1 1 371 373 167 | Concat Concat_241 2 1 370 373 374 168 | Convolution Conv_242 1 1 374 375 0=512 1=1 5=1 6=262144 169 | Swish Mul_244 1 1 375 377 170 | Convolution Conv_245 1 1 337_splitncnn_0 378 0=255 1=1 5=1 6=32640 171 | Reshape Reshape_259 1 1 378 396 0=-1 1=85 2=3 172 | Permute Transpose_260 1 1 396 397 0=1 173 | Convolution Conv_261 1 1 357_splitncnn_0 398 0=255 1=1 5=1 6=65280 174 | Reshape Reshape_275 1 1 398 416 0=-1 1=85 2=3 175 | Permute Transpose_276 1 1 416 417 0=1 176 | Convolution Conv_277 1 1 377 418 0=255 1=1 5=1 6=130560 177 | Reshape Reshape_291 1 1 418 436 0=-1 1=85 2=3 178 | Permute Transpose_292 1 1 436 437 0=1 179 | -------------------------------------------------------------------------------- /yolov5s.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midasklr/yolov5ncnn/ac08ec886af8530e148d23d41b951d2299aa9f17/yolov5s.bin --------------------------------------------------------------------------------