123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- #ifndef MODULES_INFERENCE_INCLUDE_PREPROC_HPP_
- #define MODULES_INFERENCE_INCLUDE_PREPROC_HPP_
- #include <memory>
- #include <string>
- #include <unordered_map>
- #include <utility>
- #include <vector>
- #include "easyinfer/model_loader.h"
- #include "cnstream_frame.hpp"
- #include "cnstream_frame_va.hpp"
- #include "reflex_object.h"
- namespace cnstream {
- class Preproc : virtual public ReflexObjectEx<Preproc> {
- public:
-
- virtual ~Preproc() {}
-
- static Preproc* Create(const std::string& proc_name);
-
- virtual bool Init(const std::unordered_map<std::string, std::string> ¶ms) { return true; }
-
- virtual int Execute(const std::vector<float*>& net_inputs, const std::shared_ptr<edk::ModelLoader>& model,
- const CNFrameInfoPtr& package) = 0;
- };
- class ObjPreproc : virtual public ReflexObjectEx<ObjPreproc> {
- public:
-
- virtual ~ObjPreproc() {}
-
- static ObjPreproc* Create(const std::string& proc_name);
-
- virtual bool Init(const std::unordered_map<std::string, std::string> ¶ms) { return true; }
-
- virtual int Execute(const std::vector<float*>& net_inputs, const std::shared_ptr<edk::ModelLoader>& model,
- const CNFrameInfoPtr& finfo, const std::shared_ptr<CNInferObject>& pobj) = 0;
- };
- }
- #endif
|