(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Reconfiguring the experience based parameter selector

Description: This tutorial describes how the experience based parameter selector can be reconfigured to give out results with different properties.

Tutorial Level: ADVANCED

Running the exploring parameter chooser

For a stand alone tutorial on running the exploring parameter chooser have a look at this tutorial "Using face_contour_detector without the other packages in the portrait_bot stack.". If you want to run it in a complete environment (on the PR2) have a look at the tutorial on the portrait_bot/Tutorials page.

What is the graph mass?

See face_contour_detector#exploring_parameter_selector for what the graph mass is and how it is being calculated.

Changing the target graph mass

To reconfigure the target graph mass you will have to edit the explore_settings.xml file. It is located in the face_contour_detector package under the path config/explore_settings.xml . The content of a typical explore_settings.xml looks like this:

<explore_settings>
        <!-- Sets up a worker,
        - steps, defines how many subdivision steps will be taken (the more, the longer it will take, but the results should be better) 
        - numresults defines how many results should result out of this worker (1 = only the best result, 2 = the best and the second best result...)-->
        <worker steps="15" numresults="2" >
                <!-- Currently only the areas "LeftEye", "RightEye", "Nose", "Mouth" and "Complete Face" area availible -->
                <area name="LeftEye">
                        <!-- defines that the target graphmass for the area LeftEye should be 0.35 
                        currently only the target_value graphmass is supported -->
                        <target_value name="graphmass" value="0.35" />
                </area>
                <area name="RightEye">
                        <target_value name="graphmass" value="0.35" />
                </area>
                <area name="Nose">
                        <target_value name="graphmass" value="0.35" />
                </area>
                <area name="Mouth">
                        <target_value name="graphmass" value="0.35" />
                </area>
                <area name="Complete Face">
                        <target_value name="graphmass" value="0.25" />
                </area>
        </worker>
</explore_settings>

To modify the target graph mass for an area you just have modify the value in target_value tag of your desired area (in this case 0.35).

<target_value name="graphmass" value="0.35" />

Adding additional workers

Adding additional workers will allow you to get more results with different step sizes, amount of results or areas that will be used.
For example you could add a worker that returns one result, takes 15 steps, only uses the "Complete Face" area and tries to reach graphmass of 0.25 in this area. Note: This is experimental. The learning based parameter chooser will only use proposals which use all areas. So do not try to rate proposals that do not use all areas.

        <worker steps="15" numresults="1" >
                <area name="Complete Face">
                        <target_value name="graphmass" value="0.25" />
                </area>
        </worker>

Now we can add this to our previous config xml:

<explore_settings>
        <!-- Sets up a worker,
        - steps, defines how many subdivision steps will be taken (the more, the longer it will take, but the results should be better) 
        - numresults defines how many results should result out of this worker (1 = only the best result, 2 = the best and the second best result...)-->
        <worker steps="15" numresults="2" >
                <!-- Currently only the areas "LeftEye", "RightEye", "Nose", "Mouth" and "Complete Face" area availible -->
                <area name="LeftEye">
                        <!-- defines that the target graphmass for the area LeftEye should be 0.35 
                        currently only the target_value graphmass is supported -->
                        <target_value name="graphmass" value="0.35" />
                </area>
                <area name="RightEye">
                        <target_value name="graphmass" value="0.35" />
                </area>
                <area name="Nose">
                        <target_value name="graphmass" value="0.35" />
                </area>
                <area name="Mouth">
                        <target_value name="graphmass" value="0.35" />
                </area>
                <area name="Complete Face">
                        <target_value name="graphmass" value="0.25" />
                </area>
        </worker>
        <worker steps="15" numresults="1" >
                <area name="Complete Face">
                        <target_value name="graphmass" value="0.25" />
                </area>
        </worker>
</explore_settings>

If we now send a request to the face_contour_detector the first two proposals displayed in the gui will be form our old worker and the third one will be from our newly added one.

Wiki: face_contour_detector/Tutorials/Reconfiguring the experience based parameter selector (last edited 2011-05-03 22:19:35 by JulianSchmid)