caffe学习--cifar10学习-ubuntu16.04-gtx650tiboost--1g--03--20171103
- classification ./examples/cifar10/cifar10_full.prototxt ./examples/cifar10/cifar10_full_iter_70000.caffemodel.h5 ./examples/cifar10/mean.binaryproto ./examples/cifar10/labels.txt ~/Downloads/images/horse/.jpg
- sea@sea-X550JK:~/caffe$ classification --help
- Usage: classification deploy.prototxt network.caffemodel mean.binaryproto labels.txt img.jpg
- classification models/bvlc_reference_caffenet/deploy.prototxt
- models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel
- models/bvlc_reference_caffenet/mean.binaryproto
- models/bvlc_reference_caffenet/labels.txt
- ~/Downloads/images/horse/.jpg
用cifar10训练的结果进行分类:
- python python/classify.py --model_def examples/cifar10/cifar10_quick.prototxt --pretrained_model examples/cifar10/cifar10_quick_iter_5000.caffemodel.h5 --center_only examples/images/cat.jpg foo
- python python/classify.py --model_def models/bvlc_reference_caffenet/deploy.prototxt --pretrained_model models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel --center_only examples/images/cat.jpg foo
- I1103 16:59:58.189568 25346 net.cpp:200] conv1 does not need backward computation.
- I1103 16:59:58.189571 25346 net.cpp:200] data does not need backward computation.
- I1103 16:59:58.189574 25346 net.cpp:242] This network produces output prob
- I1103 16:59:58.189584 25346 net.cpp:255] Network initialization done.
- I1103 16:59:58.303480 25346 upgrade_proto.cpp:44] Attempting to upgrade input file specified using deprecated transformation parameters: models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel
- I1103 16:59:58.303509 25346 upgrade_proto.cpp:47] Successfully upgraded file specified using deprecated data transformation parameters.
- W1103 16:59:58.303514 25346 upgrade_proto.cpp:49] Note that future Caffe releases will only support transform_param messages for transformation fields.
- I1103 16:59:58.303517 25346 upgrade_proto.cpp:53] Attempting to upgrade input file specified using deprecated V1LayerParameter: models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel
- I1103 16:59:58.504439 25346 upgrade_proto.cpp:61] Successfully upgraded file specified using deprecated V1LayerParameter
- I1103 16:59:58.559579 25346 net.cpp:744] Ignoring source layer loss
- /usr/local/lib/python2.7/dist-packages/skimage/transform/_warps.py:84: UserWarning: The default mode, 'constant', will be changed to 'reflect' in skimage 0.15.
- warn("The default mode, 'constant', will be changed to 'reflect' in "
- Loading file: examples/images/cat.jpg
- Classifying 1 inputs.
- Done in 1.20 s.
- Predictions : [[ 7.96905475e-09 2.68402800e-05 4.61699550e-08 5.81401345e-08
- 3.00355154e-08 1.08543240e-07 7.21305184e-08 6.65618529e-07
- 4.10124194e-05 8.26508540e-07 2.64434061e-06 4.29981719e-06
- 2.29038033e-05 9.16178294e-07 2.02221463e-06 1.91530648e-06
- 8.36403979e-06 5.25011237e-05 1.32120860e-07 7.34086640e-08
- 7.26202700e-07 6.55063502e-07 2.83661024e-07 8.35531750e-08
- 1.45248293e-07 3.21299929e-08 5.94506417e-08 1.11880944e-07
- 2.61020752e-08 1.33058847e-05 2.00340565e-07 7.72992621e-08
- 2.47393245e-07 5.60683127e-08 7.26820346e-08 2.93914972e-08
- 8.09441403e-08 1.17543671e-07 1.24727379e-07 1.14408145e-07
- sea@sea-X550JK:~/caffe$ python readFromFooAndShow.py
- sz = 4112
- nl.shape = (1, 1000)
- ssdict = [(281, 0.30427486), (285, 0.1783575), (282, 0.16652611), (287, 0.15713461), (278, 0.042343788), (277, 0.039970074),
(283, 0.011617188), (876, 0.0085467361), (284, 0.0076080137), (463, 0.0066294265), (904, 0.0065242196), (968, 0.0063064895),
(259, 0.0051229554), (330, 0.0046631121), (760, 0.0044421358), (478, 0.0042510382), (331, 0.0039331503), (728, 0.003812969),
(280, 0.0035846629), (588, 0.0033092475), (861, 0.0028945252), (332, 0.0026644215), (333, 0.0022166823), (151, 0.0021597522),
(356, 0.0018406865), (552, 0.0016959301), (435, 0.00094394217), (896, 0.00084631733), (937, 0.00082845741), (335, 0.00076790486),
(897, 0.0007364807), (519, 0.00072649814), (674, 0.00063642312), (457, 0.00062823156), (263, 0.00055513595), (969, 0.00043508445),
(773, 0.00041424474), (794, 0.00039454823), (230, 0.00037321725), (534, 0.00036081325), (104, 0.00032497221), (272, 0.00032023937),
(473, 0.0003057541), (725, 0.00030245754), (742, 0.00029926837), (722, 0.00028606801), (987, 0.00024712173), (622, 0.00024177019),
(274, 0.00023734267),
下面是分类的过程bvlc_reference_caffenet:
模型bvlc_reference_caffenet 是用于分类的:
- BAIR Reference CaffeNet in
models/bvlc_reference_caffenet
: AlexNet trained on ILSVRC 2012, with a minor variation from the version as described in ImageNet classification with deep convolutional neural networks by Krizhevsky et al. in NIPS 2012. (Trained by Jeff Donahue @jeffdonahue)
- ./build/examples/cpp_classification/classification.bin \
- models/bvlc_reference_caffenet/deploy.prototxt \
- models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel \
- data/ilsvrc12/imagenet_mean.binaryproto \
- data/ilsvrc12/synset_words.txt \
- examples/images/cat.jpg
- sea@sea-X550JK:~/caffe$ ./build/examples/cpp_classification/classification.bin \
- > models/bvlc_reference_caffenet/deploy.prototxt \
- > models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel \
- > data/ilsvrc12/imagenet_mean.binaryproto \
- > data/ilsvrc12/synset_words.txt \
- > examples/images/cat.jpg
- ---------- Prediction for examples/images/cat.jpg ----------
- 0.3134 - "n02123045 tabby, tabby cat"
- 0.2380 - "n02123159 tiger cat"
- 0.1235 - "n02124075 Egyptian cat"
- 0.1003 - "n02119022 red fox, Vulpes vulpes"
- 0.0715 - "n02127052 lynx, catamount"
预测的实例/图像/————————cat.jpg
“n02123045 46 6猫,虎斑猫”
“n02123159 0.2380老虎猫”
“n02124075 0.1235埃及猫”
“n02119022 0.1003赤狐,狐狐”
“n02127052猞猁,0.0715美洲豹”
- ./build/examples/cpp_classification/classification.bin \
- models/bvlc_reference_caffenet/deploy.prototxt \
- models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel \
- data/ilsvrc12/imagenet_mean.binaryproto \
- data/ilsvrc12/synset_words.txt \
- /home/sea/Downloads/images/person.jpeg
- /home/sea/Downloads/images/person.jpeg
- ---------- Prediction for /home/sea/Downloads/images/person.jpeg ----------
- 0.8322 - "n04350905 suit, suit of clothes"
- 0.0799 - "n04591157 Windsor tie"
- 0.0588 - "n02883205 bow tie, bow-tie, bowtie"
- 0.0051 - "n10148035 groom, bridegroom"
- 0.0041 - "n02865351 bolo tie, bolo, bola tie, bola"
“n04350905 0.8322服,服之衣”
“n04591157 0.0799领带。”
“n02883205 0.0588蝴蝶结领带,领结,bowtie”
“n10148035马夫,bridegroom率”
“n02865351联络0.0041蛋糕,蛋糕,球铁,球”
识别装修图片:
- ./build/examples/cpp_classification/classification.bin \
- models/bvlc_reference_caffenet/deploy.prototxt \
- models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel \
- data/ilsvrc12/imagenet_mean.binaryproto \
- data/ilsvrc12/synset_words.txt \
- /home/sea/Downloads/images/a.jpg
- > /home/sea/Downloads/images/a.jpg
- ---------- Prediction for /home/sea/Downloads/images/a.jpg ----------
- 0.3274 - "n04081281 restaurant, eating house, eating place, eatery"
- 0.1335 - "n03761084 microwave, microwave oven"
- 0.1196 - "n03661043 library"
- 0.0768 - "n04553703 washbasin, handbasin, washbowl, lavabo, wash-hand basin"
- 0.0710 - "n03742115 medicine chest, medicine cabinet"
- 0.3274“n04081281餐厅,吃房子,吃的地方,餐馆”
- 0.1335“n03761084微波,微波炉”
- 0.1196“n03661043图书馆”
- 0.0768“n04553703洗脸盆,洗手盆,洗脸盆,洗手盆,洗手盆”
- 0.0710“n03742115药箱,药箱”
目标检测、定位的+目标识别的fetch_faster_rcnn_models:
https://github.com/rbgirshick/py-faster-rcnn/blob/master/data/scripts/fetch_faster_rcnn_models.sh
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
Download pre-computed Faster R-CNN detectors cd $FRCN_ROOT
./data/scripts/fetch_faster_rcnn_models.sh This will populate the $FRCN_ROOT/data folder with faster_rcnn_models. See data/README.md for details. These models were trained on VOC 2007 trainval.
ref https://github.com/rbgirshick/py-faster-rcnn/blob/master/data/scripts/fetch_faster_rcnn_models.sh
目标检测--resnet-50:
- ./build/examples/cpp_classification/classification.bin \
- /media/sea/wsWin10/wsWindows10/ws_caffe/model-zoo/ResNet-50/deploy.prototxt \
- /media/sea/wsWin10/wsWindows10/ws_caffe/model-zoo/ResNet-50/ResNet-50-model.caffemodel \
- data/ilsvrc12/imagenet_mean.binaryproto \
- data/ilsvrc12/synset_words.txt \
- /home/sea/Downloads/images/a.jpg
人脸识别的:
caffe学习--cifar10学习-ubuntu16.04-gtx650tiboost--1g--03--20171103的更多相关文章
- caffe学习--cifar10学习-ubuntu16.04-gtx650tiboost--1g--02
caffe学习--cifar10学习-ubuntu16.04-gtx650tiboost--1g--02 训练网络: caffe train -solver examples/cifar10/cifa ...
- caffe学习一:ubuntu16.04下跑Faster R-CNN demo (基于caffe). (亲测有效,记录经历两天的吐血经历)
兜兜转转,兜兜转转; 一次有一次,这次终于把Faster R-CNN 跑通了. 重要提示1:在开始跑Faster R-CNN之前一定要搞清楚用的是Python2 还是Python3. 不然你会无限次陷 ...
- 深度学习环境配置Ubuntu16.04+CUDA8.0+CUDNN5
深度学习从12年开始打响,配置深度学习环境软件一直是一个头疼的问题,如何安装显卡驱动,如何安装CUDA,如何安装CUDNN:Ubuntu官方一直吐槽Nvidia显卡驱动有问题,网上大神也给出了关闭li ...
- 深度学习环境配置:Ubuntu16.04安装GTX1080Ti+CUDA9.0+cuDNN7.0完整安装教程(多链接多参考文章)
本来就对Linux不熟悉,经过几天惨痛的教训,参考了不知道多少篇文章,终于把环境装好了,每篇文章或多或少都有一些用,但没有一篇完整的能解决我安装过程碰到的问题,所以决定还是自己写一篇我安装过程的教程, ...
- 深度学习环境配置:Ubuntu16.04下安装GTX1080Ti+CUDA9.0+cuDNN7.0完整安装教程(多链接多参考文章)
本来就对Linux不熟悉,经过几天惨痛的教训,参考了不知道多少篇文章,终于把环境装好了,每篇文章或多或少都有一些用,但没有一篇完整的能解决我安装过程碰到的问题,所以决定还是自己写一篇我安装过程的教程, ...
- caffe学习--cifar10学习-ubuntu16.04-gtx650tiboost--1g--01
引用了下文的资料,在此感谢! http://www.cnblogs.com/alexcai/p/5468164.html http://blog.csdn.net/garfielder007/arti ...
- ROS入门学习(基于Ubuntu16.04+kinetic)
本文主要部分全部来源于ROS官网的Tutorials. Setup roscore # making sure that we have roscore running rosrun turtlesi ...
- Ubuntu16.04+cuda8.0rc+opencv3.1.0+caffe+Theano+torch7搭建教程
https://blog.csdn.net/jywowaa/article/details/52263711 学习中用到深度学习的框架,需要搭建caffe.theano和torch框架.经过一个月的不 ...
- win10安装ubuntu16.04及后续配置
原文地址:https://www.jianshu.com/p/842e36a8255c UEFI 模式下win10安装ubuntu16.04双系统教程 - baobei0112的专栏 - CSDN博客 ...
随机推荐
- iOS 之 判断是否是第一次打开app
/** App判断第一次启动的方法 */ NSString *key = @"isFirst"; BOOL isFirst = [[NSUserDefaults standardU ...
- Why Namespace?
上一节我们讨论了 Neutron 将虚拟 router 放置到 namespace 中实现了不同 subnet 之间的路由.今天探讨为什么要用 namespace 封装 router? 回顾一下前面的 ...
- 后缀数组基本问题QAQ
以下题目均来自罗穗骞的论文... No.1最长公共前缀 最长公共前缀: 题目: 给定一个字符串,询问某两个后缀的最长公共前缀. 分析: 某两个后缀的最长公共前缀就是区间height最小值,转化为RMQ ...
- using要写多少
原文发布时间为:2009-10-25 -- 来源于本人的百度文章 [由搬家工具导入] 有时候未必要像默认的这样要using这么多。。。 using System;using System.Data;u ...
- cobbler一键部署centos7.4(脚本)
执行脚本之前你需要做四件事 1. 关闭防火墙 2.关闭selinux 3.配置163或者阿里云的 yum源 4.上传centos7.4的镜像如下图 [root@cobbler ~]# cat auto ...
- Python Challenge 第十一关
第十一关,一张模糊的图,题目为 odd even,源代码中也没任何提示,看来又是图像处理. 这张模糊的图看起来没什么头绪,但是题目给了个奇数和偶数,就先试试坐标吧,根据原图来生成一个新图.我第一次尝试 ...
- openshift scc解析
SCC使用UserID,FsGroupID以及supplemental group ID和SELinux label等策略,通过校验Pod定义的ID是否在有效范围内来限制pod的权限.如果校验失败,则 ...
- JAVA基础之List接口
个人理解: list接口是Collection接口的子类,其继承了Collection接口的所有方法,但也有其独有的方法,不过在迭代的时候不要进行任何操作.牢记数据存储的四种结构:堆栈.队列.数组.链 ...
- iOS 在Xcode中使用OpenSSL库
最近要做一个密码键盘,想内置一些加密算法,所以就想到了添加OpenSSL库,现在mac也自带了OpenSSL库,但是每次都从终端是生成是很麻烦的.网上找了很多文档.博客去介绍如何编译可以在Xcode中 ...
- MySQL中批量删除指定前缀表的sql语句
有时候我们在安装一些cms的时候,这些cms都是带表前缀的方便区分数据,但有时候我们测试完需要删除的时候又有别的前缀表就可以参考下面的方法 代码如下:Select CONCAT( 'drop tabl ...