1 #ifndef _NNDEPLOY_PREPROCESS_BATCH_PREPROCESS_H_
2 #define _NNDEPLOY_PREPROCESS_BATCH_PREPROCESS_H_
24 namespace preprocess {
29 key_ =
"nndeploy::preprocess::BatchPreprocess";
30 desc_ =
"std::vector<cv::Mat> to device::Tensor, support all preprocess nodes[cv::Mat->device::Tensor]";
31 this->setInputTypeInfo<std::vector<cv::Mat>>();
32 this->setOutputTypeInfo<device::Tensor>();
35 std::vector<dag::Edge *> outputs)
36 : dag::CompositeNode(name, inputs, outputs) {
37 key_ =
"nndeploy::preprocess::BatchPreprocess";
38 desc_ =
"std::vector<cv::Mat> to device::Tensor, support all preprocess nodes[cv::Mat->device::Tensor]";
39 this->setInputTypeInfo<std::vector<cv::Mat>>();
40 this->setOutputTypeInfo<device::Tensor>();
56 rapidjson::Document::AllocatorType &allocator);
63 std::string node_key_ =
"";
Composite node Composite node is a special type of node in nndeploy that enhances the capabilities of...
virtual base::Status setParamSharedPtr(std::shared_ptr< base::Param > param)
Set parameter (shared pointer)
base::DataFormat getDataFormat()
virtual base::Status serialize(rapidjson::Value &json, rapidjson::Document::AllocatorType &allocator)
Serialize to JSON.
virtual base::Status run()
Run node (pure virtual function)
virtual base::Param * getParam()
Get parameter.
BatchPreprocess(const std::string &name)
base::Status setNodeKey(const std::string &key)
virtual base::Status setParam(base::Param *param)
Set parameter.
base::Status setDataFormat(base::DataFormat data_format)
virtual std::shared_ptr< base::Param > getParamSharedPtr()
Get parameter (shared pointer)
BatchPreprocess(const std::string &name, std::vector< dag::Edge * > inputs, std::vector< dag::Edge * > outputs)
virtual ~BatchPreprocess()
virtual base::Status deserialize(rapidjson::Value &json)
Deserialize from JSON.
#define NNDEPLOY_CC_API
api