This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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" |