face alignment by 3000 fps系列学习总结(三)

训练

我们主要以3000fps matlab实现为叙述主体。

总体目标

  • 我们需要为68个特征点的每一个特征点训练5棵随机树,每棵树4层深,即为所谓的随机森林。

开始训练

  1. 分配样本
    事实上,对于每个特征点,要训练随机森林,我们需要从现有的样本和特征中抽取一部分,训练成若干个树。
    现在,我们有N(此处N=1622)个样本(图片和shape)和无数个像素差特征。训练时,对于每棵树,我们从N个样本采取有放回抽样的方法随机选取若干样本,再随机选取M个特征点。然后使用这些素材加以训练。这是一般的方法。不过为了简化,我们将N个样本平均分成5份,且允许彼此之间有重叠。然后分配好的样本用来作为68个特征点的共同素材。

示意图
代码:

    dbsize = length(Tr_Data);% rf = cell(1, params.max_numtrees);overlap_ratio = params.bagging_overlap;%重叠比例Q = floor(double(dbsize)/((1-params.bagging_overlap)*(params.max_numtrees))); %每颗树分配的样本个数Data = cell(1, params.max_numtrees); %为训练每棵树准备的样本数据
for t = 1:params.max_numtrees% calculate the number of samples for each random tree% train t-th random treeis = max(floor((t-1)*Q - (t-1)*Q*overlap_ratio + 1), 1); ie = min(is + Q, dbsize);Data{t} = Tr_Data(is:ie);
end

2.随机森林训练全程

代码:

