-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathcaffeCoder.xml
More file actions
76 lines (58 loc) · 4.17 KB
/
caffeCoder.xml
File metadata and controls
76 lines (58 loc) · 4.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="yarpmanifest.xsl"?>
<module>
<name>caffeCoder</name>
<doxygen-group>icub_module</doxygen-group>
<description>The module computes a vectorial representation of the input image using Caffe C++ library.</description>
<copypolicy>Released under the terms of the GNU GPL v2.0</copypolicy>
<version>1.0</version>
<description-long>
@subsection sec-intro Introduction
The input image is passed through a feed-forward Convolutional Neural Network (CNN) model that has been previously learned. The image representation can be extracted as the output of any layer in the network. Usually the latest convolutional layer is chosen and the output is a 1-dimensional vector, than is then fed to a classifier (e.g., linear SVM/RLS).
</description-long>
<arguments>
<param default="caffeCoder" desc="name of the module"> name </param>
<param default="caffeCoder.ini" desc="configuration file name"> from </param>
<param default="himrep" desc="select the current context"> context </param>
<param default="bvlc_googlenet.caffemodel" desc="Absolute path to the .caffemodel file containing the weights of the network used."> caffemodel_file </param>
<param default="~/.local/share/yarp/contexts/himrep/bvlc_googlenet_val_cutpool5.prototxt" desc="Absolute path to the .prototxt file containing the definition of the network (or part of the network) used."> prototxt_file </param>
<param default="pool5/7x7_s1" desc="Tag (defined in the .prototxt) of the layer at which we want to extract the features."> blob_name </param>
<param default="GPU" desc="[GPU|gpu|CPU|cpu] passed to Caffe initialization."> compute_mode </param>
<param default="0" desc="GPU device chosen by Caffe to run the computations (used if compute_mode is set to GPU|gpu)."> device_id </param>
<param default="1000" desc="Pass this parameter if you want to measure the time for feature extraction. This is an integer specifying the number of iterations of the moving window to average the time measurements."> timing </param>
<param default="256" desc="Integer specifying the width to which resize (anysotropically) the image before feeding it to the network. This is used if the mean pixel is subtracted from the input image and must be coupled with `resizeHeight`."> resizeWidth </param>
<param default="256" desc="Integer specifying the height to which resize (anysotropically) the image before feeding it to the network. This is used if the mean pixel is subtracted from the input image and must be coupled with `resizeWidth`."> resizeHeight </param>
<param default="codes.bin" desc="Path where to save the features extracted from each image in a binary format."> dump_code </param>
</arguments>
<authors>
<author email="giulia.pasquale@iit.it"> Giulia Pasquale</author>
</authors>
<data>
<input>
<type>rpc</type>
<port>/caffeCoder/rpc</port>
<description>Receiveds the following commands and provides replies: (notation: [.] identifies a vocab, "." specifies a string)
-# <b>help</b> <i>[help]</i>: print the available commands
-# <b>start saving features</b> <i>[dump] "path-to-file" "a"</i>: starts to save features in a binary file. "a" (optional) stands for "append". "path-to-file" (optional) is set to: contextPath + "/codes.bin" if not provided
-# <b>stop saving features</b> <i>[stop]</i>: stop saving features
</description>
</input>
<input>
<type>Image</type>
<port>/caffeCoder/img:i</port>
<required>yes</required>
<priority>yes</priority>
<description>Feed images to caffeCoder using this port.</description>
</input>
<output>
<type>Image</type>
<port>/caffeCoder/img:o</port>
<description>Output image (equal to the input).</description>
</output>
<output>
<type>Vector</type>
<port>/caffeCoder/code:o</port>
<description>Output vectorial representation of the image.</description>
</output>
</data>
</module>