JeVoisBase  1.22
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
Loading...
Searching...
No Matches
MyPipeline Class Reference
Inheritance diagram for MyPipeline:
Collaboration diagram for MyPipeline:

Public Member Functions

virtual ~MyPipeline ()
 
void onParamChange (jevois::dnn::pipeline::postproc const &param, jevois::dnn::pipeline::PostProc const &val) override
 
std::shared_ptr< jevois::dnn::PostProcessorgetPostProcessor ()
 
std::shared_ptr< jevois::dnn::PreProcessorgetPreProcessor ()
 
- Public Member Functions inherited from jevois::dnn::Pipeline
 Pipeline (std::string const &instance)
 
virtual ~Pipeline ()
 
bool ready () const
 
void process (jevois::RawImage const &inimg, jevois::StdModule *mod, jevois::RawImage *outimg, jevois::OptGUIhelper *helper, bool idle=false)
 
void freeze (bool doit)
 
std::vector< ObjReco > const & latestRecognitions () const
 
std::vector< ObjDetect > const & latestDetections () const
 
std::vector< ObjDetectOBB > const & latestDetectionsOBB () const
 
std::vector< PoseSkeleton > const & latestSkeletons () const
 
 JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK (zooroot, std::string, "Path where to find zoo files (.yml). " "If not absolute, it is relative to this module's path", JEVOIS_SHARE_PATH "/dnn", ParamCateg)
 
 JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK (zoo, std::string, "Filename for neural network zoo file (.yml). " "If not absolute, it is relative to zooroot", "models.yml", ParamCateg)
 
 JEVOIS_DEFINE_ENUM_CLASS (Filter,(All)(OpenCV)(TPU)(NPU)(VPU)(VPUX)(NPUX)(SPU)(ORT))
 
 JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK (filter, Filter, "Filter to possibly only show as options in " "the 'pipe' parameter some class of models from the zoo", Filter::All, Filter_Values, ParamCateg)
 
 JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK (pipe, std::string, "Pipeline to use, which should correspond to a " "top-level entry in the zoo file. Network execution types are: OpenCV: " "on CPU, NPU: on JeVois NPU accelerator, TPU: on Coral Edge TPU if " "available, VPU: on MyriadX VPU if available, NPUX: on NPU via TimVX " "OpenCV extension, VPUX: on CPU via ARM-Compute OpenVino emulation " "of VPU, and SPU: on Hailo8 SPU if available.", "", ParamCateg)
 
 JEVOIS_DEFINE_ENUM_CLASS (PreProc,(Blob)(Python))
 
 JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK (preproc, PreProc, "Pre-Processor to use, usually set automatically " "by selecting a pipeline from the zoo file", PreProc::Blob, PreProc_Values, ParamCateg)
 
 JEVOIS_DEFINE_ENUM_CLASS (NetType,(OpenCV)(ORT)(NPU)(TPU)(SPU)(Python))
 
 JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK (nettype, NetType, "Network runtime framework to use, usually set " "automatically by selecting a pipeline from the zoo file", NetType::OpenCV, NetType_Values, ParamCateg)
 
 JEVOIS_DEFINE_ENUM_CLASS (PostProc,(Classify)(Detect)(DetectOBB)(Segment)(YuNet)(Pose)(Python)(Stub))
 
 JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK (postproc, PostProc, "Post-Processor to use, usually set automatically " "by selecting a pipeline from the zoo file", PostProc::Classify, PostProc_Values, ParamCateg)
 
 JEVOIS_DEFINE_ENUM_CLASS (Processing,(Sync)(Async))
 
 JEVOIS_DECLARE_PARAMETER (processing, Processing, "Type of processing: Sync runs pre-processing, " "network, and post-processing sequentially for every frame. Use for fast " "networks only, otherwise it will slow down the GUI... Async runs the network in " "a thread and should be used for networks slower than the camera framerate.", Processing::Async, Processing_Values, ParamCateg)
 
 JEVOIS_DECLARE_PARAMETER (overlay, bool, "Show some pipeline info as an overlay over output or GUI video", true, ParamCateg)
 
 JEVOIS_DECLARE_PARAMETER (paramwarn, bool, "Issue warning if parameters are specified in the zoo file for " "a pipeline, but the pipeline's component is not using them. Warnings appear " "in the console when the pipeline is loaded.", true, ParamCateg)
 
 JEVOIS_DECLARE_PARAMETER (statsfile, std::string, "Append pre/net/post timing statistics in HTML table format " "to the specified file if not empty. If path is relative, it is to " JEVOIS_SHARE_PATH, "", ParamCateg)
 
 JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK (benchmark, bool, "Cycle through all networks specified by filter and, " "for each, run it for a while and append pre/net/post timing statistics " "in HTML table format to " JEVOIS_SHARE_PATH "/benchmark.html", false, ParamCateg)
 
 JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK (extramodels, bool, "If true, show all available models, including older " "ones, in the pipe list otherwise, only those not marked 'extramodel' " "in their model zoo definition", false, ParamCateg)
 