% divide local region into grid
params.radius = ([0:1/30:1]');
params.angles = 2*pi*[0:1/36:1]';rfs = cell(length(params.meanshape), params.max_numtrees); %随机森林的大小为68*5%parfor i = 1:length(params.meanshape)
for i = 1:length(params.meanshape)rf = cell(1, params.max_numtrees);disp(strcat(num2str(i), 'th landmark is processing...'));for t = 1:params.max_numtrees% disp(strcat('training', {''}, num2str(t), '-th tree for', {''}, num2str(lmarkID), '-th landmark'));% calculate the number of samples for each random tree% train t-th random treeis = max(floor((t-1)*Q - (t-1)*Q*overlap_ratio + 1), 1); %样本的序号ie = min(is + Q, dbsize);max_numnodes = 2^params.max_depth - 1; %最大的节点数自然是满二叉树的节点个数rf{t}.ind_samples = cell(max_numnodes, 1); %节点包含的样本序号rf{t}.issplit     = zeros(max_numnodes, 1);%是否分割rf{t}.pnode       = zeros(max_numnodes, 1);rf{t}.depth       = zeros(max_numnodes, 1);%当前深度rf{t}.cnodes      = zeros(max_numnodes, 2);%当前节点的左右子节点序号rf{t}.isleafnode  = zeros(max_numnodes, 1); %判断节点是否是叶子节点rf{t}.feat        = zeros(max_numnodes, 4); %围绕特征点随机选取的2个点的坐标(r1,a1,r2,a2)rf{t}.thresh      = zeros(max_numnodes, 1); %分割节点的阈值rf{t}.ind_samples{1} = 1:(ie - is + 1)*(params.augnumber); %第t棵树的样本序号,也是根节点包含的样本序号rf{t}.issplit(1)     = 0;rf{t}.pnode(1)       = 0;rf{t}.depth(1)       = 1;rf{t}.cnodes(1, 1:2) = [0 0];rf{t}.isleafnode(1)  = 1;rf{t}.feat(1, :)     = zeros(1, 4);rf{t}.thresh(1)      = 0;num_nodes = 1; %num_nodes为现有的节点个数num_leafnodes = 1;%num_leafnodes为现有的叶子节点个数stop = 0;while(~stop)  %这个循环用于产生随机树,直到没有再可以分割的点num_nodes_iter = num_nodes; %num_nodes为现有的节点个数num_split = 0; %分割节点的个数for n = 1:num_nodes_iterif ~rf{t}.issplit(n) %如果第t棵树第n个节点已经分过,就跳过去if rf{t}.depth(n) == params.max_depth % || length(rf{t}.ind_samples{n}) < 20if rf{t}.depth(n) == 1  %应该去掉吧????????????????rf{t}.depth(n) = 1;endrf{t}.issplit(n) = 1; else% separate the samples into left and right path[thresh, feat, lcind, rcind, isvalid] = splitnode(i, rf{t}.ind_samples{n}, Data{t}, params, stage);%{if ~isvalidrf{t}.feat(n, :)   = [0 0 0 0];rf{t}.thresh(n)    = 0;rf{t}.issplit(n)   = 1;rf{t}.cnodes(n, :) = [0 0];rf{t}.isleafnode(n)   = 1;continue;end%}% set the threshold and featture for current noderf{t}.feat(n, :)   = feat;rf{t}.thresh(n)    = thresh;rf{t}.issplit(n)   = 1;rf{t}.cnodes(n, :) = [num_nodes+1 num_nodes+2]; %当前节点的左右子节点序号rf{t}.isleafnode(n)   = 0;% add left and right child nodes into the random treerf{t}.ind_samples{num_nodes+1} = lcind;rf{t}.issplit(num_nodes+1)     = 0;rf{t}.pnode(num_nodes+1)       = n;rf{t}.depth(num_nodes+1)       = rf{t}.depth(n) + 1;rf{t}.cnodes(num_nodes+1, :)   = [0 0];rf{t}.isleafnode(num_nodes+1)     = 1;rf{t}.ind_samples{num_nodes+2} = rcind;rf{t}.issplit(num_nodes+2)     = 0;rf{t}.pnode(num_nodes+2)       = n;rf{t}.depth(num_nodes+2)       = rf{t}.depth(n) + 1;rf{t}.cnodes(num_nodes+2, :)   = [0 0];rf{t}.isleafnode(num_nodes+2)  = 1;num_split = num_split + 1; %分割节点的次数,实际上一层分割节点的个数num_leafnodes = num_leafnodes + 1;num_nodes     = num_nodes + 2;endendendif num_split == 0stop = 1;elserf{t}.num_leafnodes = num_leafnodes;rf{t}.num_nodes     = num_nodes;           rf{t}.id_leafnodes = find(rf{t}.isleafnode == 1); end            endend% disp(strcat(num2str(i), 'th landmark is over'));rfs(i, :) = rf;
end

3.分裂节点全程
流程图:

代码:

function [thresh, feat, lcind, rcind, isvalid] = splitnode(lmarkID, ind_samples, Tr_Data, params, stage)if isempty(ind_samples)thresh = 0;feat = [0 0 0 0];rcind = [];lcind = [];isvalid = 1;return;
end% generate params.max_rand cndidate feature
% anglepairs = samplerandfeat(params.max_numfeat);
% radiuspairs = [rand([params.max_numfeat, 1]) rand([params.max_numfeat, 1])];
[radiuspairs, anglepairs] = getproposals(params.max_numfeats(stage), params.radius, params.angles);angles_cos = cos(anglepairs);
angles_sin = sin(anglepairs);% extract pixel difference features from pairspdfeats = zeros(params.max_numfeats(stage), length(ind_samples)); %所有的样本均要提取相应阶段的像素差特征,即比如说1000*541shapes_residual = zeros(length(ind_samples), 2);for i = 1:length(ind_samples)s = floor((ind_samples(i)-1)/(params.augnumber)) + 1; %共用样本的序号k = mod(ind_samples(i)-1, (params.augnumber)) + 1; %不能共用盒子,而是对于同一张图片的不同shape使用各自的盒子,使用余运算,显然小于params.augnumber,又加1,所以答案从1:params.augnumber% calculate the relative location under the coordinate of meanshape %x1=angles_cos(:, 1)).*radiuspairs(:, 1)pixel_a_x_imgcoord = (angles_cos(:, 1)).*radiuspairs(:, 1)*params.max_raio_radius(stage)*Tr_Data{s}.intermediate_bboxes{stage}(k, 3);pixel_a_y_imgcoord = (angles_sin(:, 1)).*radiuspairs(:, 1)*params.max_raio_radius(stage)*Tr_Data{s}.intermediate_bboxes{stage}(k, 4);pixel_b_x_imgcoord = (angles_cos(:, 2)).*radiuspairs(:, 2)*params.max_raio_radius(stage)*Tr_Data{s}.intermediate_bboxes{stage}(k, 3);pixel_b_y_imgcoord = (angles_sin(:, 2)).*radiuspairs(:, 2)*params.max_raio_radius(stage)*Tr_Data{s}.intermediate_bboxes{stage}(k, 4);% no transformation%{pixel_a_x_lmcoord = pixel_a_x_imgcoord;pixel_a_y_lmcoord = pixel_a_y_imgcoord;pixel_b_x_lmcoord = pixel_b_x_imgcoord;pixel_b_y_lmcoord = pixel_b_y_imgcoord;%}% transform the pixels from image coordinate (meanshape) to coordinate of current shape%以下计算出的都是中心化的坐标[pixel_a_x_lmcoord, pixel_a_y_lmcoord] = transformPointsForward(Tr_Data{s}.meanshape2tf{k}, pixel_a_x_imgcoord', pixel_a_y_imgcoord');    pixel_a_x_lmcoord = pixel_a_x_lmcoord';pixel_a_y_lmcoord = pixel_a_y_lmcoord';[pixel_b_x_lmcoord, pixel_b_y_lmcoord] = transformPointsForward(Tr_Data{s}.meanshape2tf{k}, pixel_b_x_imgcoord', pixel_b_y_imgcoord');pixel_b_x_lmcoord = pixel_b_x_lmcoord';pixel_b_y_lmcoord = pixel_b_y_lmcoord';     %转化为绝对坐标pixel_a_x = int32(bsxfun(@plus, pixel_a_x_lmcoord, Tr_Data{s}.intermediate_shapes{stage}(lmarkID, 1, k)));pixel_a_y = int32(bsxfun(@plus, pixel_a_y_lmcoord, Tr_Data{s}.intermediate_shapes{stage}(lmarkID, 2, k)));pixel_b_x = int32(bsxfun(@plus, pixel_b_x_lmcoord, Tr_Data{s}.intermediate_shapes{stage}(lmarkID, 1, k)));pixel_b_y = int32(bsxfun(@plus, pixel_b_y_lmcoord, Tr_Data{s}.intermediate_shapes{stage}(lmarkID, 2, k)));width = (Tr_Data{s}.width);height = (Tr_Data{s}.height);pixel_a_x = max(1, min(pixel_a_x, width)); %意思是 pixel_a_x应该介于1和width之间pixel_a_y = max(1, min(pixel_a_y, height));pixel_b_x = max(1, min(pixel_b_x, width));pixel_b_y = max(1, min(pixel_b_y, height));%取像素两种方法,一是img_gray(i,j);二是img_gray(k),k是按列数第k个元素pdfeats(:, i) = double(Tr_Data{s}.img_gray(pixel_a_y + (pixel_a_x-1)*height)) - double(Tr_Data{s}.img_gray(pixel_b_y + (pixel_b_x-1)*height));%./ double(Tr_Data{s}.img_gray(pixel_a_y + (pixel_a_x-1)*height)) + double(Tr_Data{s}.img_gray(pixel_b_y + (pixel_b_x-1)*height));% drawshapes(Tr_Data{s}.img_gray, [pixel_a_x pixel_a_y pixel_b_x pixel_b_y]);% hold off;shapes_residual(i, :) = Tr_Data{s}.shapes_residual(lmarkID, :, k);
endE_x_2 = mean(shapes_residual(:, 1).^2);
E_x = mean(shapes_residual(:, 1));E_y_2 = mean(shapes_residual(:, 2).^2);
E_y = mean(shapes_residual(:, 2));
% 整体方差,其中使用了方差的经典公式Dx=Ex^2-(Ex)^2
var_overall = length(ind_samples)*((E_x_2 - E_x^2) + (E_y_2 - E_y^2));% var_overall = length(ind_samples)*(var(shapes_residual(:, 1)) + var(shapes_residual(:, 2)));% max_step = min(length(ind_samples), params.max_numthreshs);
% step = floor(length(ind_samples)/max_step);
max_step = 1;var_reductions = zeros(params.max_numfeats(stage), max_step);
thresholds = zeros(params.max_numfeats(stage), max_step);[pdfeats_sorted] = sort(pdfeats, 2); %将数据打乱顺序,防止过拟合% shapes_residual = shapes_residual(ind, :);for i = 1:params.max_numfeats(stage) %暴力选举法,选出最合适的feature% for t = 1:max_stept = 1;ind = ceil(length(ind_samples)*(0.5 + 0.9*(rand(1) - 0.5)));threshold = pdfeats_sorted(i, ind);  % pdfeats_sorted(i, t*step); % thresholds(i, t) = threshold;ind_lc = (pdfeats(i, :) < threshold); %逻辑数组ind_rc = (pdfeats(i, :) >= threshold);% figure, hold on, plot(shapes_residual(ind_lc, 1), shapes_residual(ind_lc, 2), 'r.')% plot(shapes_residual(ind_rc, 1), shapes_residual(ind_rc, 2), 'g.')% close;% compute E_x_2_lc = mean(shapes_residual(ind_lc, 1).^2); %选出逻辑数组中为1的那些残差E_x_lc = mean(shapes_residual(ind_lc, 1));E_y_2_lc = mean(shapes_residual(ind_lc, 2).^2);E_y_lc = mean(shapes_residual(ind_lc, 2));var_lc = (E_x_2_lc + E_y_2_lc)- (E_x_lc^2 + E_y_lc^2);E_x_2_rc = (E_x_2*length(ind_samples) - E_x_2_lc*sum(ind_lc))/sum(ind_rc);E_x_rc = (E_x*length(ind_samples) - E_x_lc*sum(ind_lc))/sum(ind_rc);E_y_2_rc = (E_y_2*length(ind_samples) - E_y_2_lc*sum(ind_lc))/sum(ind_rc);E_y_rc = (E_y*length(ind_samples) - E_y_lc*sum(ind_lc))/sum(ind_rc);var_rc = (E_x_2_rc + E_y_2_rc)- (E_x_rc^2 + E_y_rc^2);var_reduce = var_overall - sum(ind_lc)*var_lc - sum(ind_rc)*var_rc;% var_reduce = var_overall - sum(ind_lc)*(var(shapes_residual(ind_lc, 1)) + var(shapes_residual(ind_lc, 2))) - sum(ind_rc)*(var(shapes_residual(ind_rc, 1)) + var(shapes_residual(ind_rc, 2)));var_reductions(i, t) = var_reduce;% end% plot(var_reductions(i, :));
end[~, ind_colmax] = max(var_reductions);%寻找最大差的序号
ind_max = 1;%{
if var_max <= 0isvalid = 0;
elseisvalid = 1;
end
%}
isvalid = 1;thresh =  thresholds(ind_colmax(ind_max), ind_max); %当前阈值feat   = [anglepairs(ind_colmax(ind_max), :) radiuspairs(ind_colmax(ind_max), :)];lcind = ind_samples(find(pdfeats(ind_colmax(ind_max), :) < thresh));
rcind = ind_samples(find(pdfeats(ind_colmax(ind_max), :) >= thresh));end

