- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1
 
TorchYOLOv7Attribute
        moscowsky edited this page Jun 5, 2024 
        ·
        7 revisions
      
    This attributes uses YOLOv7 models for object detection. Libtorch is used for detecting and have to be installed.
| Modes | Accuracy assessment | 3D-translation | 3D-rotation | Contour extraction | Additional info | 
|---|---|---|---|---|---|
| D | D | ❌ | ❌ | ❌ | <Attribute_name>:class_id, <Attribute_name>:class_label | 
Returns areas with objects recognized by YOLOv7 and having a probability not lower than Probability.
Not implemented
Not implemented
- Name (string, must be set) attribute unique name
 - Type (string, must be "TorchYOLOv7") 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.
 
- 
model_path (string, must be set) The path to the weight 
.ptfile, which must be exported from pytorch (see below). - input_size (int, default: 640) Width and height for CNN input, for most YOLOv7 models is 640.
 - 
labels (string, default: none) if provided adds labels to info and visualization. Labels format is 
.txtfile where each label on each line. - force_cuda (int: default: 0) if not 0, tries to run on CUDA (needs proper installation of it)
 
<?xml version="1.0" ?>
<AttributeLib>
    
    
    <Attribute Name="torch" Type="torchyolov7" model_path="/home/anton/Projects/yolov7/yolov7-tiny.torchscript.pt" input_size="640" Probability="0.2">
        <Filter Type="NMS" threshold="0.5"/>
    </Attribute>
</AttributeLib>
<SimpleObjectBase>  
    
     <SimpleObject Name="torch" ID="0"  Probability="0.2">
        <Attribute Type="Detect">torch</Attribute>                            
    </SimpleObject>
    
</SimpleObjectBase>Use export.py script from original repository like:
python export.py --weights yolov7-tiny.pt --gridThis will create file yolov7-tiny.torchscript.pt that can be used.
- 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