- Public Member Functions inherited from jevois::Component
 Component (std::string const &instance)
 
virtual ~Component ()
 
std::shared_ptr< Comp > addSubComponent (std::string const &instance, Args &&...args)
 
void removeSubComponent (std::shared_ptr< Comp > &component)
 
void removeSubComponent (std::string const &instance, bool warnIfNotFound=true)
 
std::shared_ptr< Comp > getSubComponent (std::string const &instance) const
 
bool isTopLevel () const
 
bool initialized () const
 
std::string const & className () const
 
std::string const & instanceName () const
 
std::vector< std::string > setParamVal (std::string const &paramdescriptor, T const &val)
 
void setParamValUnique (std::string const &paramdescriptor, T const &val)
 
std::vector< std::pair< std::string, T > > getParamVal (std::string const &paramdescriptor) const
 
getParamValUnique (std::string const &paramdescriptor) const
 
std::vector< std::string > setParamString (std::string const &paramdescriptor, std::string const &val)
 
void setParamStringUnique (std::string const &paramdescriptor, std::string const &val)
 
std::vector< std::pair< std::string, std::string > > getParamString (std::string const &paramdescriptor) const
 
std::string getParamStringUnique (std::string const &paramdescriptor) const
 
void freezeParam (std::string const &paramdescriptor, bool doit)
 
void freezeAllParams (bool doit)
 
std::string descriptor () const
 
void setParamsFromFile (std::string const &filename)
 
std::istream & setParamsFromStream (std::istream &is, std::string const &absfile)
 
virtual void paramInfo (std::shared_ptr< UserInterface > s, std::map< std::string, std::string > &categs, bool skipFrozen, std::string const &cname="", std::string const &pfx="")
 
void foreachParam (std::function< void(std::string const &compname, ParameterBase *p)> func, std::string const &cname="")
 
std::shared_ptr< DynamicParameter< T > > addDynamicParameter (std::string const &name, std::string const &description, T const &defaultValue, ParameterCategory const &category)
 
std::shared_ptr< DynamicParameter< T > > addDynamicParameter (std::string const &name, std::string const &description, T const &defaultValue, ValidValuesSpec< T > const &validValuesSpec, ParameterCategory const &category)
 
void setDynamicParameterCallback (std::string const &name, std::function< void(T const &)> cb, bool callnow=true)
 
void removeDynamicParameter (std::string const &name, bool throw_if_not_found=true)
 
void setPath (std::string const &path)
 
std::filesystem::path absolutePath (std::filesystem::path const &path="")
 
std::shared_ptr< Comp > addSubComponent (std::string const &instance, Args &&...args)
 
void removeSubComponent (std::shared_ptr< Comp > &component)
 
void removeSubComponent (std::string const &instance, bool warnIfNotFound=true)
 
std::shared_ptr< Comp > getSubComponent (std::string const &instance) const
 
bool isTopLevel () const
 
bool initialized () const
 
std::string const & className () const
 
std::string const & instanceName () const
 
std::vector< std::string > setParamVal (std::string const &paramdescriptor, T const &val)
 
void setParamValUnique (std::string const &paramdescriptor, T const &val)
 
std::vector< std::pair< std::string, T > > getParamVal (std::string const &paramdescriptor) const
 
getParamValUnique (std::string const &paramdescriptor) const
 
std::vector< std::string > setParamString (std::string const &paramdescriptor, std::string const &val)
 
void setParamStringUnique (std::string const &paramdescriptor, std::string const &val)
 
std::vector< std::pair< std::string, std::string > > getParamString (std::string const &paramdescriptor) const
 
std::string getParamStringUnique (std::string const &paramdescriptor) const
 
