Skip to content

Instantly share code, notes, and snippets.

#include "tensorflow/lite/interpreter.h"
#include "tensorflow/lite/kernels/register.h"
#include "tensorflow/lite/model.h"
#include "tensorflow/lite/optional_debug_tools.h"
#include "opencv2/opencv.hpp"
class CTfLiteInterpreter
{
private:
#include <iostream>
#include <algorithm>
#include <numeric>
#include <chrono>
#include "TfLiteInterpreter.h"
using Time = std::chrono::steady_clock;
CTfLiteInterpreter::CTfLiteInterpreter(int inWidth, int inHeight, int inChannels)
# modified from TFLite python examples
# https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/examples/python/label_image.py
"""label_image for tflite."""
# copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@jerogar
jerogar / tflite_classification_demo.cpp
Last active September 14, 2021 13:53
TFLite_Examples
// Modified From TFLite minimal example
// https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/examples/minimal/minimal.cc
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <fstream>
#include "tensorflow/lite/interpreter.h"