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.");
71 .describe(
"Variances to be decoded from box regression output.");
74 .describe(
"Whether to keep boxes detected as background or not");
104 .describe(
"Suppress all detections regardless of class_id.");
106 "Keep maximum top k detections before nms, -1 for no limit.");
109 .describe(
"Start index of the consecutive 4 coordinates.");
114 .describe(
"Whether to return box indices in input data.");
117 .describe(
"Whether to move all invalid bounding boxes to the bottom.");
127 "relay.attrs.AllClassNonMaximumSuppressionAttrs") {
131 "Output format, onnx or tensorflow. Returns outputs in a way that can be easily "
132 "consumed by each frontend.");
146 "relay.attrs.RegularNonMaximumSuppressionAttrs") {
148 .describe(
"The maxinum number of output selected boxes per class.");
153 .describe(
"Score threshold to filter out low score boxes early.");
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]");
173 .describe(
"Optional sampling ratio of ROI align, using adaptive size by default.");
175 "Dimension ordering of data and weight. Can be 'NCHW', 'NHWC', etc."
176 "'N', 'C', 'H', 'W' stands for batch, channel, height, and width"
177 "dimensions respectively. Convolution is applied on the 'H' and"
180 "Mode for ROI Align. Can be 'avg' or 'max'. The default mode is 'avg'.");
193 "Ratio of input feature map height (or w) to raw image height (or w). "
194 "Equals the reciprocal of total stride in convolutional layers, which should be "
195 "in range (0.0, 1.0]");
197 "Dimension ordering of data and weight. Can be 'NCHW', 'NHWC', etc."
198 "'N', 'C', 'H', 'W' stands for batch, channel, height, and width"
199 "dimensions respectively. Convolution is applied on the 'H' and"
227 .describe(
"Used to generate anchor windows by enumerating scales");
230 .describe(
"Used to generate anchor windows by enumerating ratios");
234 "The size of the receptive field each unit in the convolution layer of the rpn,"
235 "for example the product of all stride's prior to this layer.");
237 "IoU threshold of non-maximum suppresion (suppress boxes with IoU >= this threshold)");
240 .describe(
"Number of top scoring boxes to apply NMS. -1 to use all boxes");
243 .describe(
"Number of top scoring boxes to keep after applying NMS to RPN proposals");
The base class of the all the Use "curiously recurring template pattern".
Definition: attrs.h:870
Container of constant int that adds more constructors.
Definition: expr.h:632
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:289
Optional container that to represent to a Nullable variant of T.
Definition: optional.h:51
Helpers for attribute objects.
#define TVM_ATTR_FIELD(FieldName)
Declare an attribute field.
Definition: attrs.h:76
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
Base classes for the Relay IR.
Attributes used in all_class_non_maximum_suppression operator.
Definition: vision.h:123
TVM_DECLARE_ATTRS(AllClassNonMaximumSuppressionAttrs, "relay.attrs.AllClassNonMaximumSuppressionAttrs")
Definition: vision.h:126
std::string output_format
Definition: vision.h:124
Attributes used in get_valid_counts operator.
Definition: vision.h:79
TVM_DECLARE_ATTRS(GetValidCountsAttrs, "relay.attrs.GetValidCountsAttrs")
Definition: vision.h:84
int score_index
Definition: vision.h:82
int id_index
Definition: vision.h:81
Optional< FloatImm > score_threshold
Definition: vision.h:80
Attributes used in multibox_prior operators.
Definition: vision.h:36
Array< IndexExpr > steps
Definition: vision.h:39
Array< IndexExpr > offsets
Definition: vision.h:40
TVM_DECLARE_ATTRS(MultiBoxPriorAttrs, "relay.attrs.MultiBoxPriorAttrs")
Definition: vision.h:43
bool clip
Definition: vision.h:41
Array< IndexExpr > sizes
Definition: vision.h:37
Array< IndexExpr > ratios
Definition: vision.h:38
Attributes used in non_maximum_suppression operator.
Definition: vision.h:92
int coord_start
Definition: vision.h:95
int id_index
Definition: vision.h:97
bool invalid_to_bottom
Definition: vision.h:99
bool return_indices
Definition: vision.h:98
TVM_DECLARE_ATTRS(NonMaximumSuppressionAttrs, "relay.attrs.NonMaximumSuppressionAttrs")
Definition: vision.h:101
int top_k
Definition: vision.h:94
int score_index
Definition: vision.h:96
bool force_suppress
Definition: vision.h:93
Attributes used in proposal operators.
Definition: vision.h:214
bool iou_loss
Definition: vision.h:222
Array< IndexExpr > scales
Definition: vision.h:215
int feature_stride
Definition: vision.h:217
int rpn_pre_nms_top_n
Definition: vision.h:219
TVM_DECLARE_ATTRS(ProposalAttrs, "relay.attrs.ProposalAttrs")
Definition: vision.h:224
int rpn_min_size
Definition: vision.h:221
Array< IndexExpr > ratios
Definition: vision.h:216
double threshold
Definition: vision.h:218
int rpn_post_nms_top_n
Definition: vision.h:220
Attributes used in roi_align operators.
Definition: vision.h:158
double spatial_scale
Definition: vision.h:160
std::string layout
Definition: vision.h:162
TVM_DECLARE_ATTRS(ROIAlignAttrs, "relay.attrs.ROIAlignAttrs")
Definition: vision.h:164
int sample_ratio
Definition: vision.h:161
std::string mode
Definition: vision.h:163
Array< IndexExpr > pooled_size
Definition: vision.h:159
Attributes used in roi_pool operators.
Definition: vision.h:185
Array< IndexExpr > pooled_size
Definition: vision.h:186
TVM_DECLARE_ATTRS(ROIPoolAttrs, "relay.attrs.ROIPoolAttrs")
Definition: vision.h:189
std::string layout
Definition: vision.h:188
double spatial_scale
Definition: vision.h:187
Attributes used in regular_non_maximum_suppression operator.
Definition: vision.h:138
int32_t max_detections
Definition: vision.h:140
int32_t num_classes
Definition: vision.h:141
TVM_DECLARE_ATTRS(RegularNonMaximumSuppressionAttrs, "relay.attrs.RegularNonMaximumSuppressionAttrs")
Definition: vision.h:145
int32_t max_detections_per_class
Definition: vision.h:139
double score_threshold
Definition: vision.h:143
double iou_threshold
Definition: vision.h:142
Attributes used in yolo reorg operators.
Definition: vision.h:205
Integer stride
Definition: vision.h:206
TVM_DECLARE_ATTRS(YoloReorgAttrs, "relay.attrs.YoloReorgAttrs")
Definition: vision.h:208