-
Notifications
You must be signed in to change notification settings - Fork 1
DnnAttribute
Moscowsky Anton edited this page Mar 31, 2021
·
11 revisions
An attribute that recognizes images using the dnn module from OpenCV. Minimum OpenCV version: 3.4.1 (while ROS Melodic comes with 3.2.0, Noetic is recommended) To use networks from other frameworks in this module, you do not need to install them.
Modes | Accuracy assessment | 3D-translation | 3D-rotation | Contour extraction | Additional info |
---|---|---|---|---|---|
D | D | ❌ | ❌ | - | ID and name in CNN |
Returns areas with objects recognized by CNN and having a probability not lower than Probability.
Not implemented
Not implemented
- Name (string, must be set) attribute unique name
- Type (string, must be "Dnn") attribute type
- Weight (double, default: 1) attribute weight
- Probability (double, default: 0.75) acceptable detection accuracy, used in Detect mode.
- Contour (bool, default: true) Returns the contour of the attribute if true.
- framework (string, must be set) Framework options available: darknet, tensorflow.
- weights (string, must be set) The path to the scale file. See the table below for more information.
- config (string, must be set) The path to the configuration file. See the table below for more information.
- labels (string, default: "") The path to the file with the names of the labels. Optional parameter, needed only if you need to fix the name of the object on the network.
- forceCuda (int, default: 0) For some computers (for example, the Jetson series), you need to set 1 to enable network acceleration using CUDA and cuDNN.
- inputWidth (int, default: 300) The width of the input image to the network. TODO: extract automatically from config
- inputHeight (int, default: 300) The height of the input image to the network. TODO: extract automatically from config
- obj_id (int, default: -1) Object identifier for recognition, if -1 then all network objects are returned.
<?xml version="1.0" ?>
<AttributeLib>
<Attribute Name="COCO_Dnn" 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.75" obj_id="-1"/>
</AttributeLib>
<SimpleObjectBase>
<SimpleObject Name="COCO_dnn_object" ID="60">
<Attribute Type="Detect">COCO_Dnn</Attribute>
</SimpleObject>
</SimpleObjectBase>
As you can see in the example, the name of the attribute is followed by the id and the name of the image on the network in curly and parentheses. The files for this example are included with the package.
Framework | Weight File | Config File | Label File |
---|---|---|---|
DarkNet | .weight file | .cfg file | |
TensorFlow | frozen_inference_graph.pb files | generated .pbtxt file | .pbtxt file |
- Home
- ROS-interface
- Interacting with a package through a configuration file
- Common structure of the configuration file
-
Simple objects
- Clusterization
- Filtering
- Tracking
- Attributes
- HSVcolor
- HistColor
- HaarCascade
- Size
- Hough
- Dimension
- BasicMotion
- Aruco
- Feature
- Pose
- DNN
- QR
- QR_Zbar
- LogicAnd
- LogicNot
- LogicOr
- Blob
- Depth
- RoughDist
- Dist
- FaceDlib
- ExractedInfoId
- ExractedInfoString
- UnitTranslation
- SquareObjectDistance
- TorchYOLOv7Attribute
- TorchYOLOv7KeypointAttribute
- ROSSubcriberOpenPoseRaw
- DummyHumanPose
- Complex objects
- Install Guides
- Usage Guides
- Troubleshooting