25#include <opencv2/imgproc.hpp>
26#include <opencv2/opencv.hpp>
28#include "modules/perception/camera_detection_multi_stage/detector/yolox3d/proto/model_param.pb.h"
43 if (stream_ !=
nullptr) {
44 cudaStreamDestroy(stream_);
68 std::string
Name()
const override {
return "Yolox3DObstacleDetector"; }
112 const std::string &model_path);
119 std::shared_ptr<inference::Inference> net_3D_;
123 cudaStream_t stream_ =
nullptr;
129 int image_width_ = 0;
130 int image_height_ = 0;
131 float confidence_threshold_ = 0.f;
133 float border_ratio_ = 0.f;
A wrapper around Blob holders serving as the basic computational unit for images.
bool Init(const ObstacleDetectorInitOptions &options=ObstacleDetectorInitOptions()) override
Necessary, Init yolox3d model params normal, but now use pipline instead
std::string Name() const override
return detector name
virtual ~Yolox3DObstacleDetector()
bool Detect(onboard::CameraFrame *frame) override
Detect stage
bool Init3DNetwork(const common::ModelInfo &model_info, const std::string &model_path)
Init model inference
void LoadInputShape(const yolox3d::ModelParam &model_param)
Resize model input picture size according to the config file
void LoadParam(const yolox3d::ModelParam &model_param)
Load yolo libtorch model params from model file
bool Preprocess(const base::Image8U *image, base::BlobPtr< float > input_blob)
Preprocess of image before inference, resize input data blob and fill image data to blob
void Yolo3DInference(const base::Image8U *image, base::ObjectPtr obj)
Load yolo3D libtorch model params from model file
Yolox3DObstacleDetector()
std::shared_ptr< Object > ObjectPtr
std::shared_ptr< Blob< Dtype > > BlobPtr