0

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

4

1 回答 1

0

当您从 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

于 2013-08-29T17:10:14.090 回答