【问题标题】:Building an Active Appearance Model建立一个活跃的外观模型
【发布时间】:2013-08-29 06:33:05
【问题描述】:

我正在尝试构建一个像 guide 这样的主动外观模型。 但有些 cmets 对我来说听起来很抽象且难以理解。因此,您能否上传创建模型所需的整套文件或发送包含该模型的链接。谢谢,对不起我的英语!

【问题讨论】:

  • 您是否能够运行该程序并获得任何类型的消息?它可能需要一些特定的输入才能运行,例如指定训练图像和注释的路径。
  • @IvanAslamov 在运行程序之前,我需要创建一个训练集、包含点的文件、设置文件夹并自定义更多选项。更改全套文件比从头开始创建自己的文件更容易
  • 我相信你已经生成了.aam文件你能告诉我数据的结构是什么吗?我只能看到一个包含 8 列十六进制值的文件。
  • 如果您希望能够轻松创建具有最先进性能和相当简单 API 的 AAM,我建议您查看 Menpo 项目:www.menpo.io(披露:我是维护者之一)

标签: opencv emgucv face-detection face-recognition


【解决方案1】:

当您从 Tim Cootes 网站下载 aam 项目时,它应该包含您开始所需的一切。

http://www.isbe.man.ac.uk/~bim/software/am_tools_doc/

我建议在 linux 上使用“wine”运行 windows 二进制文件。 linux 二进制文件依赖于一些过时的库,需要一些努力才能正确安装。

该项目有几个关键文件夹:images、points、models、win_bin。 “images”是包含图像文件的文件夹,其对应的 .pts 文件位于“points”文件夹中。

“models”文件夹包含用于构建模型的配置 .smd 文件。随附的 smd 文件示例如下:

~/Documents/am_tools/models$ cat tim_face.smd

// List of images + parameters required to define type of model
// Note: List excludes images in the separate test set (tim_face_test.smd)
model_name: tim_face
model_dir: ./
parts_file: face
image_dir: ../images/
points_dir: ../points/

shape_aligner: align_similar_2d
shape_modes:  { min: 0 max: 30 prop: 0.98 }
tex_modes:  { min: 0 max: 40 prop: 0.99 } 
combined_modes:  { min: 0 max: 30 prop: 0.99 } 
params_limiter: mdpm_box_limits
{
  sd_limits: 3
}
n_pixels: 10000
colour: Grey // Alternatives: Grey,RGB,...
// Texture Sampler can be tri_raw, tri_edge...
tex_sampler: vapm_triangle_sampler<vxl_byte>
tex_aligner: align_linear_1d
// shape_wts define how to compute relative scaling of shape & tex.
// shape_wts can be `EqualVar', `EqualEffect',...
shape_wts: EqualVar

// tex_model defines type of model to represent texture statistics, eg: pca, pca+haar1d
tex_model: pca
// Image Pyramid Builder can be gauss_byte, gauss_float, grad_float ...
pyr_builder: gauss_byte
points_pyr_builder: Same
max_im_pyr_levels: 5

// Levels of multi-res model to build :
min_level: 0
max_level: 4

// Details of points : images
training_set:
{
  107_0764.pts : 107_0764.jpg
  107_0766.pts : 107_0766.jpg
  107_0779.pts : 107_0779.jpg
  107_0780.pts : 107_0780.jpg
  107_0781.pts : 107_0781.jpg
  107_0782.pts : 107_0782.jpg
  107_0784.pts : 107_0784.jpg
  107_0785.pts : 107_0785.jpg
  107_0786.pts : 107_0786.jpg
  107_0787.pts : 107_0787.jpg
  107_0788.pts : 107_0788.jpg
  107_0789.pts : 107_0789.jpg
  107_0790.pts : 107_0790.jpg
  107_0791.pts : 107_0791.jpg
  107_0792.pts : 107_0792.jpg
}

只需确保列出的 .pts 和 .jpg 文件存在于您的图像和点文件夹中。接下来运行 am_build_apm.exe/am_build_aam.exe 命令:

~/Documents/am_tools/win_bin$ wine am_build_apm ../models/tim_face.smd

这将在 win_bin 文件夹中创建 tim_face.apm 文件。现在可以通过运行查看创建的模型:

~/Documents/am_tools/win_bin$ wine am_view_apm.exe

并在应用程序菜单中打开 ~/Documents/am_tools/models/tim_face.smd 文件。

现在在.smd文件中使用不同的参数,尝试用pts文件添加你自己的图像,我认为BioID数据库有几百张用.pts文件注释的图像。

http://www.bioid.com/index.php?q=downloads/software/bioid-face-database.html

【讨论】:

  • 如何将形成的 AAM 拟合到新图像?
猜你喜欢
  • 2018-06-21
  • 1970-01-01
  • 2020-07-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-05-04
  • 1970-01-01
相关资源
最近更新 更多