问题:训练时默认一旦可以分割节点,则必然分割成两部分。那么会不会出现选取一个阈值将剩余的样本都归于一类呢?
说明:

如图所示外面有一个current 坐标系,里面有mean_shape的中心化归一化的坐标。最里面是以一个特征点为中心取的极坐标。这份代码取r,θ来标注在特征点附近取到的任意两个像素点的坐标.可以说有三个坐标系(按前面顺序,分别称为坐标系一、二、三)。里面两个坐标系的尺寸一样,但是坐标原点不一样。

假定在坐标系三下,取到一像素点坐标为(x,y),而特征点在坐标系二的坐标为(x0,y0),则像素点在坐标系二的坐标为(x˜,y˜),则有:

(x˜,y˜)=(x,y)+(x0,y0)
.
又由前面一篇文章 《face alignment by 3000 fps系列学习总结(二)》中间进行的相似性变换,我们知道,将当前坐标由mean_shape的归一化中心化坐标转换为current_shape的中心化坐标,需要使用meanshape2tf变换。
即:
(x˜,y˜)/cR

进一步的,取中心化后得
(x˜,y˜)/cR+mean(immediateshape)=(x,y)+(x0,y0)cR+mean(immediateshape)=(x,y)cR+(x0,y0)cR+mean(immediateshape)=(x,y)cR+immediate_shape_at(x0,y0)

