|
std::map< int, std::string > | jevois::dnn::readLabelsFile (std::string const &fname) |
| Read a label file. More...
|
|
std::string | jevois::dnn::getLabel (std::map< int, std::string > const &labels, int id) |
| Get a label from an id. More...
|
|
int | jevois::dnn::stringToRGBA (std::string const &label, unsigned char alpha=128) |
| Compute a color from a label name. More...
|
|
void | jevois::dnn::topK (float const *pfProb, float *pfMaxProb, uint32_t *pMaxClass, uint32_t outputCount, uint32_t topNum) |
| Get top-k entries and their indices. More...
|
|
std::string | jevois::dnn::shapestr (cv::Mat const &m) |
| Get a string of the form: "nD AxBxC... TYPE" from an n-dimensional cv::Mat with data type TYPE. More...
|
|
std::string | jevois::dnn::shapestr (TfLiteTensor const *t) |
| Get a string of the form: "nD AxBxC... TYPE" from an n-dimensional TfLiteTensor with data type TYPE. More...
|
|
std::string | jevois::dnn::shapestr (vsi_nn_tensor_attr_t const &attr) |
| Get a string of the form: "nD AxBxC... TYPE" from an n-dimensional NPU tensor with data type TYPE. More...
|
|
std::vector< size_t > | jevois::dnn::strshape (std::string const &str) |
| Get a vector of size_t from a string containing AxBxC... More...
|
|
int | jevois::dnn::tf2cv (TfLiteType t) |
| Convert from TensorFlow data type to OpenCV. More...
|
|
vsi_nn_type_e | jevois::dnn::tf2vsi (TfLiteType t) |
| Convert from TensorFlow data type to vsi_nn. More...
|
|
int | jevois::dnn::vsi2cv (vsi_nn_type_e t) |
| Convert from NPU data type to OpenCV. More...
|
|
void | jevois::dnn::clamp (cv::Rect &r, int width, int height) |
| Clamp a rectangle to within given image width and height. More...
|
|
std::vector< vsi_nn_tensor_attr_t > | jevois::dnn::parseTensorSpecs (std::string const &specs) |
| Parse tensor specification. More...
|
|
cv::Size | jevois::dnn::attrsize (vsi_nn_tensor_attr_t const &attr) |
| Get a tensor's size in cv::Size format. More...
|
|
std::string | jevois::dnn::attrstr (vsi_nn_tensor_attr_t const &attr) |
| Get a string describing the specs of a tensor. More...
|
|
vsi_nn_tensor_attr_t | jevois::dnn::tensorattr (TfLiteTensor const *t) |
| Get tensor shape and type attributes for a TensorFlow Lite tensor. More...
|
|
void | jevois::dnn::softmax (float const *input, size_t n, float fac, float *output) |
| Apply softmax to a float vector. More...
|
|