AttributeFilters - Extended-Object-Detection-ROS/wiki_english GitHub Wiki
Filtering the results of recognition of specific attributes in the detection mode is carried out. In contrast to attributes in the check mode, they can work not with a specific result, but with the entire set.
The filter removes the circumscribing rectangles if they are completely within another rectangle of the same attribute recognized at this stage.
This filter was created primarily to work with color attributes, such as (threshold filtering and historgam filtering).
<?xml version="1.0" ?>
<AttributeLib>
<Attribute Name="HistColorPink" Type="HistColor" Histogram="histograms/Pink.yaml"/>
<Attribute Name="HistColorOrange" Type="HistColor" Histogram="histograms/Orange.yaml"/>
<Attribute Name="PinkOrOrange" Type="LogicOr" iou="0.5" A="HistColorPink" B="HistColorOrange"/>
<Attribute Name="PinkOrOrangeFiltered" Type="LogicOr" iou="0.5" A="HistColorPink" B="HistColorOrange">
<Filter Type="Insider"/>
</Attribute>
</AttributeLib>
<SimpleObjectBase>
<SimpleObject Name="PinkOrOrangeSticker" ID="5">
<Attribute Type="Detect">PinkOrOrange</Attribute>
</SimpleObject>
<SimpleObject Name="PinkOrOrangeStickerFiltered" ID="8">
<Attribute Type="Detect">PinkOrOrangeFiltered</Attribute>
</SimpleObject>
</SimpleObjectBase>
A filter often used in neural network recognition tasks in architectures like YOLO. Removes rectangles that have an IOU above the threshold with other rectangles recognized at this stage and have a lower score.
- threshold (double, default: 0.75) IOU threshold.
<Attribute Name="CnnFiltered" 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.3" obj_id="-1">
<Filter Type="NMS" threshold="0.5"/>
</Attribute>
Removes rectangles that do not completely lie in the specified region of the image. Roughly the same thing is done by attribute of position on the screen.
- x (int, default: 0) x value of ROI in pixels
- y (int, default: 0) y value of ROI in pixels
- w (int, default: 0) width ROI in pixels
- h (int, default: 0) heigth ROI in pixels
<Attribute Name="HistColorOrangeUpper" Type="HistColor" Histogram="histograms/Orange.yaml">
<Filter Type="ROI" x="0" y="0" w="640" h="240"/>
</Attribute>
This filter leaves only areas in the upper half of the image.