-
2019-03-10 11:36:30
光流法
光流法SIFT Flow: Dense Correspondence across Scenes and its Applications采用光流的思想进行稠密点的匹配。
研究生期间做过基于光流法的目标跟踪,这里回顾一下光流法。- 亮度恒定,同一点随时间的变化,其亮度不会发生改变,这是基本光流法的假定;
- 小运动,时间的变化不会引起位置的剧烈变化,这样灰度才能对位置求偏导(换句话说,小运动情况下,我们才能用前后帧之间单位位置变化引起的灰度变化去近似灰度对位置的偏导数);
- 空间一致,一个场景上邻近点投影到图像上也是邻近点,且邻近点速度一致。这是Lucas-Kanade光流法特有的假定。因为光流法的基本方程约束只有一个,而要求x、y方向的速度,有两个未知变量。我们假定特征点邻域内做相似运动,就可以使用多个方程求解x、y方向的速度。
光流法用在双目视觉上,只需要考虑水平方向的光流速度。
分析低纹理区域可以使用轮廓信息 In between the sparse and dense representation is correspondence on contours, which has been used in tracking objects and analyzing motion for textureless objects.遮挡问题可以使用在markov random field上利用belief propagation和graph cut优化目标函数。dense SIFT descriptors and visualization
对图像上每一个点只进行128维特征提取,per-pixel SIFT description 利用PCA提取前三位特征,映射到GRB空间,这一步用来可视化,匹配采用的是128D SIFT.
matching objective
希望sift描述子可以像flow vectors一样进行匹配:
- flow field应该是smooth的;
- 边缘区不连续;
- 能量函数有三部分:
- data term (损失函数,sift特征随光流特征运动)
- small displacement term (对光流的约束,小运动)
- smoothness term (对光流的约束,空间一致)
- 考虑到匹配中的离群点和光流不连续性,数据项和平滑项用L1距离约束。
解这个方程:采用dual-layer loopy belief propagation.平滑项将水平光流和竖直方向的光流去耦合。
coarse-to-fine matching scheme
计算量太大,利用金字塔,先得到一个coarse的结果,然后逐步propagate和refine。 SIFT pyramid
实验
可以用来做很多事dense scene alignment application
更多相关内容 -
图像配准Flow场二维可视化——SIFT Flow Matlab可视化代码
2021-01-10 13:05:54图像配准中估计出的Flow场的可视化,与FlowNet以及SIFT Flow文章的可视化策略相同 -
SIFTFLOW代码解析
2020-04-19 09:44:10SIFTFLOW代码解析) 下面展示一些 内联代码片。 几个关键步骤: 1.Compute the dense SIFT image:Sift1=dense_sift(im1,patchsize,gridspacing); 2.SIFT flow matching:[vx,vy,energylist]=SIFTflowc2f(Sift1,Sift...下面展示一些
内联代码片
。几个关键步骤:
1.Compute the dense SIFT image:Sift1=dense_sift(im1,patchsize,gridspacing);
2.SIFT flow matching:[vx,vy,energylist]=SIFTflowc2f(Sift1,Sift2,SIFTflowpara)
3.warp:warpI2=warpImage(Im2,vx,vy)dense_sift: 功能:提取一张图片的各个点的sift特征,输入数据为(输入图像,再周围patchsize*patchsize范围提取特征,) 假设输入图像大小:450*416*3,patchsize=8,gridspacing=1 返回结果:sift_arr:444*410*128.因为pathsize边角的不处理,所以sift_arr的H,W减少,128=num_angles*num_bins*num_bins=8*4*4,其中num_bins表示我们再patchSzie中选择几个,如果num_bins=4,patchSize=8,表示采样间隔为2;num_angles表示我们把(-pi,pi)分为几个范围(anglesbin),当num_angles=8时,angle_step = 2 * pi / num_angles=pi/4。sift_arr中每个元素的值是梯度方向与大小的编码(梯度方向为梯度的方向角与anglebin差值的cos,梯度大小作为权重)。 grid_x, grid_y表示我们计算sift_arr在图中对应的位置的坐标。 function [sift_arr, grid_x, grid_y] = dense_sift(I, patch_size, grid_spacing) I = double(I); I = mean(I,3); I = I /max(I(:)); % parameters num_angles = 8; %把(-pi,pi)的方向角分为8个anglebins num_bins = 4; %在patchSize中采样4个值 num_samples = num_bins * num_bins; alpha = 9; %% parameter for attenuation of angles (must be odd) angle_step = 2 * pi / num_angles; %num_angles = 8 所以angle_step=0.7854 angles = 0:angle_step:2*pi; %[0,0.785398163397448,1.570796326794897,2.356194490192345,3.141592653589793,3.926990816987241,4.712388980384690,5.497787143782138,6.283185307179586] angles(num_angles+1) = []; % bin centers [hgt wid] = size(I); %计算梯度方向和梯度大小,用来编码特征的值 [G_X,G_Y]=gen_dgauss(sigma_edge); %求x方向,y方向边缘的核函数 I_X = filter2(G_X, I, 'same'); % vertical edges 和I大小相同 I_Y = filter2(G_Y, I, 'same'); % horizontal edges I_mag = sqrt(I_X.^2 + I_Y.^2); % gradient magnitude I_theta = atan2(I_Y,I_X);%每个点的边缘的方向角,和I尺寸相同 I_theta(find(isnan(I_theta))) = 0; % necessary???? % grid grid_x = patch_size/2:grid_spacing:wid-patch_size/2+1;%I尺寸为450*416时,grid_x为4,5,6,....413 grid_y = patch_size/2:grid_spacing:hgt-patch_size/2+1; % make orientation images I_orientation = zeros([hgt, wid, num_angles], 'single');%hgt=450, wid=416, num_angles=8 % for each histogram angle cosI = cos(I_theta); sinI = sin(I_theta); %这里计算得到的 I_orientation是该点的方向角与各个bins中心的方向角的差值的cos,然后以该点的梯度的大小作为权重 for a=1:num_angles % compute each orientation channel % cos(I-angle(a))=coscos+sinsin,I是计算角度,abgle(a)是中心角度 tmp = (cosI*cos(angles(a))+sinI*sin(angles(a))).^alpha; tmp = tmp .* (tmp > 0); % weight by magnitude I_orientation(:,:,a) = tmp .* I_mag; end % Convolution formulation: weight_kernel = zeros(patch_size,patch_size); r = patch_size/2; %4 cx = r - 0.5; %3.5 sample_res = patch_size/num_bins;%8/4=2 weight_x = abs((1:patch_size) - cx)/sample_res; weight_x = (1 - weight_x) .* (weight_x <= 1); %[0,0.250000000000000,0.750000000000000,0.750000000000000,0.250000000000000,0,0,0] %weight_kernel = weight_x' * weight_x; %这里:因为我们统计像素中心pathcsize*patchsize范围的特征值,所以离中心越近,权重就越大,越远权重越小 for a = 1:num_angles %I_orientation(:,:,a) = conv2(I_orientation(:,:,a), weight_kernel, 'same'); I_orientation(:,:,a) = conv2(weight_x, weight_x', I_orientation(:,:,a), 'same'); %conv2二维卷积,weightx'变为列矩阵,conv2(u,v,A) 首先求 A 的各列与向量 u 的卷积,然后求每行结果与向量 v 的卷积。 end % Sample SIFT bins at valid locations (without boundary artifacts) % find coordinates of sample points (bin centers) [sample_x, sample_y] = meshgrid(linspace(1,patch_size+1,num_bins+1)); sample_x = sample_x(1:num_bins,1:num_bins); sample_x = sample_x(:)-patch_size/2; sample_y = sample_y(1:num_bins,1:num_bins); sample_y = sample_y(:)-patch_size/2; sift_arr = zeros([length(grid_y) length(grid_x) num_angles*num_bins*num_bins], 'single'); b = 0; for n = 1:num_bins*num_bins sift_arr(:,:,b+1:b+num_angles) = I_orientation(grid_y+sample_y(n), grid_x+sample_x(n), :); b = b+num_angles; end clear I_orientation % Outputs: [grid_x,grid_y] = meshgrid(grid_x, grid_y); [nrows, ncols, cols] = size(sift_arr); % normalize SIFT descriptors sift_arr = reshape(sift_arr, [nrows*ncols num_angles*num_bins*num_bins]); sift_arr = normalize_sift(sift_arr); sift_arr = reshape(sift_arr, [nrows ncols num_angles*num_bins*num_bins]);
2.SIFT flow matching:[vx,vy,energylist]=SIFTflowc2f(Sift1,Sift2,SIFTflowpara)
计算两个位置的关联度,包括3个部分:第一项让对应位置的光流描述符相似第二项限制光流向量的大小第三项让周围的光流向量尽量一样,而不会差距过大
影响速度和精度的参数: % nlevels: (4) the number of levels of the Gaussian pyramid % topwsize: (10) the size of the matching window at the top level % nTopIterations: (100) the number of BP iterations at the top level % wsize: (3) the size of the matching window at lower levels % nIterations: (40) the number of BP iterations at lower levels % prepare the parameters SIFTflowpara.alpha=2; SIFTflowpara.d=40; SIFTflowpara.gamma=0.005; SIFTflowpara.nlevels=4; SIFTflowpara.wsize=5; SIFTflowpara.topwsize=20; SIFTflowpara.nIterations=60; [vx,vy,energylist]=SIFTflowc2f(Sift1,Sift2,SIFTflowpara) function [vx,vy,energylist]=SIFTflowc2f(im1,im2,SIFTflowpara,isdisplay) % build the Gaussian pyramid for the SIFT images pyrd(1).im1=im1; pyrd(1).im2=im2; for i=2:nlevels %使用coarse-to-fine的策略匹配时,nlevels的大小设置为4.每一层是下一层的2倍下采样 pyrd(i).im1=imresize(imfilter(pyrd(i-1).im1,fspecial('gaussian',5,0.67),'same','replicate'),0.5,'bicubic'); pyrd(i).im2=imresize(imfilter(pyrd(i-1).im2,fspecial('gaussian',5,0.67),'same','replicate'),0.5,'bicubic'); end for i=1:nlevels [height,width,nchannels]=size(pyrd(i).im1); %获得该octave的特征图的size [height2,width2,nchannels]=size(pyrd(i).im2); [xx,yy]=meshgrid(1:width,1:height); pyrd(i).xx=round((xx-1)*(width2-1)/(width-1)+1-xx); pyrd(i).yy=round((yy-1)*(height2-1)/(height-1)+1-yy); end nIterationArray=round(linspace(nIterations,nIterations*0.6,nlevels)); %60,52,44,36 for i=nlevels:-1:1 if isdisplay fprintf('Level: %d...',i); end [height,width,nchannels]=size(pyrd(i).im1); [height2,width2,nchannels]=size(pyrd(i).im2); [xx,yy]=meshgrid(1:width,1:height); if i==nlevels % top level vx=pyrd(i).xx; vy=pyrd(i).yy; winSizeX=ones(height,width)*topwsize; winSizeY=ones(height,width)*topwsize; else % lower levels 底层匹配时在自己的对应窗口中匹配 vx=round(pyrd(i).xx+imresize(vx-pyrd(i+1).xx,[height,width],'bicubic')*2); vy=round(pyrd(i).yy+imresize(vy-pyrd(i+1).yy,[height,width],'bicubic')*2); winSizeX=ones(height,width)*wsize; winSizeY=ones(height,width)*wsize; end if nchannels<=3 Im1=im2feature(pyrd(i).im1); Im2=im2feature(pyrd(i).im2); else Im1=pyrd(i).im1; Im2=pyrd(i).im2; end %从高向低,计算对应点的距离,flow是偏移向量,foo是对应位置的energy if i==nlevels [flow,foo]=mexDiscreteFlow(Im1,Im2,[alpha,d,gamma*2^(i-1),nTopIterations,2,topwsize],vx,vy,winSizeX,winSizeY); else [flow,foo]=mexDiscreteFlow(Im1,Im2,[alpha,d,gamma*2^(i-1),nIterationArray(i),nlevels-i,wsize],vx,vy,winSizeX,winSizeY); end energylist(i).data=foo; vx=flow(:,:,1); vy=flow(:,:,2); if isdisplay fprintf('done!\n'); end end
3.warp:warpI2=warpImage(Im2,vx,vy)
根据光流vx,vy把im2做warp
% function to warp images with different dimensions function [warpI2,mask]=**warpImage**(im,vx,vy) [height2,width2,nchannels]=size(im); %444*410*3 [height1,width1]=size(vx); %444*410 [xx,yy]=meshgrid(1:width2,1:height2); %生成1-444的行格点和1-410列格点,xx,yy是相同的格点矩阵 [XX,YY]=meshgrid(1:width1,1:height1); XX=XX+vx; %生成经过光流后对应的坐标 YY=YY+vy; mask=XX<1 | XX>width2 | YY<1 | YY>height2; %此处的mask标出坐标超限的地方 XX=min(max(XX,1),width2); %对XX中的每个数,如果小于1,或者大于width2,则做一个截断 YY=min(max(YY,1),height2); for i=1:nchannels foo=interp2(xx,yy,im(:,:,i),XX,YY,'bicubic');%原来为im(:,:,i)=f(xx,yy),其中xx,yy是坐标构成的meshgrid,im是图像像素值;XX,YY是插值坐标,返回的foo就是插值坐标对应的图像像素值 foo(mask)=0.6;%对于没办法插值的坐标,设为0.6 warpI2(:,:,i)=foo; end mask=1-mask;
光流的表示:flowToColor
vx1=meshgrid(1:100,1:100);
flow(:,:,1)=vx1;
vy1=meshgrid(1:100,1:100);
flow(:,:,2)=vy1;
figure;imshow(flowToColor(flow));title(‘SIFT flow field’);
结果:
设置>> flow(:,:,2)=-vy1;
figure;imshow(flowToColor(flow));title(‘SIFT flow field’);
结果:
用python_pytorch完成的sift_flow
参考https://github.com/hmorimitsu/sift-flow-gpu
-
SIFTflow.pdf
2013-12-29 10:31:11frame, we propose SIFT flow, a method to align an image to its nearest neighbors in a large image corpus containing a variety of scenes. The SIFT flow algorithm consists of matching densely sampled, ... -
SIFT Flow 笔记
2019-11-06 00:12:00文章目录SIFT Flow 论文地址: https://people.csail.mit.edu/celiu/SIFTflow/ SIFT Flow 我们的都知道 SIFT 特征是用来做 Registration 的稀疏特征。但是这篇论文地址: https://people.csail.mit.edu/celiu/SIFTflow/
SIFT Flow
SIFT Flow 结合了 SIFT 与 Optical flow,实现了一种在两幅图像间像素到像素的稠密匹配方法。
SIFT Flow 构成
SIFT 是在空间极值点提取特征。那么对于稠密特征 SIFT Flow ,它同样也是对于某个像素的邻域 (如16x16邻域) 分成4x4个cell,将每一个cell 的梯度方向映射到 8 个方向,形成 8 维向量。其区别是,SIFT Flow 对每一个像素都进行特征提取。那么对应一个像素即有 4x4x8 = 128 维向量。
- 文中将 128 维向量用 PCA 降维到三维,再映射到RGB空间,得到了如下所示的图像。
目标函数
- w( p ) 为原始图像与目标图像匹配像素之间的坐标距离。w( p ) = (u( p ), v( p )) = (x - x’ , y - y’)。
- (1) 限制匹配点的特征向量距离。
- (2) 限制匹配点的坐标距离,使其尽可能在空间上接近。
- (3) 限制 p 邻域中的 q 匹配像素与 p 的匹配像素接近,使目标图像平滑。
优化
文中采用Dual-layer loopy belief propagation,其中 Dual-layer belief propagation 如下图所示。
- 文中将 128 维向量用 PCA 降维到三维,再映射到RGB空间,得到了如下所示的图像。
-
FCN网络训练 SIFTFLOW数据集
2017-04-19 11:12:19snapshot_prefix:"/home/my/fcn.berkeleyvision.org-master/fcn.berkeleyvision.org-master/siftflow-fcn32s/train" test_initialization: false 步骤8 .solve.py文件修改 在这里郑重声明...论文全名:Fully Convolutional Networks for Semantic Segmentation
全卷积神经网络 FCN代码运行详解:
运行平台:
Ubuntu 14.04 + cudnn7
步骤1.代码准备:下载新版caffe: https://github.com/BVLC/caffe
下载fcn代码: https://github.com/shelhamer/fcn.berkeleyvision.org将下载后的压缩包解压 将解压后的代码丢进服务器
步骤2.编辑caffe和python接口:cd进入caffe所在路径以个人路径示例:/home/my/caffe-master/caffe-master在该目录下,执行cp Makefile.config.example Makefile.config
vim Makefile.config(这句代码根据自己情况选择,如果需要修改相关设定,就使用这句,需要注意的是,将WITH_PYTHON_LAYER := 1前面的#去掉
如果使用cudnn,就把use cudann前面的#去掉
我这边安装的是openbla,所以我的设置为BLAS:=open)
make all -j8 //8代表线程数量,可以加快编译速度
以上结束后开始编译python接口make test -j8 //编译测试需要的文件 make runtest //开始运行测试例子,这一句貌似有没有都行
在下载的caffe源码包中,有个叫python的文件夹,cd进入这个文件夹以我个人路径为例cd至 /home/wangkun/caffe-master/caffe-master/python编译python:make pycaffe #测试是否成功 cd caffe-folder/python python import caffe #如果上述命令未报错,说明成功 #添加caffe/python 到python path变量 vim ~/.bashrc #set the caffe PYTHONPATH export PYTHONPATH=/path/to/caffe/python:$PYTHONPATH
!如果是采用的Anaconda python,切记编译python接口在最后执行。
!如果是系统自带的python在make pycaffe可能出现python/caffe/_caffe.hpp:8:31: fatal error: numpy/arrayobject.h: No such file or directory
这是因为64位的python 库的存放路径问题。查找
arrayobject.h
所在的目录:sudo find / -name arrayobject.h
然后修改
Makefile.config
:
以上,编译结束,关于编译python,由于我这边服务器上使用的是Anaconda python,大家可以根据自己的实际情况进行python接口的编译PYTHON_INCLUDE := /usr/include/python2.7 \ /usr/lib64/python2.7/site-packages/numpy //这里修改成找到的路径
步骤3.数据文件下载下载siftflow数据集:http://www.cs.unc.edu/~jtighe/Papers/ECCV10/siftflow/SiftFlowDataset.zip并解压至/fcn.berkeleyvision.org/data/
下,并将文件夹名重命名为sift-flow
步骤4.预训练模型下载:下载VGG16的预训练模型并放在FCN源码文件夹中的ilsvrc-nets文件夹下https://pan.baidu.com/s/1qYJeFfQ
以个人路径为例:/home/my/fcn.berkeleyvision.org-master/fcn.berkeleyvision.org-master/ilsvrc-nets
步骤5.为了避免运行程序时候出现no module named caffe在代码中包含import caffe的py文件(solve.py)的第一行加入import sys
sys.path.append('/home/my/caffe-master/caffe-master/python')
其中, /home/my/caffe-master/caffe-master/python为你下载的caffe源码中python文件夹的路径
步骤6.cd进入fcn源码路径以个人路径为例:/home/my/fcn.berkeleyvision.org-master/fcn.berkeleyvision.org-master将其中所有的py文件,例如surgery.py等等,全部复制到siftflow-fcn32s文件夹中
步骤7.solver.prototxt文件修改进入siftflow-fcn32s文件夹 打开solver.prototxt其中snapshot:10000 表示训练10000次保存一次模型snapshot_prefix:"/home/my/fcn.berkeleyvision.org-master/fcn.berkeleyvision.org-master/siftflow-fcn32s/train"
表示训练得到的模型,也就是model存放的路径在此,我附上个人的solver.prototxt供大家参考train_net: "trainval.prototxt" test_net: "test.prototxt" test_iter: 200 # make test net, but don't invoke it from the solver itself test_interval: 999999999 display: 20 average_loss: 20 lr_policy: "fixed" # lr for unnormalized softmax base_lr: 1e-10 # high momentum momentum: 0.99 # no gradient accumulation iter_size: 1 max_iter: 300000 weight_decay: 0.0005 snapshot:10000 snapshot_prefix:"/home/my/fcn.berkeleyvision.org-master/fcn.berkeleyvision.org-master/siftflow-fcn32s/train" test_initialization: false
步骤8.solve.py文件修改在这里郑重声明一下:如果训练fcn32s的网络模型,
一定要修改solve.py
利用transplant的方式获取vgg16的网络权重;
具体操作为
并且在import后添加了http://pan.baidu.com/s/1geLL6Sz
如果训练fcn16s,则可以直接copy自己的fcn32s的model的权重,不需要transplant,也就是不需要修改solve.py
如果训练fcn8s,则可以直接copy自己的fcn16s的model的权重,不需要transplant,也就是不需要修改solve.py
只有如此,才能避免loss高居不下的情况
步骤9.以上配置全部结束,开始进行模型训练进入siftflow-fcn32s文件夹执行 python solve.py
步骤10.测试单张图片在fcn源码文件夹,找到infer.py以个人路径示例:/home/my/fcn.berkeleyvision.org-master/fcn.berkeleyvision.org-master打开infer.py 在第一行加上import sys
sys.path.append('/home/my/caffe-master/caffe-master/python')
其中/home/my/caffe-master/caffe-master/python为自己所下载的cafe源码包中的python所在路径
其中,net = caffe.Net('deploy.prototxt', 'siftflow-fcn32s/train_iter_100000.caffemodel', caffe.TEST)中, train_iter_100000.caffemodel为训练得到的模型
其中,im = Image.open('test.jpg')为 测试的图片名,
plt.savefig('test_out.png')为将测试结果保存为test_output.png
此外out = net.blobs['score'].data[0].argmax(axis=0)
改成out = net.blobs['score_sem'].data[0].argmax(axis=0)
我附上个人完整的infer.py的代码
import numpy as np from PIL import Image import matplotlib.pyplot as plt import sys sys.path.append('/home/my/caffe-master/caffe-master/python') import caffe import cv2 %matplotlib inline # load image, switch to BGR, subtract mean, and make dims C x H x W for Caffe im = Image.open('siftflow-fcn8s/test.jpg') in_ = np.array(im, dtype=np.float32) in_ = in_[:,:,::-1] in_ -= np.array((104.00698793,116.66876762,122.67891434)) in_ = in_.transpose((2,0,1)) # load net net = caffe.Net('siftflow-fcn8s/deploy.prototxt', 'siftflow-fcn8s-heavy.caffemodel', caffe.TEST) # shape for input (data blob is N x C x H x W), set data net.blobs['data'].reshape(1, *in_.shape) net.blobs['data'].data[...] = in_ # run net and take argmax for prediction net.forward() out = net.blobs['score_sem'].data[0].argmax(axis=0) #print "hello,python!" #plt.imshow(out,cmap='gray'); plt.imshow(out) plt.axis('off') plt.savefig('test.png')
.使用infer.py时候遇到no display name and no $DISPLAY environment variable的话 证明服务器上没安装显卡
不支持plt命令,具体解决方法可以见我的另外一个博客中的问题1,2个解决方法:http://blog.csdn.net/wangkun1340378/article/details/56834642
如果没有deploy文件,可以参考如下方法:deploy文件如果没有 可以参照一下方法
首先,根据你利用的模型,例如模型是siftflow32s的,那么你就去siftflow32s的文件夹,
里面有train.prototxt文件,将文件打开,全选,复制,新建一个名为deploy.prototxt文件,粘贴进去,
然后ctrl+F 寻找所有名为loss的layer 只要有loss 无论是loss还是geo_loss 将这个layer统统删除
然后删除输入层,在fcn中就是第一个python层,即删除
layer { name: "data" type: "Python" top: "data" top: "sem" top: "geo" python_param { module: "siftflow_layers" layer: "SIFTFlowSegDataLayer" param_str: "{\'siftflow_dir\': \'../data/sift-flow\', \'seed\': 1337, \'split\': \'trainval\'}" } }
然后在文件顶部加上
layer {
name: "input"
type: "Input"
top: "data"
input_param {
# These dimensions are purely for sake of example;
# see infer.py for how to reshape the net to the given input size.
shape { dim: 1 dim: 3 dim: 256 dim: 256 }
}
}
其中shape{dim:1 dim:3 dim:256 dim:256}中的dim可以随意设置,此处虽然为1 3 256 256,但是caffe会根据所读取的图片进行重新设置dim
此外,关于siftflow-fcn需要的deploy文件,我在这里附上一个下载地址,如果不愿意自己制作可以下载这个:
https://pan.baidu.com/s/1nxeLxBr
需要额外注意的是 如果使用siftflow数据集训练得到的model
在测试时候 也请使用siftflow数据集中的img进行test,我以一张voc数据集的img利用siftflow数据集得到的model示例
可以看到voc的图像 在利用siftflow数据集进行测试的结果并不好
在siftflow数据集中 class.txt文件中是包含person这个类别的 但在这个例子中 仍然无法将person完整分割出来
这是因为 train data中 person类别的多样性不足 在大家自己制作自己的数据集时候
不仅要完整包含自己所需要的类别(class) 在保证数据集的数量足够大的同时 更要注意每一个class的 多样性
例如 person的姿势 多样性 等等 只有如此 才能使得分割结果更加完善
fcn只是工具 就像汽车的发动机
我们使用fcn 时候 我们的数据集就是机油
机油纯度高(数据集做得好) 汽车跑的就快,跑的远(分割结果就好)
在此,fcn的训练已经结束,祝大家顺利
如果想下载官方的训练好的model 试试结果可以在这里下载到
http://dl.caffe.berkeleyvision.org/
以上,FCN的训练和测试全部结束,这次有个朋友催我做这个,做得比较仓促,如果有问题,欢迎指摘
感谢Zoro_H提供的 利用siftflow训练得到的model 对voc数据集中图片的测试结果
对于deploy文件的错误,感谢qq_37685880等人的指正
-
CV | SIFTflow 学习笔记
2016-07-16 16:33:03作者提出SIFT flow是基于图像标定/图像定位(image alignment),旨在根据输入图像,在数据库中找到与之最匹配的图,根据输入图像将找到的图像进行标定。翻译一段:对于一副输入图像,使用histogram intersection... -
SIFTflow 基于matlab实现 光流,好用。 238万源代码下载- www.pudn.com
2021-04-22 01:02:59文件名称: SIFTflow下载 收藏√ [5 4 3 2 1]开发工具: matlab文件大小: 801 KB上传时间: 2013-10-06下载次数: 24详细说明:基于matlab实现sift光流,好用。-Sift matlab realize optical flow based, easy to use.... -
Computer Vision_33_SIFT:SIFTflow Dense Correspondence across Scenes and its Applications——2011
2019-10-03 15:32:00此部分是计算机视觉部分,主要侧重在底层特征提取,视频分析,跟踪,目标...33. SIFT关于SIFT,实在不需要介绍太多,一万多次的引用已经说明问题了。SURF和PCA-SIFT也是属于这个系列。后面列出了几篇跟SIFT有关的... -
显示图像的SIFT flow描述子
2016-05-23 10:41:17% xlabel('The dimension of the descriptor in SIFT flow','FontSize',12); % ylabel('Distribution','FontSize',12); % set(gca, 'FontSize', 12); %计算该点sift的均值和方差 M1 = mean(y) V1 = var(double(y)) ... -
FCN语义分割训练数据(以siftflow和voc2012数据集为例)
2018-07-27 10:17:14截至目前,现已经跑通了siftflow-fcn32s,voc-fcn32s,并制作好了自己的数据集,现在就等大批数据的到来,进而针对数据进行参数fine-tuning,现对我训练的训练流程和训练过程中遇到的问题,做出总结和记录,从而对... -
尺度不变特征变化图像匹配siftFlow
2017-06-27 10:19:40尺度不变特征变化图像匹配siftFlow 能够直接运行 -
SiftFlowDataset
2018-03-08 20:13:57siftflow数据集,里面有2688张图像,其类别信息如下:Semantic and geometric segmentation classes for scenes. Semantic: 0 is void and 1–33 are classes. 01 awning 02 balcony 03 bird 04 boat ... -
Scene Alignment by SIFT Flow for Video
2012-04-14 16:42:48scene changes, SIFT flow scene alignment is performed on the clustering set of key frames. After alignment, one representative frame is chosen from the reconstructed cluster set on matched frame pairs... -
fcn+caffe+siftflow实验记录
2017-11-12 20:09:00将fcn目录下的score.py siftflow_layer.py和surgery.py 复制到siftflow-fcn32s的文件夹下。 修改solve.prototxt文件 train_net: "trainval.prototxt" test_net: "test.prototxt" test_iter: 200 # ... -
ubuntu16.04+siftflow 刘策11年代码
2018-07-26 16:43:19SIFT Flow: Dense Correspondence across Scenes and its Applications (刘策论文及代码地址) ubuntu下编译需要把project.h文件第4行的#define _LINUX_MAC取消注释 取消注释以后还有一些报错 一直找不到解决... -
sift-flow 数据集
2019-05-09 11:20:18sift-flow数据集解析: 1.semanticlabels:语义标签。每一个像素点用一种类别来表示,每一种类别用一个数字来表示。总共有33类,背景类用0表示。 对应列表: 01 awning 雨蓬 02 balcony 阳台 03 bird 鸟 04 boat 船 ... -
siftgflow将sift和光流法结合的匹配法
2017-10-30 10:48:36使用siftflow可用于匹配图像对,找到像素点偏移的点,所用平台为MATLAB,亲测可用! -
FCN训练sift-flow与voc数据集
2021-06-09 11:40:20在自己服务器上实现FCN基于sift-flow数据集的训练与测试。 在自己服务器上实现FCN基于voc数据集的训练与测试。 在自己服务器上实现FCN基于自己数据集的训练与测试。 第一步:下载FCN代码与sift-flow数据集。代码... -
sift-flow数据集
2017-04-18 14:59:14wget www.cs.unc.edu/~jtighe/Papers/ECCV10/siftflow/SiftFlowDataset.zip 里面有2688张图像,其类别信息如下: Semantic and geometric segmentation classes for scenes. Semantic: 0 is -
【深度学习】FCN 图像语义分割训练 Sift-flow Dataset (从零开始训练 FCN,没有使用 VGG 权值)
2019-09-06 21:13:41'/home/winsoul/disk/Segmentation/SiftFlow/data/GeoLabels/tfrecords/train.tfrecords' testPath = '/home/winsoul/disk/Segmentation/SiftFlow/data/GeoLabels/tfrecords/test.tfrecords' valPath = '/... -
【深度学习】FCN 图像语义分割训练 Sift-flow Dataset + Batch Normalization 极大加快收敛速度 (从零开始...
2019-09-07 07:46:22FCN 图像语义分割训练 Sift-flow Dataset + Batch Normalization 前言 在上一篇博客中,我写了个 FCN ,训练了近 30 个小时才能微微看到效果。 又说到了本人很懒嘛,那怎么可能想等那么久呢。于是就想着加个 BN,... -
FCN网络的训练——以SIFT-Flow 数据集为例
2021-04-22 01:02:50sudo pip install setproctitle (3)IndexError: list index out of range 解决方案:修改GPU编号为0号GPU (4)No modulw named siftflow_layers 解决方案:疯了,干错把根目录下边的所有.py文件全拷贝到siftflow-... -
caffe FCN网络的训练——以SIFT-Flow 数据集为例
2017-10-12 23:33:42caffe FCN网络的训练——以SIFT-Flow 数据集为例 -
FCN网络的训练——以SIFT-Flow 数据集为例(转)
2018-08-18 09:00:03FCN网络的训练——以SIFT-Flow 数据集为例 参考文章: http://blog.csdn.net/u013059662/article/details/52770198 caffe的安装配置,以及fcn的使用在我前边的文章当中都已经提及到了,这边不会再细讲。在下边...