23 #ifndef TVM_RELAX_ATTRS_VISION_H_
24 #define TVM_RELAX_ATTRS_VISION_H_
26 #include <tvm/ffi/string.h>
42 refl::ObjectDef<AllClassNonMaximumSuppressionAttrs>().def_ro(
44 "Output format, onnx or tensorflow. Returns outputs in a way that can be easily "
45 "consumed by each frontend.");
62 refl::ObjectDef<ROIAlignAttrs>()
65 "Ratio of input feature map height (or width) to raw image height (or width).")
67 "Optional sampling ratio of ROI align, using adaptive size by default.")
69 "Whether to use the aligned ROIAlign semantics without the legacy 1-pixel clamp.")
84 refl::ObjectDef<ROIPoolAttrs>()
87 "Ratio of input feature map height (or width) to raw image height (or width).")
101 refl::ObjectDef<GetValidCountsAttrs>()
103 "Lower limit of score for valid bounding boxes.")
105 "Index of the class categories, -1 to disable.")
107 "Index of the scores/confidence of boxes.");
128 refl::ObjectDef<NonMaximumSuppressionAttrs>()
130 "Max number of output valid boxes, -1 for no limit.")
132 "Non-maximum suppression IoU threshold.")
134 "Whether to suppress all detections regardless of class_id.")
136 "Keep maximum top k detections before nms, -1 for no limit.")
138 "Start index of the consecutive 4 coordinates.")
140 "Index of the scores/confidence of boxes.")
142 "Index of the class categories, -1 to disable.")
144 "Whether to return box indices in input data.")
146 "Whether to move all valid bounding boxes to the top.");
161 refl::ObjectDef<MultiboxTransformLocAttrs>()
163 "Clip decoded ymin,xmin,ymax,xmax to [0,1].")
165 "After softmax, zero scores strictly below this value.")
167 "(x,y,w,h) scales = TFLite 1/x_scale,1/y_scale,1/w_scale,1/h_scale on "
168 "encodings. Very large w/h scales can overflow exp in decode.")
170 "If false, force output scores[:,0,:] to 0 (background class).");
Helpers for attribute objects.
Adapter for AttrsNode with the new reflection API.
Definition: attrs.h:384
Base class of all attribute class.
Definition: attrs.h:101
IR/AST nodes for the unified type system in TVM.
Definition: repr_printer.h:91
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition: analyzer.h:37
A managed object in the TVM runtime.
Attributes used in AllClassNonMaximumSuppression operator.
Definition: vision.h:37
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.AllClassNonMaximumSuppressionAttrs", AllClassNonMaximumSuppressionAttrs, BaseAttrsNode)
static void RegisterReflection()
Definition: vision.h:40
ffi::String output_format
Definition: vision.h:38
Attributes used in GetValidCounts operator.
Definition: vision.h:94
int id_index
Definition: vision.h:96
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.GetValidCountsAttrs", GetValidCountsAttrs, BaseAttrsNode)
static void RegisterReflection()
Definition: vision.h:99
int score_index
Definition: vision.h:97
double score_threshold
Definition: vision.h:95
Attributes used in NonMaximumSuppression operator.
Definition: vision.h:115
bool return_indices
Definition: vision.h:123
bool force_suppress
Definition: vision.h:118
int score_index
Definition: vision.h:121
double iou_threshold
Definition: vision.h:117
int top_k
Definition: vision.h:119
int id_index
Definition: vision.h:122
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.NonMaximumSuppressionAttrs", NonMaximumSuppressionAttrs, BaseAttrsNode)
static void RegisterReflection()
Definition: vision.h:126
int max_output_size
Definition: vision.h:116
bool invalid_to_bottom
Definition: vision.h:124
int coord_start
Definition: vision.h:120
Attributes used in ROIAlign operator.
Definition: vision.h:52
static void RegisterReflection()
Definition: vision.h:60
ffi::String layout
Definition: vision.h:57
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.ROIAlignAttrs", ROIAlignAttrs, BaseAttrsNode)
bool aligned
Definition: vision.h:56
double spatial_scale
Definition: vision.h:54
ffi::String mode
Definition: vision.h:58
int sample_ratio
Definition: vision.h:55
ffi::Array< int64_t > pooled_size
Definition: vision.h:53
Attributes used in ROIPool operator.
Definition: vision.h:77
ffi::String layout
Definition: vision.h:80
static void RegisterReflection()
Definition: vision.h:82
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("relax.attrs.ROIPoolAttrs", ROIPoolAttrs, BaseAttrsNode)
double spatial_scale
Definition: vision.h:79
ffi::Array< int64_t > pooled_size
Definition: vision.h:78