common_objectbase - Extended-Object-Detection-ROS/wiki_english GitHub Wiki
Almost all interaction with the package occurs through a configuration XML-file, usually called the object base. An example of such a file containing a large number of objects based on different attributes can be found here. Also, many examples are attached to the documentation, for example, when describing attributes types.
This file should have four main tag sections.
Within this tag, all the characteristics of Simple Objects are described. The attribute is described by the Attribute tag and contains all the necessary information to recognize this attribute. Read more in the section Simple Objects.
<AttributeLib>
<Attribute Name="HaarFace" Type="HaarCascade" Cascade="cascades/mallick_haarcascade_frontalface_default.xml"/>
<Attribute Name="CnnPerson" Type="Dnn" framework="tensorflow" weights="ssd_mobilenet_v1_coco_2017_11_17/frozen_inference_graph.pb" config="ssd_mobilenet_v1_coco_2017_11_17/config.pbtxt" labels="ssd_mobilenet_v1_coco_2017_11_17/mscoco_label_map.pbtxt" inputWidth="300" inputHeight="300" Probability="0.5" obj_id="1"/>
</AttributeLib>
Above are two examples, a feature defining a face with Haar cascades and a feature defining a person with a convolutional neural network.
Simple Objects are described within this tag. The object is described by the SimpleObject tag, which contains a list of Attribute tags referencing attributes from the AttributeLib by name.
<SimpleObjectBase>
<SimpleObject Name="Face" ID="10">
<Attribute Type="Detect">HaarFace</Attribute>
</SimpleObject>
<SimpleObject Name="CnnPerson" ID="67">
<Attribute Type="Detect">CnnPerson</Attribute>
</SimpleObject>
</SimpleObjectBase>
The examples above describe objects consisting of the respective features (in this case, one for each).
Relationships are described within this tag.
<RelationLib>
<Relation Obj1="Face" Obj2="Person" Relationship="in"/>
</RelationLib>
The example above describes the relationship of finding a rectangle of one object in the rectangle of another.
Inside this tag, Complex Objects are described, with reference to simple objects from SimpleObjectBase and relationships from RelationLib.
<ComplexObjectBase>
<ComplexObject ID="10" Name="FacedPerson">
<SimpleObject Class="CnnPerson" InnerName="Person"/>
<SimpleObject Class="Face" InnerName="Face"/>
<Relation Obj1="Face" Obj2="Person" Relationship="in"/>
</ComplexObject>
</ComplexObjectBase>
The example describes a human object with a recognized face.