Skip to content

Instantly share code, notes, and snippets.

View JunweiNew's full-sized avatar

Junwei Niu JunweiNew

View GitHub Profile
@Namburger
Namburger / evaluate_tflite.py
Created August 15, 2020 02:11
evaluate_tflite.py
# Install tflite_runtime package to evaluate the model.
!pip3 install https://dl.google.com/coral/python/tflite_runtime-2.1.0.post1-cp36-cp36m-linux_x86_64.whl
# Now we do evaluation on the tflite model.
import os
import numpy as np
from tflite_runtime.interpreter import Interpreter
from tflite_runtime.interpreter import load_delegate
from PIL import Image
from PIL import ImageDraw