Tensorflow implementation of object detections using tflite models.
This code was tested with Ubuntu 16.04 / Ubuntu 18.04 / WSL / Raspberry Pi 4B.
echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install python3-pip
sudo apt-get -y dist-upgrade
Setup tflite-env
virtual environment.
sudo apt-get -y install python3-venv
python3 -m venv tflite-env
echo "source tflite-env/bin/activate" >> ~/.bashrc
source ~/.bashrc
Install requirements.
pip3 install tqdm
pip3 install --upgrade pip
pip3 install --extra-index-url https://google-coral.github.io/py-repo/ tflite_runtime
git clone https://github.com/pete710592/TensorflowLite_UBI.git
Setup requirements for tensorflow-lite.
cd TensorflowLite_UBI
bash get_pi_requirements.sh
python3 TFLite_detection_image.py --modeldir="TFLite_model/08-daytime" --image="images/test_01.jpg"
then, you will see 08-test_01.jpg
at predictions
.