Caffe-Caffe Models

1.bvlc_reference_caffenet.caffemodel

来源:caffe中ImageNet tutorial(Brew ImagesnNet)训练结果
Paper:ImageNet Classification with Deep Convolutional Neural Networks(NIPS2012  Alex Krizhevsky   Ilya Sutskever   Geoffrey E. Hinton)

This model is the result of following the Caffe ImageNet model training instructions. It is a replication of the model described in the AlexNet publication with some differences:

    • not training with the relighting data-augmentation;
    • the order of pooling and normalization layers is switched (in CaffeNet, pooling is done before normalization).

This model is snapshot of iteration 310,000. The best validation performance during training was iteration 313,000 with validation accuracy 57.412% and loss 1.82328. This model obtains a top-1 accuracy 57.4% and a top-5 accuracy 80.4% on the validation set, using just the center crop. (Using the average of 10 crops, (4 + 1 center) * 2 mirror, should obtain a bit higher accuracy still.)

This model was trained by Jeff Donahue @jeffdonahue

AlexNet:

deploy.prototxt:

train_val.prototxt:

2.LeNet





3.finetune_flickr_style.caffemodel

Target:
        Fine-tuning CaffeNet for Style Recognition on “Flickr Style” Data.
Info:
        Fine-tuning takes an already learned model, adapts the architecture, and resumes training from the already learned model weights. Let’s fine-tune the BVLC-distributed CaffeNet model on a different dataset, Flickr Style, to predict image style instead of object category.
结构图如下:

deploy.prototxt


train_val.prototxt





















  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
1. 安装依赖 首先需要安装 Caffe 和一些相关的依赖项: sudo apt-get update sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler sudo apt-get install --no-install-recommends libboost-all-dev sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev 2. 下载源码 下载 Caffe 的源码,建议使用 GitHub 上的官方仓库: git clone https://github.com/weiliu89/caffe.git 3. 编译 Caffe 进入 Caffe 的根目录,然后执行以下命令进行编译: cd caffe cp Makefile.config.example Makefile.config make all -j8 make test -j8 make runtest -j8 4. 下载预训练模型 下载 SSD 的预训练模型,可以从以下链接中选择: https://github.com/weiliu89/caffe/tree/ssd#models 将下载好的模型放到 Caffe 的根目录下的 models 目录中。 5. 测试 SSD 在 Caffe 的根目录下执行以下命令,测试 SSD 的效果: ./build/tools/caffe test \ --model=models/VGGNet/VOC0712/SSD_300x300/deploy.prototxt \ --weights=models/VGGNet/VOC0712/SSD_300x300/VGG_VOC0712_SSD_300x300_iter_120000.caffemodel \ --iterations=5000 \ --gpu=0 6. 使用 SSD 如果已经成功测试了 SSD,就可以在自己的代码中使用它了。需要引入以下头文件: #include "caffe/caffe.hpp" #include "caffe/util/db.hpp" #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/net.hpp" #include "caffe/proto/caffe.pb.h" #include "caffe/layers/input_layer.hpp" #include "caffe/layers/conv_layer.hpp" #include "caffe/layers/pooling_layer.hpp" #include "caffe/layers/softmax_layer.hpp" #include "caffe/layers/relu_layer.hpp" #include "caffe/layers/detection_output_layer.hpp" 然后可以通过以下方式加载模型: caffe::Net<float> net("models/VGGNet/VOC0712/SSD_300x300/deploy.prototxt", caffe::TEST); net.CopyTrainedLayersFrom("models/VGGNet/VOC0712/SSD_300x300/VGG_VOC0712_SSD_300x300_iter_120000.caffemodel"); 最后就可以使用 SSD 进行目标检测了。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值