JeVois  1.18
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
PostProcessorStub.H
Go to the documentation of this file.
1 // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 //
3 // JeVois Smart Embedded Machine Vision Toolkit - Copyright (C) 2021 by Laurent Itti, the University of Southern
4 // California (USC), and iLab at USC. See http://iLab.usc.edu and http://jevois.org for information about this project.
5 //
6 // This file is part of the JeVois Smart Embedded Machine Vision Toolkit. This program is free software; you can
7 // redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software
8 // Foundation, version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
10 // License for more details. You should have received a copy of the GNU General Public License along with this program;
11 // if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
12 //
13 // Contact information: Laurent Itti - 3641 Watt Way, HNB-07A - Los Angeles, CA 90089-2520 - USA.
14 // Tel: +1 213 740 3527 - itti@pollux.usc.edu - http://iLab.usc.edu - http://jevois.org
15 // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
16 /*! \file */
17 
18 #pragma once
19 
21 #include <jevois/Types/ObjReco.H>
22 
23 namespace jevois
24 {
25  namespace dnn
26  {
27  //! Post-Processor for neural network pipeline
28  /*! This is the last step in a deep neural network processing Pipeline. This post-processor does nothing except
29  displaying the sizes of the received tensors from the network. Useful when importing custom networks to inspect
30  the output data format if one is unsure: using this stub will not crash post-processing and will allow one to
31  inspect network output shapes. Also useful to benchmark a model and check that its speed is acceptable before
32  spending time designing a new post-processor for it. \ingroup dnn */
34  {
35  public:
36 
37  //! Inherited constructor ok
38  using PostProcessor::PostProcessor;
39 
40  //! Destructor
41  virtual ~PostProcessorStub();
42 
43  //! Freeze/unfreeze parameters that users should not change while running
44  void freeze(bool doit) override;
45 
46  //! Process outputs and draw/send some results
47  void process(std::vector<cv::Mat> const & outs, PreProcessor * preproc) override;
48 
49  //! Report what happened in last process() to console/output video/GUI
50  void report(jevois::StdModule * mod, jevois::RawImage * outimg = nullptr,
51  jevois::OptGUIhelper * helper = nullptr, bool overlay = true, bool idle = false) override;
52  };
53 
54  } // namespace dnn
55 } // namespace jevois
jevois::RawImage
A raw image as coming from a V4L2 Camera and/or being sent out to a USB Gadget.
Definition: RawImage.H:110
jevois::dnn::PostProcessorStub
Post-Processor for neural network pipeline.
Definition: PostProcessorStub.H:33
jevois::dnn::PostProcessorStub::freeze
void freeze(bool doit) override
Freeze/unfreeze parameters that users should not change while running.
Definition: PostProcessorStub.C:31
jevois::dnn::PostProcessorStub::report
void report(jevois::StdModule *mod, jevois::RawImage *outimg=nullptr, jevois::OptGUIhelper *helper=nullptr, bool overlay=true, bool idle=false) override
Report what happened in last process() to console/output video/GUI.
Definition: PostProcessorStub.C:40
jevois::GUIhelper
Helper class to assist modules in creating graphical and GUI elements.
Definition: GUIhelper.H:122
jevois
Definition: Concepts.dox:1
jevois::dnn::PreProcessor
Pre-Processor for neural network pipeline.
Definition: PreProcessor.H:102
PostProcessor.H
jevois::dnn::PostProcessorStub::process
void process(std::vector< cv::Mat > const &outs, PreProcessor *preproc) override
Process outputs and draw/send some results.
Definition: PostProcessorStub.C:35
ObjReco.H
jevois::dnn::PostProcessor
Post-Processor for neural network pipeline.
Definition: PostProcessor.H:146
jevois::dnn::PostProcessorStub::~PostProcessorStub
virtual ~PostProcessorStub()
Destructor.
Definition: PostProcessorStub.C:27
jevois::StdModule
Base class for a module that supports standardized serial messages.
Definition: Module.H:232