DPM v5源码阅读(未完成)

TTransposition在他博客里面提到了,v3的版本和论文最接近,v4增加了模型数由2个增加为6个,v5提取了语义特征。
对比v3和v5的代码,发现代码的风格和结构都有不少的变化。
Here we go~

Demo.m

function demo()
startup;

fprintf('compiling the code...');
compile;
fprintf('done.\n\n');

load('VOC2010/car_final');
model.vis = @() visualizemodel(model, ...
                  1:2:length(model.rules{model.start}));
test('000034.jpg', model, -0.3);

load('INRIA/inriaperson_final');
model.vis = @() visualizemodel(model, ...
                  1:2:length(model.rules{model.start}));
test('000061.jpg', model, -0.3);

load('VOC2010/person_grammar_final');
model.class = 'person grammar';
model.vis = @() visualize_person_grammar_model(model, 6);
test('000061.jpg', model, -0.6);

load('VOC2010/bicycle_final');
model.vis = @() visualizemodel(model, ...
                  1:2:length(model.rules{model.start}));
test('000084.jpg', model, -0.3);

function test(imname, model, thresh)
cls = model.class;
fprintf('/ Running demo for %s /\n\n', cls);

% load and display image
im = imread(imname);
clf;
image(im);
axis equal; 
axis on;
disp('input image');
disp('press any key to continue'); pause;
disp('continuing...');

% load and display model
model.vis();
disp([cls ' model visualization']);
disp('press any key to continue'); pause;
disp('continuing...');

% detect objects
[ds, bs] = imgdetect(im, model, thresh);
top = nms(ds, 0.5);
clf;
if model.type == model_types.Grammar
  bs = [ds(:,1:4) bs];
end
showboxes(im, reduceboxes(model, bs(top,:)));
disp('detections');
disp('press any key to continue'); pause;
disp('continuing...');

if model.type == model_types.MixStar
  % get bounding boxes
  bbox = bboxpred_get(model.bboxpred, ds, reduceboxes(model, bs));
  bbox = clipboxes(im, bbox);
  top = nms(bbox, 0.5);
  clf;
  showboxes(im, bbox(top,:));
  disp('bounding boxes');
  disp('press any key to continue'); pause;
end

fprintf('\n');

参考链接

1、 DPM(Defomable Parts Model) 源码分析-检测(二)
2、 DPM(Defomable Parts Model) 源码分析-训练(三)

源码来自外星人源码论坛 文件夹 PATH 列表 卷序列号码为 0006EE50 EC5F:C44B C:. │ v5目录的结构树.TXT │ www.eenot.net.bat │ ├─开发库 │ ├─Include │ │ │ AndroidUserItem.h │ │ │ AndroidUserManager.h │ │ │ Array.h │ │ │ AvatarControlHead.h │ │ │ BitImage.h │ │ │ BitImageEx.h │ │ │ CameraControl.h │ │ │ CMD_Commom.h │ │ │ CMD_Correspond.h │ │ │ CMD_GameServer.h │ │ │ CMD_LogonServer.h │ │ │ CustomFaceManager.h │ │ │ Custsite.h │ │ │ D2DEngine.h │ │ │ D2DInterface.h │ │ │ D3DDevice.h │ │ │ D3DDirect.h │ │ │ D3DFont.h │ │ │ D3DMusic.h │ │ │ D3DSound.h │ │ │ D3DSoundBuffer.h │ │ │ D3DSoundThread.h │ │ │ D3DSprite.h │ │ │ D3DSurface.h │ │ │ D3DTexture.h │ │ │ DataBaseAide.h │ │ │ Define.h │ │ │ DFontEx.h │ │ │ DirectShowBasic.h │ │ │ DlgBrowser.h │ │ │ DlgGameRule.h │ │ │ DlgInsureCounter.h │ │ │ DlgInsureGame.h │ │ │ DlgMatchAwards.h │ │ │ DlgServerItem.h │ │ │ DlgServerWizard.h │ │ │ DlgTrumpetItem.h │ │ │ DlgVideoClone.h │ │ │ DownLoad.h │ │ │ DownLoadHead.h │ │ │ Expression.h │ │ │ FaceCustomControl.h │ │ │ FaceItemControl.h │ │ │ FaceItemView.h │ │ │ FaceSelectControl.h │ │ │ Flash.ocx │ │ │ FlashControl.h │ │ │ GameEngineHead.h │ │ │ GameFrameApp.h │ │ │ GameFrameAvatar.h │ │ │ GameFrameControl.h │ │ │ GameFrameEngine.h │ │ │ GameFrameHead.h │ │ │ GameFrameMedalView.h │ │ │ GameFramePublicize.h │ │ │ GameFrameService.h │ │ │ GameFrameUserView.h │ │ │ GameFrameView.h │ │ │ GameFrameViewD3D.h │ │ │ GameFrameViewGDI.h │ │ │ GameFrameWnd.h │ │ │ GamePropertyCtrl.h │ │ │ GamePropertyHead.h │ │ │ GamePropertyItem.h │ │ │ GamePropertyManager.h │ │ │ GameServiceHead.h │ │ │ GIFImage.h │ │ │ GlobalServer.h │ │ │ GlobalUnits.h │ │ │ GlobalUserInfo.h │ │ │ HeadTranslate.h │ │ │ IDispimp.h │ │ │ ImageEditorControl.h │ │ │ ImageOle.dll │ │ │ Information.h │ │ │ IPC_GameFrame.h │ │ │ K
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yomo127

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值