我们又知道:
cR=c˜R˜/immediate_bbox

所以上式= (x,y)immediate_bbox/{c˜R˜}+immediate_shape_at(x0,y0)
最后一句就解析清了代码的步骤:

  % calculate the relative location under the coordinate of meanshape %x1=angles_cos(:, 1)).*radiuspairs(:, 1)pixel_a_x_imgcoord = (angles_cos(:, 1)).*radiuspairs(:, 1)*params.max_raio_radius(stage)*Tr_Data{s}.intermediate_bboxes{stage}(k, 3);pixel_a_y_imgcoord = (angles_sin(:, 1)).*radiuspairs(:, 1)*params.max_raio_radius(stage)*Tr_Data{s}.intermediate_bboxes{stage}(k, 4);pixel_b_x_imgcoord = (angles_cos(:, 2)).*radiuspairs(:, 2)*params.max_raio_radius(stage)*Tr_Data{s}.intermediate_bboxes{stage}(k, 3);pixel_b_y_imgcoord = (angles_sin(:, 2)).*radiuspairs(:, 2)*params.max_raio_radius(stage)*Tr_Data{s}.intermediate_bboxes{stage}(k, 4);% no transformation%{pixel_a_x_lmcoord = pixel_a_x_imgcoord;pixel_a_y_lmcoord = pixel_a_y_imgcoord;pixel_b_x_lmcoord = pixel_b_x_imgcoord;pixel_b_y_lmcoord = pixel_b_y_imgcoord;%}% transform the pixels from image coordinate (meanshape) to coordinate of current shape%以下计算出的都是中心化的坐标[pixel_a_x_lmcoord, pixel_a_y_lmcoord] = transformPointsForward(Tr_Data{s}.meanshape2tf{k}, pixel_a_x_imgcoord', pixel_a_y_imgcoord');    pixel_a_x_lmcoord = pixel_a_x_lmcoord';pixel_a_y_lmcoord = pixel_a_y_lmcoord';[pixel_b_x_lmcoord, pixel_b_y_lmcoord] = transformPointsForward(Tr_Data{s}.meanshape2tf{k}, pixel_b_x_imgcoord', pixel_b_y_imgcoord');pixel_b_x_lmcoord = pixel_b_x_lmcoord';pixel_b_y_lmcoord = pixel_b_y_lmcoord';     %转化为绝对坐标pixel_a_x = int32(bsxfun(@plus, pixel_a_x_lmcoord, Tr_Data{s}.intermediate_shapes{stage}(lmarkID, 1, k)));pixel_a_y = int32(bsxfun(@plus, pixel_a_y_lmcoord, Tr_Data{s}.intermediate_shapes{stage}(lmarkID, 2, k)));pixel_b_x = int32(bsxfun(@plus, pixel_b_x_lmcoord, Tr_Data{s}.intermediate_shapes{stage}(lmarkID, 1, k)));pixel_b_y = int32(bsxfun(@plus, pixel_b_y_lmcoord, Tr_Data{s}.intermediate_shapes{stage}(lmarkID, 2, k)));width = (Tr_Data{s}.width);height = (Tr_Data{s}.height);pixel_a_x = max(1, min(pixel_a_x, width)); %意思是 pixel_a_x应该介于1和width之间pixel_a_y = max(1, min(pixel_a_y, height));pixel_b_x = max(1, min(pixel_b_x, width));pixel_b_y = max(1, min(pixel_b_y, height));%取像素两种方法,一是img_gray(i,j);二是img_gray(k),k是按列数第k个元素pdfeats(:, i) = double(Tr_Data{s}.img_gray(pixel_a_y + (pixel_a_x-1)*height)) - double(Tr_Data{s}.img_gray(pixel_b_y + (pixel_b_x-1)*height));

