|
| auto | annotate (const std::filesystem::path &dbPath, const std::filesystem::path &modelPath, const AnnotationConfig &config=AnnotationConfig{}) -> int |
| | Run semantic annotation on sensor frames using ML models.
|
| bool | is_sequence_boundary (std::size_t index, int node_id, int prev_id) |
| | Whether the video tracker must reset before the frame at index.
|
| std::unique_ptr< IModel > | create_model_from_path (const std::filesystem::path &modelPath, bool use_cuda) |
| | Detect the backend + model kind from modelPath and build the model.
|
| torch::Tensor | xyxy_to_xywh (const torch::Tensor &x) |
| | Convert bounding boxes from (x1,y1,x2,y2) to (cx,cy,w,h) format.
|
| torch::Tensor | xywh_to_xyxy (const torch::Tensor &x) |
| | Convert bounding boxes from (cx,cy,w,h) to (x1,y1,x2,y2) format.
|
| torch::Tensor | nms (const torch::Tensor &bboxes, const torch::Tensor &scores, float iou_threshold=0.45) |
| | Non-maximum suppression on bounding boxes.
|
| torch::Tensor | non_max_suppression (torch::Tensor predictions, float confThreshold=0.25, float iouThreshold=0.45, int maxDetections=300) |
| | YOLO-style non-maximum suppression with class-aware filtering.
|
| auto | project (const ProjectDB &db, CloudConstPtr cloud) -> CloudLPtr |
| | Project the labels stored in the database on tho the assebled point cloud.
|
| cv::Mat | segment_panorama (IModel &model, const cv::Mat &equirect_bgr, const SegmentPanoramaOptions &opts) |
| | Segment a 360 equirectangular panorama with a SAM3 model.
|
| float | generate_scale (const cv::Mat &image, const cv::Size &target_size, bool scale_up=false) |
| float | letterbox (cv::Mat &input_image, cv::Mat &output_image, const cv::Size &target_size) |
| float | cropbox (cv::Mat &input_image, cv::Mat &output_image, const cv::Size &target_size) |
| bool reusex::vision::is_sequence_boundary |
( |
std::size_t | index, |
|
|
int | node_id, |
|
|
int | prev_id ) |
|
inline |
Whether the video tracker must reset before the frame at index.
A stateful video model must start a fresh temporal memory at the beginning of every ordered sequence. Within one scan the sensor-frame node ids increase monotonically (small forward gaps from dropped frames are normal and must NOT trigger a reset), so a boundary is only the very first frame (index 0) or a point where the node id fails to increase — which happens when a dataset concatenates multiple sequences that restart their numbering.
Kept as a free function (independent of any tracker/dataset object) so the boundary logic can be unit-tested directly.
- Parameters
-
| index | Position in the (possibly prefix-trimmed) ordered list. |
| node_id | Node id of the frame at index. |
| prev_id | Node id of the frame at index-1 (unused when index==0). |
- Returns
- true if the tracker should reset before processing this frame.
Definition at line 63 of file annotate.hpp.
| torch::Tensor reusex::vision::nms |
( |
const torch::Tensor & | bboxes, |
|
|
const torch::Tensor & | scores, |
|
|
float | iou_threshold = 0.45 ) |
Non-maximum suppression on bounding boxes.
The algorithm is torchvision's reference CPU kernel, vendored under BSD-3-Clause in vision/third_party/torchvision_nms_kernel.hpp (#141). This wrapper owns the ReUseX-facing contract: CPU, float32, empty input tolerated.
Boxes are suppressed when IoU is strictly greater than iou_threshold, so a threshold of 1.0 suppresses nothing and ties at the threshold survive. Equal scores are broken towards the lower index (the sort is stable).
- Parameters
-
| bboxes | Bounding boxes tensor [N, 4] in xyxy format. CPU, float32. |
| scores | Confidence scores tensor [N]. CPU, float32. |
| iou_threshold | IoU threshold for suppression. |
- Returns
- Indices of kept boxes, in descending score order (int64).
- Exceptions
-
| c10::Error | if the tensors are not CPU float32, or are malformed. |