23#include <opencv2/opencv.hpp>
25#include "modules/perception/camera_detection_multi_stage/detector/yolox3d/proto/model_param.pb.h"
46 const yolox3d::ModelParam &model_param,
47 const yolox3d::NMSParam &nms_param,
const int width,
48 const int height,
const int image_width,
49 const int image_height,
50 std::vector<base::ObjectPtr> *objects);
59 const yolox3d::ModelParam &model_param,
61 std::vector<std::vector<float>> *objects_out);
73void YoloxFillBase(
const std::vector<float> &detect,
const int width,
74 const int height,
const int image_width,
93 const std::vector<float> &box2);
104 const int image_height);
114constexpr T
Yoloxclamp(
const T &val,
const T &low,
const T &high) {
115 return val < low ? low : (high < val ? high : val);
std::shared_ptr< Object > ObjectPtr
void YoloxGetAllObjects(const float *data, const yolox3d::ModelParam &model_param, const float scale, std::vector< std::vector< float > > *objects_out)
Get all objects accoring to confidence
float YoloxBboxIOU(const std::vector< float > &box1, const std::vector< float > &box2)
Computes IoU between bboxes.
constexpr T Yoloxclamp(const T &val, const T &low, const T &high)
Clamp target value between low and high tools for iou
void YoloxGetObjectsCpu(const std::shared_ptr< base::Blob< float > > &objects_blob, const yolox3d::ModelParam &model_param, const yolox3d::NMSParam &nms_param, const int width, const int height, const int image_width, const int image_height, std::vector< base::ObjectPtr > *objects)
Return Yolox Objects
void YoloxFillBase(const std::vector< float > &detect, const int width, const int height, const int image_width, const int image_height, base::ObjectPtr obj)
Get 2dbbox for objects
void YoloxFillBbox3d(const yolox3d::ModelParam &model_param, const std::vector< float > &detect, base::ObjectPtr obj)
Add 3d bbox values for objects
void YoloxTruncated(base::ObjectPtr obj, const int image_width, const int image_height)
object is truncated or not