如此我们训练全程就搞懂了。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/259042.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

HDU 2049 不容易系列之(4)——考新郎( 错排 )

链接&#xff1a;传送门思路&#xff1a;错排水题&#xff0c;从N个人中选出M个人进行错排&#xff0c;即 C(n,m)*d[m]补充&#xff1a;组合数C(n,m)能用double计算吗&#xff1f;第二部分有解释 Part 1. 分别求出来组合数的分子和分母然后相除/******************************…

级联sql

select ID, PID, NAME,KEY from HS_DICT start with KEY HS_EXP_WORK_LOCATIONconnect by prior ID PID order by DISPLAYORDER转载于:https://www.cnblogs.com/dazhaxie/p/3483532.html

获取母版中的控件

1 通过findcontrol找控件ID需要在此事件中~因为Page_load中时是先内容页加载然后才是母版页加载 protected void Page_LoadComplete(object sender, EventArgs e) { Label2.Text "现在时间是" (Master.FindControl("Label1") as Label).Text; if (Reques…

linux服务器选ubantu或centos_如何通过SSH连接阿里云上的Linux系统

首先SSH是啥&#xff0c;维基一下&#xff1a;Secure Shell&#xff08;安全外壳协议&#xff0c;简称SSH&#xff09;是一种加密的网络传输协议&#xff0c;可在不安全的网络中为网络服务提供安全的传输环境[1]。SSH通过在网络中创建安全隧道来实现SSH客户端与服务器之间的连接…

face alignment by 3000 fps系列学习总结

我们主要讲一讲Github上给出的matlab开源代码《jwyang/face-alignment》的配置。 首先声明&#xff1a;本人第一次配置的时候也是参考了csdn一个作者和github给出的说明配置成功的。其实后来想想很简单的&#xff0c;但是可能对于初学者&#xff0c;还是有一定的困难。为此&am…

paypal之nodejs 框架 Kraken-js 源码分析

本文是基于 kraken-js 0.6.1 版本的 关于如何使用kraken-js 可以去看看官网的使用文档 点击这里 。kraken-js 是基于express之上的&#xff0c;目的在于让工程师更多的去关注代码逻辑&#xff0c;少关注自身的开发环境&#xff0c;所以他将express所有的一些公用的配置都写在了…

go build 参数_Go语言 通过go bulid -tags 实现编译控制

Go语言提供的build tag 条件编译特性&#xff0c;顾名思义&#xff0c;只有在特定条件下才会构建对应的代码。比如下面的源文件只有在设置debug构建标志时才会被构建&#xff1a;// build debugpackage mainvar buildMode "debug"可以用以下命令构建&#xff1a;go …

selinux 的管理

第十单元selinux 的管理一 显示及更改 SELINUX 模式getenforce ###显示selinux模式setenforce 0|1 ##0指permissive警告&#xff0c;1 表示 enforcing强制###vim /etc/sysconfig/selinux ###修改selinux开机状态###注&#xff1a;disable表示关闭&…

ubuntu15.10下安装opencv2.4.9python上调用opencv库

对于centos&#xff0c;可以参考&#xff1a;Install OpenCV-Python in Fedora 如果IPP难以下载可以在cmake时禁掉它&#xff0c;只需&#xff1a;cmake -DWITH_IPPOFF OpenCV3.3CUDA9.0 安装过程中遇到的问题&#xff0c;解析&#xff1a; https://blog.csdn.net/u014613745/a…

【转】jquery 注册事件的方法

原文链接&#xff1a;http://outofmemory.cn/code-snippet/2123/jquery-zhuce-event-method 1.使用事件名来绑定&#xff0c;可用的事件名有 change,click,dblclick,error,focus,focusin,focusout,keydown,keypress,keyup,mousedown,mouseenter,mouseleave,mousemove,mouseout,…

ffmpeg 时间戳

转http://blog.csdn.net/yfh1985sdq/article/details/5721953 AVpacket里的时间戳pts和dts.单位好像是us. 问 : 时间戳pts和dts,这里两个时间戳各有什么意义? 答 : 显示时间,解码时间. DTS&#xff1a;decoding time stamp PTS&#xff1a;presentation time stamp Generally …

键盘改键软件_一秒五键,一键三招,万种光污染,杜伽K310樱桃轴机械键盘感受...

机械键盘我一直用的青轴&#xff0c;或者各种其他名字但其实本质就是青轴的。喜欢青轴那种清脆的声音&#xff0c;在我听来如同山间小溪流水般的叮咚。不过这声音在夜间分外的具有穿透力&#xff0c;更会在人身体不好的时候难以承受&#xff0c;所以每每用过之后却又不得不换回…

ubuntu 15.10下cmake 的安装

因为原先ubuntu自带的cmake有点旧&#xff0c;就想着安装个最新的&#xff0c;可是直接安装卡在了某一步上&#xff0c;后面有说明。现将正确的安装方法列出来。1.卸载原有的版本sudo apt-get autoremove cmake2. 下载最新的cmake :https://cmake.org/download/3. 解压&#xf…

codeigniter钩子的使用

CodeIgniter 的钩子功能&#xff0c;使得我们可以在不修改系统核心文件的基础上&#xff0c;来改变或增加系统的核心运行功能。可是钩子究竟该怎么用呢&#xff1f;虽然不是很难&#xff0c;不过很多刚用ci的朋友可能还是不明白怎么用。 通过本文的简单实例&#xff0c;大家一下…

wxWidgets之wxGrid控件

1. 介绍wxGrid控件时wxWidgets界面库中内置的网格控件。通经常使用来显示表格数据。该控件拥有强大的功能。开发人员可依据自己的需求对其进行定制。 2. 经常使用API 构造函数&#xff1a;wxGrid ()wxGrid (wxWindow *parent, wxWindowID id, const wxPoint &poswxDef…

powerdesigner画关系图_想画好手绘,这些图你一定要画一下!

画好手绘除了对透视要深入了解掌握以及线条运用把握之外&#xff0c;还有很重要的就是要对空间物体的关系、比例、光影关系都要理解透彻。大体快可分割成多个x小体块。其实当年学习的绘画基础也是画好手绘的基础&#xff0c;画手绘依然需要去理解整体画面的空间黑白灰、物体穿插…

C#,pdf文件转换成图片文件。

本文采用Adobe Acrobat9.0的COM组件&#xff0c;将Pdf文件的每一页转换成对应的图片文件。 开发环境&#xff1a;VS2010&#xff0c;.Net Framework4.0&#xff0c;Adobe Acrobat9.0。 工程中添加COM引用&#xff1a;Adobe Acrobat 9.0 Type Library&#xff08;必须装了Adobe …

Android进程间通信

一.Linux系统进程间通信有哪些方式&#xff1f; 1.socket&#xff1b; 2.name pipe命名管道&#xff1b; 3.message queue消息队列&#xff1b; 4.singal信号量&#xff1b; 5.share memory共享内存&#xff1b; 二.Java系统的通信方式是什么&#xff1f; 1.socket; 2.name pip…

最新的一些开源face alignment及评价

dlib &#xff1a;https://github.com/davisking/dlib/tree/v18.18 评价&#xff1a;速度快&#xff0c;可商用&#xff0c;有些时候不太准确 2. CLM-framework: https://github.com/TadasBaltrusaitis/CLM-framework 评价:很准确&#xff0c;不可商用 3. Face Detection…

1048 石子归并

1048 石子归并 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 题目描述 Description有n堆石子排成一列&#xff0c;每堆石子有一个重量w[i], 每次合并可以合并相邻的两堆石子&#xff0c;一次合并的代价为两堆石子的重量和w[i]w[i1]。问安排怎样的合并顺序&#xf…