zoukankan      html  css  js  c++  java
  • ncnn框架

    1、下载和编译ncnn

    git clone https://github.com/Tencent/ncnn
    cd ncnn
    mkdir build && cd build
    cmake ..      #编译目录下的CMakeLists.txt
    打开根目录下的CMakeLists.txt文件,定位到最后六行,修改如下:

    add_subdirectory(examples)
    # add_subdirectory(benchmark)
    add_subdirectory(src)
    if(NOT ANDROID AND NOT IOS)
    #add_subdirectory(tools)
    endif()

    打开examples的编译,关掉tools的编译

    make -j4
    make install
    

      

    2、在ncnnkuangjia/ncnn/examples目录中拷贝squeezenet_v1.1.bin、squeezenet_v1.1.param和synset_words.txt到ncnnkuangjia/ncnn/build/examples目录中  下载一张图片命名1.png

    ./squeezenet 1.png 

    可以看到结果

    3、在ncnnkuangjia/ncnn/examples 目录下有squeezenet.cpp代码

    旧版caffe模型转换成新版caffe模型

    /caffe/build/tools/upgrade_net_proto_text    deploy.prototxt    new_deplpy.prototxt
     ~/caffe/build/tools/upgrade_net_proto_binary       bvlc_alexnet.caffemodel        new_bvlc_alexnet.caffemodel
    

    新版caffe模型转ncnn模型

    ./ncnn/build/tools/caffe/caffe2ncnn   new_deplpy.prototxt   new_bvlc_alexnet.caffemodel      alexnet.param    alexnet.bin
  • 相关阅读:
    9月9号作业
    9月9号笔记
    jupyter的补充
    jupyter的使用
    9月6号作业
    编程语言的分类
    计算机组成
    计算机组成的补充
    面向对象基础
    9月2号作业
  • 原文地址:https://www.cnblogs.com/crazybird123/p/9332736.html
Copyright © 2011-2022 走看看