24 #ifndef TVM_RELAY_ATTRS_VISION_H_ 25 #define TVM_RELAY_ATTRS_VISION_H_ 46 .describe(
"List of sizes of generated MultiBoxPriores.");
49 .describe(
"List of aspect ratios of generated MultiBoxPriores.");
51 .set_default(
Array<IndexExpr>({
static_cast<float>(-1.0),
static_cast<float>(-1.0)}))
52 .describe(
"Priorbox step across y and x, -1 for auto calculation.");
54 .set_default(
Array<IndexExpr>({
static_cast<float>(0.5),
static_cast<float>(0.5)}))
55 .describe(
"Priorbox center offsets, y and x respectively.");
56 TVM_ATTR_FIELD(clip).set_default(
false).describe(
"Whether to clip out-of-boundary boxes.");
66 TVM_ATTR_FIELD(clip).set_default(
true).describe(
"Clip out-of-boundary boxes.");
67 TVM_ATTR_FIELD(threshold).set_default(0.01).describe(
"Threshold to be a positive prediction.");
70 .describe(
"Variances to be decoded from box regression output.");
81 TVM_ATTR_FIELD(score_threshold).describe(
"Lower limit of score for valid bounding boxes.");
82 TVM_ATTR_FIELD(id_index).set_default(0).describe(
"Axis index of id.");
83 TVM_ATTR_FIELD(score_index).set_default(1).describe(
"Index of the scores/confidence of boxes.");
100 .describe(
"Suppress all detections regardless of class_id.");
102 "Keep maximum top k detections before nms, -1 for no limit.");
105 .describe(
"Start index of the consecutive 4 coordinates.");
106 TVM_ATTR_FIELD(score_index).set_default(1).describe(
"Index of the scores/confidence of boxes.");
107 TVM_ATTR_FIELD(id_index).set_default(0).describe(
"Axis index of id.");
110 .describe(
"Whether to return box indices in input data.");
113 .describe(
"Whether to move all invalid bounding boxes to the bottom.");
123 "relay.attrs.AllClassNonMaximumSuppressionAttrs") {
127 "Output format, onnx or tensorflow. Returns outputs in a way that can be easily " 128 "consumed by each frontend.");
140 TVM_ATTR_FIELD(pooled_size).describe(
"Output size of roi align.");
143 "Ratio of input feature map height (or w) to raw image height (or w). " 144 "Equals the reciprocal of total stride in convolutional layers, which should be " 145 "in range (0.0, 1.0]");
148 .describe(
"Optional sampling ratio of ROI align, using adaptive size by default.");
150 "Dimension ordering of data and weight. Can be 'NCHW', 'NHWC', etc." 151 "'N', 'C', 'H', 'W' stands for batch, channel, height, and width" 152 "dimensions respectively. Convolution is applied on the 'H' and" 155 "Mode for ROI Align. Can be 'avg' or 'max'. The default mode is 'avg'.");
168 "Ratio of input feature map height (or w) to raw image height (or w). " 169 "Equals the reciprocal of total stride in convolutional layers, which should be " 170 "in range (0.0, 1.0]");
172 "Dimension ordering of data and weight. Can be 'NCHW', 'NHWC', etc." 173 "'N', 'C', 'H', 'W' stands for batch, channel, height, and width" 174 "dimensions respectively. Convolution is applied on the 'H' and" 184 TVM_ATTR_FIELD(stride).set_default(1).describe(
"Stride value for yolo reorg");
202 .describe(
"Used to generate anchor windows by enumerating scales");
205 .describe(
"Used to generate anchor windows by enumerating ratios");
209 "The size of the receptive field each unit in the convolution layer of the rpn," 210 "for example the product of all stride's prior to this layer.");
212 "IoU threshold of non-maximum suppresion (suppress boxes with IoU >= this threshold)");
215 .describe(
"Number of top scoring boxes to apply NMS. -1 to use all boxes");
218 .describe(
"Number of top scoring boxes to keep after applying NMS to RPN proposals");
219 TVM_ATTR_FIELD(rpn_min_size).set_default(16).describe(
"Minimum height or width in proposal");
220 TVM_ATTR_FIELD(iou_loss).set_default(
false).describe(
"Usage of IoU Loss");
226 #endif // TVM_RELAY_ATTRS_VISION_H_ int sample_ratio
Definition: vision.h:136
double spatial_scale
Definition: vision.h:162
double threshold
Definition: vision.h:193
bool force_suppress
Definition: vision.h:89
double spatial_scale
Definition: vision.h:135
int feature_stride
Definition: vision.h:192
Optional< FloatImm > score_threshold
Definition: vision.h:76
Attributes used in all_class_non_maximum_suppression operator.
Definition: vision.h:118
int score_index
Definition: vision.h:78
Array< IndexExpr > ratios
Definition: vision.h:38
int id_index
Definition: vision.h:77
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
TVM_DECLARE_ATTRS(AllClassNonMaximumSuppressionAttrs, "relay.attrs.AllClassNonMaximumSuppressionAttrs")
Definition: vision.h:122
bool return_indices
Definition: vision.h:94
Array< IndexExpr > steps
Definition: vision.h:39
bool clip
Definition: vision.h:41
bool invalid_to_bottom
Definition: vision.h:95
Attributes used in roi_pool operators.
Definition: vision.h:160
Attributes used in proposal operators.
Definition: vision.h:189
bool iou_loss
Definition: vision.h:197
Array< IndexExpr > scales
Definition: vision.h:190
Helpers for attribute objects.
std::string output_format
Definition: vision.h:120
TVM_DECLARE_ATTRS(GetValidCountsAttrs, "relay.attrs.GetValidCountsAttrs")
Definition: vision.h:80
std::string layout
Definition: vision.h:137
Attributes used in non_maximum_suppression operator.
Definition: vision.h:88
TVM_DECLARE_ATTRS(ROIAlignAttrs, "relay.attrs.ROIAlignAttrs")
Definition: vision.h:139
Integer stride
Definition: vision.h:181
int rpn_post_nms_top_n
Definition: vision.h:195
TVM_DECLARE_ATTRS(ROIPoolAttrs, "relay.attrs.ROIPoolAttrs")
Definition: vision.h:164
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:289
Attributes used in multibox_prior operators.
Definition: vision.h:36
int rpn_pre_nms_top_n
Definition: vision.h:194
std::string mode
Definition: vision.h:138
Array< IndexExpr > pooled_size
Definition: vision.h:161
#define TVM_ATTR_FIELD(FieldName)
Declare an attribute field.
Definition: attrs.h:76
Attributes used in roi_align operators.
Definition: vision.h:133
TVM_DECLARE_ATTRS(ProposalAttrs, "relay.attrs.ProposalAttrs")
Definition: vision.h:199
int coord_start
Definition: vision.h:91
Attributes used in get_valid_counts operator.
Definition: vision.h:75
int id_index
Definition: vision.h:93
Array< IndexExpr > sizes
Definition: vision.h:37
int score_index
Definition: vision.h:92
TVM_DECLARE_ATTRS(YoloReorgAttrs, "relay.attrs.YoloReorgAttrs")
Definition: vision.h:183
Array< IndexExpr > ratios
Definition: vision.h:191
The base class of the all the Use "curiously recurring template pattern".
Definition: attrs.h:834
Array< IndexExpr > offsets
Definition: vision.h:40
Array< IndexExpr > pooled_size
Definition: vision.h:134
Base classes for the Relay IR.
Optional container that to represent to a Nullable variant of T.
Definition: optional.h:51
int rpn_min_size
Definition: vision.h:196
TVM_DECLARE_ATTRS(NonMaximumSuppressionAttrs, "relay.attrs.NonMaximumSuppressionAttrs")
Definition: vision.h:97
Attributes used in yolo reorg operators.
Definition: vision.h:180
int top_k
Definition: vision.h:90
TVM_DECLARE_ATTRS(MultiBoxPriorAttrs, "relay.attrs.MultiBoxPriorAttrs")
Definition: vision.h:43
Container of constant int that adds more constructors.
Definition: expr.h:622
std::string layout
Definition: vision.h:163