自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(23)
  • 收藏
  • 关注

转载 tensorflow的坑

TFRecordReader “OutOfRangeError (see above for traceback): RandomShuffleQueue ‘_1_shuffle_batch/random_shuffle_queue’ is closed and has insufficient elements (requested 1, current size 0)” 问题原因总结;t...

2018-12-10 14:35:21 231

转载 opencv cmake编译错误

使用Cmake编译opencv源码遇到如下错误**CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake fil...

2018-06-02 11:05:36 13826

原创 C++遍历获取文件夹下面所有文件名

#include <iostream> #include <stdlib.h> #include <stdio.h> #include <string.h> #ifdef linux #include <unistd.h> #include <dirent.h> #endif #ifdef WIN32 #include <direct.h> #include

2017-11-20 09:13:38 4539

原创 使用opencv把图片拼接成视频

int joint() { //声明IplImage指针 IplImage* Image = NULL; CvVideoWriter* video = cvCreateVideoWriter(“F:\jdd\Traindepth2.avi”, 0, 10, cvSize(960, 540), 1); char filename[200];//保存图像名的数组

2017-11-18 16:16:42 1804

原创 使用opencv从mp4视频中抽帧并保存

使用oepncv有两种方法,一种是使用cvGrabFrame()+cvRetrieveFrame(),另一种是使用使用cvQueryFrame()。 http://blog.csdn.net/augusdi/article/details/11042329int main() { CvCapture *capture = NULL; IplImage *frame =

2017-11-10 15:58:17 6092

原创 提取caffe和ncnn的权重

之前用腾讯的ncnn的框架做灰度图分类,发现caffe和ncnn的结果不一致。 然后试着将caffe的caffemodel和ncnn的bin文件里面的权重提取出来。 1 提取caffemodel里的参数。#!/usr/bin/env python# 引入“咖啡”import caffeimport numpy as np# 使输出的参数完全显示# 若没有这一句,因为参数太多,中间会以省略号

2017-10-12 21:00:32 4084 4

原创 SSD编译问题

编译SSD的时候,make all -j16 出现了以下错误:/usr/include/boost/property_tree/detail/json_parser_read.hpp:257:264: error: ‘type name’ declared as function returning an arraymake: *** [.build_release/cuda/src/caffe

2017-09-04 23:07:05 628

原创 用caffe训练好的lenet_iter_10000.caffemodel测试单张mnist图片

原文链接:http://blog.csdn.net/lanxuecc/article/details/52485077 1 第一种方法,使用caffe自带的caffe/python/classify.py 因为classify.py中的测试接口caffe.Classifier需要训练图片的均值文件作为输入参数,而实际lenet-5训练时并未计算均值文件,所以这里创建一个全0的均值文件输入。编写一

2017-07-26 19:08:11 658

原创 Photoshop cc2015 批量切割图片

因为要制作数据集,要把很多大图(160*192)切割成小图(32*32),每个大图要切割成30份。1 首先新建动作 窗口—-动作,创建新动作,修改名称(假设为split),其他默认。 开始记录动作 “文件”-“打开”任意一张图片 点击左侧工具栏中的,右键“裁剪工具”,点击“切片选择工具” 右击图片,选择“划分切片” 自己调整参数: 划分后的效果预览

2017-07-18 21:48:27 5228

转载 faster rcnn cudnn版本不兼容问题

转载自http://blog.csdn.net/langxing1992/article/details/71440831 一般情况下,如果使用的是1080或者Titan的显卡,最好是使用CUDA8.0+cudnn5.1 可是最新的faster rcnn(https://github.com/rbgirshick/py-faster-rcnn)与cudnn 5.1,编译caffe-fast-rc

2017-07-18 14:59:16 621

原创 python核心模块之pickle和cPickle

pickle模块的功能就是执行序列化和反序列化,分别是通过dump()函数和load()函数完成的。dump()函数接受一个文件句柄和一个数据对象作为参数,把数据对象以特定的格式保存到给定的文件中。当我们使用load()函数从文件中取出已保存的对象时,pickle知道如何恢复这些对象到它们本来的格式。cPickle是pickle得一个更快得C语言编译版本。[这里写链接内容](http://bl

2017-05-03 12:07:36 374

原创 caffe中的normalization_layer

caffe-ssd里面有normalization的实现,包括.hpp,.cpp,.cu。其实现的是L2-normalization L2正则化的公式是: 现在来看caffe的代码实现。 首先是caffe.proto,这里面定义了normalization_parameter message NormalizeParameter { optional bool across_spa

2017-04-09 23:02:28 8077 2

转载 matlab中的randn randi rand randsrc的用法以及区别

1,rand 生成均匀分布的伪随机数。分布在(0~1)之间 主要语法:rand(m,n)生成m行n列的均匀分布的伪随机数 rand(m,n,’double’)生成指定精度的均匀分布的伪随机数,参数还可以 是’single’ rand(RandStream,m,

2017-03-25 19:50:16 9477

原创 matlab整理数据集

今天用matlab整理了一天的数据集,心好累。 原始数据是这样的,(152.0, 115.0, 167.0, 135.0), (221.0, 127.0, 240.0, 152.0)。 我需要把每个数字字符分出来。 关键代码如下: tline=fgets(fidin); %从文件读行 s=regexp(tline,'\([^)]*)','match'); %正则表达式,提取出每个括号中的内

2017-03-09 22:19:33 7040

原创 3 faster rcnn的anchor产生问题

这一部分是在rpn文件夹下面。 首先看generate_anchors.py。这个模块直接返回anchor。 anchor=[[ -83., -39., 100., 56.], [-175., -87., 192., 104.], [-359., -183., 376., 200.], [ -55., -55., 72.,

2017-03-02 22:26:46 3495

原创 faster rcnn中的roi-pooling层

本文就faster rcnn中的ZF网络来对roi-pooling层做一个解读 首先看网络结构, layer {name: “roi_pool_conv5” type: “ROIPooling” bottom: “conv5” bottom: “rois” top: “roi_pool_conv5” roi_pooling_param { pooled_

2017-03-01 11:46:09 10781 4

原创 leetcode 13 roman to integer

感觉13roman to integer比12integer to roman 要难一些。但是前者的难度是easy,后者难度是medium. 首先看下 integer to roman,string roman[][10] = { {"", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"},

2017-02-22 21:56:27 234

原创 Leetcode 11. Container With Most Water

Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lin

2017-02-20 15:34:11 369

原创 leetcode第八题 String to Integer (atoi)

题目要求: 1. 字串为空或者全是空格,返回0; 2. 字串的前缀空格需要忽略掉; 3. 忽略掉前缀空格后,遇到的第一个字符,如果是‘+’或‘-’号,继续往后读;如果是数字,则开始处理数字;如果不是前面的2种,返回0; 4. 处理数字的过程中,如果之后的字符非数字,就停止转换,返回当前值; 5. 在上述处理过程中,如果转换出的值超出了int型的范围,就返回int的最大值或最小值。 我一

2017-02-19 10:39:40 294

原创 leetcode第7题,Reverse Integer

Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Note: The input is assumed to be a 32-bit signed integer. Your function should return 0 when the reversed

2017-02-18 20:30:16 2467 1

原创 leetcode第5题,最长回文子串

一开始用的穷举法,时间直接超了,后来稍作修改才被accept,但是只是打败了70%的人。后来找到了大神写的代码,现在直接粘上如下: if (s.size() < 2) return s; int len = s.size(), max_left = 0, max_len = 1, left, right; for (int s

2017-02-17 19:04:02 478

原创 Python中的list,array

在python中,list是其内置数据类型,而array是numpy中的一个数据类型。 两者的区别在于: (1)list中的数据类不必相同的,而array的中的类型必须全部相同 (2) 在list中的数据类型保存的是数据的存放的地址,即通过链表实现的。而array是通过线性表实现的。 numpy中封装的array有很强大的功能。 下面来具体看一下。a=[[[1,2,3],[4,5

2016-12-11 23:26:47 502

原创 文章标题 caffe训练mnist数据集

1训练mnist数据集,首先运行以下脚本: ./examples/mni st/train_lenet.sh 打开该脚本,发现里面就一句话 ./build/tools/caffe train –solver=examples/mnist/lenet_solver.prototxt 这是调用编译好的build/tools/caffe.bin二进制文件,参数solver指定了训练超参数文件。

2016-12-05 11:07:11 596

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除