Skip to contents

Make an XML file with the template points for a set of stimuli. For use with facetrain for training dlib models.

Usage

tem_to_xml(stimuli, dir = "images", imageset = "Image Set")

Arguments

stimuli

list of class stimlist

dir

path to save the images and XML file

imageset

name for the image set (in the XML file)

Value

the path to the xml file (invisibly)

Examples

xml <- system.file("demo/_images.xml", package = "webmorphR.dlib")

# read the first 10 lines of the xml file
readLines(xml, n = 10)
#>  [1] "<?xml version='1.0' encoding='ISO-8859-1'?>"                                        
#>  [2] "<?xml-stylesheet type='text/xsl' href='image_metadata_stylesheet.xsl'?>"            
#>  [3] "<dataset>"                                                                          
#>  [4] "<name>Young adult composite faces</name>"                                           
#>  [5] "<images>"                                                                           
#>  [6] "  <image file='/Users/lisad/rproj/debruine/webmorphR.dlib/inst/demo/f_african.jpg'>"
#>  [7] "    <box top='231' left='200' width='268' height='267'>"                            
#>  [8] "      <part name='000' x='281' y='312'/>"                                           
#>  [9] "      <part name='001' x='388' y='311'/>"                                           
#> [10] "      <part name='002' x='281' y='306'/>"