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_);
63 std::string
Name()
const override {
64 return "Yolox3DObstacleDetector";
107 bool Init3DNetwork(
const common::ModelInfo &model_info,
const std::string &model_path);
114 std::shared_ptr<inference::Inference> net_3D_;
118 int max_batch_size_ = 32;
119 cudaStream_t stream_ =
nullptr;
125 int image_width_ = 0;
126 int image_height_ = 0;
127 float confidence_threshold_ = 0.f;
129 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
Interface for obstacle detector main part
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 Yolo3DInference(const base::Image8U *image, std::vector< base::ObjectPtr > &detect_objs)
Load yolo3D libtorch model params from model 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
Yolox3DObstacleDetector()
std::shared_ptr< Blob< Dtype > > BlobPtr