#include <tfmodel.h>
Public Member Functions | |
AxonRunner_ (size_t th=default_threading) | |
AxonRunner_ (const char *model, Optimization opt=Optimization::DEFAULT, const char *map=default_labels, size_t th=default_threading) | |
AxonRunner_ (std::initializer_list< std::pair< const char *, Optimization > >, const char *map=default_labels, size_t=default_threading) | |
bool | isValidOutput () const |
size_t | getDetections () const |
bool | isValidIdx (size_t idx) const |
virtual void | process (cv::Mat &io_frame) override |
Public Member Functions inherited from vs2::VisionServer::BasePipe | |
const std::string & | getName () const |
const std::shared_ptr< nt::NetworkTable > & | getTable () const |
virtual void | init () |
virtual void | close () |
Public Member Functions inherited from TfModel | |
TfModel ()=delete | |
TfModel (std::initializer_list< std::pair< const char *, Optimization > >, size_t=default_threading) | |
TfModel (const char *def, const char *edge, size_t th=default_threading) | |
TfModel (const char *m, size_t t=default_threading) | |
TfModel (const TfModel &)=delete | |
operator bool () const | |
bool | isValid () const |
bool | isValidBuffer () const |
Protected Member Functions | |
float | getX1 (size_t idx) const |
float | getY1 (size_t idx) const |
float | getX2 (size_t idx) const |
float | getY2 (size_t idx) const |
const std::string & | getLabel (size_t idx) const |
uint32_t | getConfidence (size_t idx) const |
Protected Member Functions inherited from vs2::VPipeline< AxonRunner_< void > > | |
VPipeline ()=delete | |
VPipeline (const VPipeline &)=delete | |
VPipeline (const char *name) | |
VPipeline (const std::string &name) | |
VPipeline (std::string &&name) | |
virtual | ~VPipeline ()=default |
Protected Member Functions inherited from vs2::VisionServer::BasePipe | |
BasePipe (const char *name) | |
BasePipe (const std::string &name) | |
BasePipe (std::string &&name) | |
BasePipe ()=delete | |
void | setCamera (const VisionCamera &) |
void | setPipeline (const BasePipe &) |
void | setSource (const cs::VideoSource &) |
void | getFrame (cv::Mat &) |
const cv::Mat1f & | getSrcMatrix () const |
const cv::Mat1f & | getSrcDistort () const |
Protected Attributes | |
std::vector< std::string > | obj_labels |
const float * | coords |
const float * | labels |
const float * | confidence |
const float * | detections |
Protected Attributes inherited from TfModel | |
std::unique_ptr< tflite::FlatBufferModel > | map |
std::unique_ptr< tflite::Interpreter > | model |
std::shared_ptr< edgetpu::EdgeTpuContext > | edgetpu_context |
tflite::ops::builtin::BuiltinOpResolver | resolver |
cv::Mat | input_tensor |
cv::Size | input_size |
Private Types | |
typedef struct AxonRunner_< derived_t > | This_t |
Additional Inherited Members | |
Public Types inherited from TfModel | |
enum class | Optimization { DEFAULT , EDGETPU } |
Public Types inherited from AxonRunner_B | |
enum class | OutputTensor { BOX_COORDS = 0 , LABEL_IDX = 1 , CONFIDENCE = 2 , DETECTIONS = 3 } |
Static Public Member Functions inherited from vs2::VisionServer::BasePipe | |
static const std::shared_ptr< nt::NetworkTable > & | ntable () |
Static Public Attributes inherited from TfModel | |
static size_t | default_threading {std::thread::hardware_concurrency() / 2} |
Static Public Attributes inherited from AxonRunner_B | |
static const char * | default_model = "unoptimized.tflite" |
static const char * | edgetpu_model = "model.tflite" |
static const char * | default_labels = "map.pbtxt" |
Runs an Axon-generated or similar object classification tflite model within a vision pipeline
|
private |
|
inline |
|
inline |
AxonRunner_< derived_t >::AxonRunner_ | ( | std::initializer_list< std::pair< const char *, Optimization > > | options, |
const char * | map = default_labels , |
||
size_t | th = default_threading |
||
) |
|
inline |
|
inline |
|
inline |
|
overridevirtual |
Reimplemented from vs2::VPipeline< AxonRunner_< void > >.
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |