- 博客(267)
- 资源 (48)
- 收藏
- 关注

原创 Python一些基础知识
python 中[…]# coding=gbk'''Created on 2017年5月9日'''from scipy.misc.pilutil import * # read image ,read 会提示错误,但是不影响使用import matplotlib.pyplot as plt # show image import numpy as np # 两个方法都用...
2017-05-09 17:04:44
884

原创 Caffe 网络结构可视化
1.在线可视化Caffe:主入口: http://ethereon.github.io/netscope/quickstart.html快捷入口: http://ethereon.github.io/netscope/#/editor2.利用 python/draw_net.py 可视化。1.下载 protobuf-3.1.0-py2.py3-none-any.whlpip install pr
2017-03-15 15:36:29
1765

原创 资源网站
https://www.slideshare.net 不错的课程资源。http://www.allitebooks.com/ 免费电子书https://www.oschina.net/project 开源项目http://www.manong5.com/ 码农网,(全站资源免费下载)http://www.w3cschool.cn/python/ [各种语言学习]http://ww...
2017-03-10 15:20:01
1298
原创 mnist example for lstm in caffe
下面给出在caffe中使用lstm的一个例子,其中数据集采用mnist。在使用lstm中一定要注意clip_markers,每个序列以0开始,后面接1保持为当前序列。训练代码为:train_mnist_classification.py#coding=gbkimport numpy as npimport matplotlib.pyplot as pltimport scipy.i...
2019-03-15 21:01:07
1070
原创 LSTM 反向传播的理解
参考文献:https://blog.youkuaiyun.com/wjc1182511338/article/details/79285503 [LSTM详解 反向传播公式推导]
2019-03-09 15:10:17
1261
原创 lstm in pytorch
import torchimport torch.nn as nnimport torchvision.transforms as transformsimport torchvision.datasets as dsetsfrom torch.autograd import Variable'''STEP 1: LOADING DATASET'''train_dataset =...
2019-03-09 14:43:41
1237
原创 lstm in caffe
// Message that stores parameters used by RecurrentLayermessage RecurrentParameter { // The dimension of the output (and usually hidden state) representation -- // must be explicitly set to non-z...
2019-03-06 21:28:36
853
原创 import cv2 ImportError: DLL load failed
利用网上给出的方法无法解决时(例如文献2中)。使用dependencywalker查看cv2.pyd缺少哪个dll,下载注册即可。http://www.dependencywalker.com/参考文献:https://blog.youkuaiyun.com/yahstudio/article/details/81479462https://blog.youkuaiyun.com/u012318074/art...
2018-12-05 20:12:01
457
原创 Caffe-windows + Cuda10 + cudnn7.3.0 + RTX2080 Ti + Python 3.5 + Win10 + VS2017
caffe_windows : https://github.com/BVLC/caffe/tree/windowsVS2017: VS2017 professionalCuda10: cuda_10.0.130_411.31_win10.execudnn7.3.0: cudnn-10.0-windows10-x64-v7.3.0.29.zipRTX2080Ti: Turing 架构Py...
2018-11-30 09:20:50
7142
2
原创 将filter或者activation保存成图片。
在python代码中,将滤波器filter保存为.mat文件(这里是为了利用matlab写图片,当然也可以在python中直接写图片):filters = net.params['conv1'][0].data filters = (filters - filters.min()) / (filters.max() - filters.min()) ...
2018-11-23 19:18:32
342
原创 argmax in DNN
1 . 网址: https://www.reddit.com/r/MachineLearning/comments/4e2get/argmax_differentiable/
2018-11-21 21:26:09
473
原创 L.Tile layer in Caffe
test_tile_layer.py#coding=gbkimport numpy as npimport caffe# weight_file can be any prtrained modelsweight_file = '../attention_network/snapshots_aflw_vgg16_klLoss_finetune_attention1/cross1/vgg...
2018-11-13 20:31:02
1717
1
原创 produce gaussian heatmap for landmarks
% 28 * 28 for conv3% 14 * 14 for conv4% 7 * 7 for conv5close all;datas = load('datas5224_pure3.mat');datas = datas.datas;f = @(x,meanx,nSigma) exp(-1/2*(x-meanx)'*nSigma*(x-meanx));for i = 1:...
2018-11-09 21:20:38
1832
原创 align images using landmarks
clearall;%% titleinfo_=[ '文档的功能: 是实现对图像的标准化' ... ',标准化的方式采用将所有形状对齐的平均形状. \n'... '文档的创建时间为:2016/11/1/18:37 \n' ... '修改文档的时间为:2018/11/01/15:38'];%% contentdatas = load('datas_for_r...
2018-11-01 16:27:52
521
原创 AttributeError: 'Function' object has no attribute 'fn' [in caffe]
n.global_pool_prob3 = L.Sigmoid(n.global_pool_up3,name='global_pool_prob3',ntop=0,top='global_pool_up3') n.att_repmat3 = L.Tile(n.global_pool_prob3,tile_param={'axis':1,'tiles':256})报错产生的原因是,下一层使用的...
2018-11-01 09:20:30
3786
原创 eltwise sum over multiple channels 逐通道的相加in Caffe
//sum over 16 channelslayers { name: "sum_1" type: CONVOLUTION bottom: "conv_1" top: "sum_1" blobs_lr: 0 convolution_param { num_output: 1 bias_term: false kernel_size: 1 ...
2018-11-01 08:59:23
1266
原创 在python的单个脚本中顺序的执行批量的脚本
#coding=gbkimport sysimport train_task1sys.modules['train_task1'].__dict__.clear()import train_task2sys.modules['train_task2'].__dict__.clear()import train_task3sys.modules['train_task3']...
2018-10-10 13:53:15
3023
转载 latex数字字体
\documentclass{article}\usepackage[UTF8]{ctex}\usepackage{threeparttable}\usepackage[scale={0.9,0.9}]{geometry}\DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}%数学符号字体的设置%\usepackage{bm} % 粗斜体...
2018-10-10 09:31:57
14375
原创 利用visio保存成pdf时,保存的图像上有灰色的线.
如下图所示,生成的pdf中有灰色的边框,在放入到论文中灰色的边框也清晰可见,如何在生成的pdf中去掉灰色的边框呢?1.解: 以visio2016为例,文件——另存为——浏览——保存类型选择为pdf,然后在保存文件的“选项中”,将“辅助功能文档结构标记”取消选择。如下图:...
2018-09-25 09:17:19
7464
1
转载 python sys.path.append()和sys.path.insert()
转载自: https://blog.youkuaiyun.com/dcrmg/article/details/79546962python程序中使用 import XXX 时,python解析器会在当前目录、已安装和第三方模块中搜索 xxx,如果都搜索不到就会报错。 使用sys.path.append()方法可以临时添加搜索路径,方便更简洁的import其他包和模块。这种方法导入的路径会在python程...
2018-09-04 21:04:18
3954
2
原创 git 递归的下载@关联的子文件
git clone --recursive https://github.com/imistyrain/SSH-Windows.git
2018-09-03 19:42:17
2717
原创 Head Pose in AFLW dataset
理解AFLW数据集提供的头部姿态角度。close all;close all;dbpath = '../data/';dbfile = 'aflw.sqlite';model3d = createMeanFace3DModel(fullfile(dbpath,dbfile));% get one face_idmksqlite('open',fullfile(dbpath,d...
2018-09-01 22:13:06
2281
1
原创 ffmpeg从视频提取图片序列
ffmpeg for windows下载地址:https://pan.baidu.com/s/1e7ijrcu1wRWUANjNj4S00g下载完后,将ffmpeg可执行文件所在的目录添加到环境变量中。下面给出的是利用matlab调用ffmpeg进行批量处理的代码:exe_cmd = 'ffmpeg';root_path = 'E:/xuluhui/eclipse_workpl...
2018-07-20 20:20:30
1520
原创 Pytorch的mean和std调查
# coding: utf-8from __future__ import print_functionimport copyimport clickimport cv2import numpy as npimport torchfrom torch.autograd import Variablefrom torchvision import models, transfor...
2018-07-10 10:50:34
12730
原创 将int类型的数组转换为bool数组 in Python
#coding=UTF-8import numpy as np# int arrayarray1 = np.array([1,0,1,0])# convert int array to bool listlist1 = [True if array1[i]==0 else False for i in range(len(array1))]# convert bool list t...
2018-07-07 10:02:47
9207
2
原创 CelebA 40 种属性
01 5_o_Clock_Shadow 胡子 -1 02 Arched_Eyebrows 柳叶眉 1 03 Attractive 有魅力的 1 04 Bags_Under_Eyes 眼袋 -1 05 Bald 秃头的 -1 06 Bangs 刘海 -1 07 Big_Lips 大嘴唇 -1 08 Big_Nose 大鼻子 -1 09 Black_Hair 黑发 -1 1...
2018-06-22 19:33:53
5392
原创 caffe + python + float 产生 Inf ,从而触发NaN
损失函数在训练过程中,如果在刚开始的迭代过程中损失函数就发散变为了Inf 或者NaN,那么往往可以通过调节学习率来解决。另外一种情况是在迭代了数千次,例如我迭代了1800次,忽然出现损失函数为Inf或者NaN的情况,在我的实验情况下是由于caffe的python接口使用的是单精度float类型,在自己用python定义的层中,使用到了指数函数np.exp(a),当a的 值超过某个数时例如90,...
2018-06-13 11:12:40
1011
原创 Python savefig 去掉白色的margin
import matplotlib.pyplot as pltfig = plt.figure(frameon=False)fig.set_size_inches(w,h)ax = plt.Axes(fig, [0., 0., 1., 1.])ax.set_axis_off()fig.add_axes(ax)ax.imshow(your_image, aspect='normal')...
2018-05-16 15:21:05
5448
原创 OpenCV for Python
1. 注意: 彩色图像使用 OpenCV 加载时是 BGR 模式。但是 Matplotib 是 RGB 模式。所以彩色图像如果已经被 OpenCV 读取,那它将不会被 Matplotib 正 确显示。具体细节请看练习. 2. ...
2018-05-14 10:35:32
805
原创 Normalize Layer in Caffe
message NormalizeParameter { optional bool across_spatial = 1 [default = true]; // Initial value of scale. Default is 1.0 for all optional FillerParameter scale_filler = 2; // Whether or not s...
2018-05-12 21:40:17
4586
原创 Caffe Scale层
如果我们想原封不动的传送数据,也就是说建一个不做任何操作仅穿数据的层,可以利用Scale层,Python中写法如下: n.scale1 = L.Scale(n.pool2,name='scale1',param=dict(lr_mult=0),filler=dict(type="constant",value=1))生成的prototxt协议文件如下:layer { name:...
2018-05-08 19:31:27
10225
原创 Caffe+Python2.7+Window10 只报错运行时错误,不提示错误的详细信息
使用:Caffe+Python2.7+Window10 时,在eclipse或者pycharm的环境下,Caffe报错不提示错误的详细信息,仅给出下面的错误信息:I0508 10:57:00.947213 15508 net.cpp:139] Memory require*** Check failure stack trace: ***但是:Caffe + Python2.7 + Win...
2018-05-08 19:22:00
499
原创 convert vgg-face model weight from caffe to pytorch
#coding=UTF-8import torch import torch.nn as nnimport mathimport numpy as npfrom PIL import Image,ImageDrawimport matplotlib.pyplot as pltimport collectionsimport matplotlib.cm as cmfrom tor...
2018-05-02 21:27:46
1528
原创 Pytorch基础知识
1. 保存和加载整个模型(1) 保存和加载整个模型torch.save(model_object, 'model.pkl')model = torch.load('model.pkl')(2) 仅保存和加载模型参数(推荐使用)torch.save(model_object.state_dict(), 'params.pkl')model_object.load_stat...
2018-04-29 09:00:08
370
原创 问题的转换(1): center loss, l2-constrained softmax loss, a noise adaption layer
参考文献: 1.A Discriminative Feature Learning Approach for Deep Face Recognition 2.L2-constrained Softmax Loss for Discriminative Face Verification 3.Training deep neural-networks using a noise adapt...
2018-04-23 20:48:41
808
原创 DNN反向传播矢量化理解
下面只是方便理解,在神经网络的实现中,假定输入XX\mathbf X,每一行是一个样本,即形状可以表示为n×d1n×d1n\times d_1, 其经过线性层得到YY\mathbf Y,其每一行是一个样本,则形状可以表示为n×d2n×d2n\times d_2,则用公式可以表示为: Y=X∗WY=X∗W\mathbf Y = \mathbf X * W 形状为: n×d2=n×d1∗d1×d...
2018-04-23 11:14:03
518
原创 test pytorch
#coding=UTF-8import numpy as npimport torchfrom torch.autograd import Variableimport timeheight = 4000width = 3000height2 = 6000width2 = 5000a = np.random.random((height,width))b = np.r...
2018-04-21 12:06:03
978
转载 Windows不重启就使环境变量修改生效
在“我的电脑”->“属性”->“高级”->“环境变量”中增加或修改环境变量后,需重启系统才能使之生效。有没有什么方法可让它即时生效呢?下面介绍一种方法: 以修改环境变量“PATH”为例,修改完成后,进入DOS命令提示符,输入:set PATH=C: ,关闭DOS窗口。再次打开DOS窗口,输入:echo %PATH% ,可以发现“我的电脑”->“属性”->“高级”-...
2018-04-20 12:31:09
811
Charpter 3:Marker-less Augmented Reality工程
2013-11-23
非刚性人脸跟踪训练得到的文件
2013-11-02
霍夫线和霍夫圆变换
2013-11-02
数据结构及应用算法教程(修订版)工程代码
2013-11-02
Opencv实现追加视频(one after another)
2013-10-09
基于opencv的人脸表情识别的预处理
2013-09-30
基于opencv人眼定位算法(C++工程)
2013-09-27
gabor函数基于opencv1.0实现
2013-09-24
L1范数最小化算法的m文件生成的供C++调用的dll文件
2013-09-24
L1范数最小化算法matlab代码(修改过可用C调用)
2013-09-24
CS231 卷积神经网络(中文版,带书签)
2018-05-07
算法设计与分析课程设计论文-骑士问题、图着色问题、离散帝国竞争算法
2018-05-07
分离编译模式工厂模和式的理解
2017-04-01
Local Binary Features
2016-10-07
Unconstrained Face Alignment via Cascaded Compositional Learning
2016-09-13
Constrained Joint Cascade Regression Framework
2016-09-03
Localizing Parts of Faces Using a Consensus of Exemplars(部分理解)
2016-08-31
Proximal gradient method
2016-07-24
混合编程测试代码
2016-07-17
adaboost特征选择实验
2014-04-07
随机梯度下降法资料
2014-03-15
Mastering OpenCV中文版
2014-02-25
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人