void freezeParam (std::string const &paramdescriptor, bool doit)
 
void freezeAllParams (bool doit)
 
std::string descriptor () const
 
void setParamsFromFile (std::string const &filename)
 
std::istream & setParamsFromStream (std::istream &is, std::string const &absfile)
 
virtual void paramInfo (std::shared_ptr< UserInterface > s, std::map< std::string, std::string > &categs, bool skipFrozen, std::string const &cname="", std::string const &pfx="")
 
void foreachParam (std::function< void(std::string const &compname, ParameterBase *p)> func, std::string const &cname="")
 
std::shared_ptr< DynamicParameter< T > > addDynamicParameter (std::string const &name, std::string const &description, T const &defaultValue, ParameterCategory const &category)
 
std::shared_ptr< DynamicParameter< T > > addDynamicParameter (std::string const &name, std::string const &description, T const &defaultValue, ValidValuesSpec< T > const &validValuesSpec, ParameterCategory const &category)
 
void setDynamicParameterCallback (std::string const &name, std::function< void(T const &)> cb, bool callnow=true)
 
void removeDynamicParameter (std::string const &name, bool throw_if_not_found=true)
 
void setPath (std::string const &path)
 
std::filesystem::path absolutePath (std::filesystem::path const &path="")
 
- Public Member Functions inherited from jevois::ParameterRegistry
virtual ~ParameterRegistry ()
 

Additional Inherited Members

- Protected Member Functions inherited from jevois::dnn::Pipeline
void postInit () override
 
void preUninit () override
 
void reloadZoo (std::string const &root, std::string const &filt, std::string const &zoofile)
 
void onParamChange (pipeline::zooroot const &param, std::string const &val) override
 
void onParamChange (pipeline::zoo const &param, std::string const &val) override
 
void onParamChange (pipeline::filter const &param, pipeline::Filter const &val) override
 
void onParamChange (pipeline::pipe const &param, std::string const &val) override
 
void onParamChange (pipeline::nettype const &param, pipeline::NetType const &val) override
 
void onParamChange (pipeline::preproc const &param, pipeline::PreProc const &val) override
 
void onParamChange (pipeline::postproc const &param, pipeline::PostProc const &val) override
 
void onParamChange (pipeline::benchmark const &param, bool const &val) override
 
void onParamChange (pipeline::extramodels const &param, bool const &val) override
 
void showInfo (std::vector< std::string > const &info, jevois::StdModule *mod, jevois::RawImage *outimg, jevois::OptGUIhelper *helper, bool ovl, bool idle)
 
void asyncNetWait ()
 
bool checkAsyncNetComplete ()
 
void showDataPeekWindow (jevois::GUIhelper *helper, bool refresh)
 
- Protected Member Functions inherited from jevois::Component
virtual void preInit ()
 
virtual void postUninit ()
 
virtual void preInit ()
 
virtual void postUninit ()
 
- Protected Member Functions inherited from jevois::ParameterRegistry
void addParameter (ParameterBase *const param)
 
void removeParameter (ParameterBase *const param)
 
void callbackInitCall ()
 
- Protected Attributes inherited from jevois::dnn::Pipeline
std::shared_ptr< PreProcessoritsPreProcessor
 
std::shared_ptr< NetworkitsNetwork
 
std::shared_ptr< PostProcessoritsPostProcessor
 

Detailed Description

Definition at line 49 of file CustomDNN.C.

Constructor & Destructor Documentation

◆ ~MyPipeline()

virtual MyPipeline::~MyPipeline ( )
inlinevirtual

Definition at line 56 of file CustomDNN.C.

Member Function Documentation

◆ getPostProcessor()

std::shared_ptr< jevois::dnn::PostProcessor > MyPipeline::getPostProcessor ( )
inline

Definition at line 89 of file CustomDNN.C.

References jevois::dnn::Pipeline::itsPostProcessor.

◆ getPreProcessor()

std::shared_ptr< jevois::dnn::PreProcessor > MyPipeline::getPreProcessor ( )
inline

Definition at line 93 of file CustomDNN.C.

References jevois::dnn::Pipeline::itsPreProcessor.

◆ onParamChange()

void MyPipeline::onParamChange ( jevois::dnn::pipeline::postproc const &  param,
jevois::dnn::pipeline::PostProc const &  val 
)
inlineoverride

The documentation for this class was generated from the following file: