Files
VideoPipe/nodes/infers/vp_trt_vehicle_scanner.h
2026-06-03 12:43:14 +08:00

24 lines
1.0 KiB
C++

#pragma once
#ifdef VP_WITH_TRT
#include "../vp_primary_infer_node.h"
#include "../../third_party/trt_vehicle/models/vehicle_scanner.h"
namespace vp_nodes {
// vehicle scanner based on tensorrt using trt_vehicle library
class vp_trt_vehicle_scanner: public vp_primary_infer_node
{
private:
std::shared_ptr<trt_vehicle::VehicleScanner> vehicle_scanner = nullptr;
protected:
// we need a totally new logic for the whole infer combinations
// no separate step pre-defined needed in base class
virtual void run_infer_combinations(const std::vector<std::shared_ptr<vp_objects::vp_frame_meta>>& frame_meta_with_batch) override;
// override pure virtual method, for compile pass
virtual void postprocess(const std::vector<cv::Mat>& raw_outputs, const std::vector<std::shared_ptr<vp_objects::vp_frame_meta>>& frame_meta_with_batch) override;
public:
vp_trt_vehicle_scanner(std::string node_name, std::string vehicle_scan_model_path = "");
~vp_trt_vehicle_scanner();
};
}
#endif