Skip to content

SpaceInRelation

Moscowsky Anton edited this page Dec 3, 2020 · 7 revisions

SpaceIn

Checks that the bounding rectangle of the first object lies entirely within the rectangle of the second.

1. XML-description

1.1. Common parameters

  • Name (string, must be set) unique relationship name
  • Type (string, must be SpaceIn) relationship type

1.2. Special parameters

  • None

1.3. Example

<?xml version="1.0" ?>

<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>

<SimpleObjectBase> 
    
    <SimpleObject Name="Face" ID="10">              
        <Attribute Type="Detect">HaarFace</Attribute>            
    </SimpleObject>
    
    <SimpleObject Name="CnnPerson" ID="67">              
        <Attribute Type="Detect">CnnPerson</Attribute>        
    </SimpleObject>    
    
</SimpleObjectBase>


<RelationLib>    
    
    <RelationShip Type="SpaceIn" Name="in"/>
    
</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>

SpaceIn example

A Complex Object matches the faces and shapes in the image based on the position of the face in the shape rectangle.

Clone this wiki locally