Library with utility functions for TensforFlow, to cut down on the amount of code to write for making predictions.
-
install virtual environment
virtualenv -p /usr/bin/python3.7 venv
-
install tensorflow (1.x or 2.x works)
-
with GPU (1.x)
./venv/bin/pip install "tensorflow-gpu<2.0.0"
-
with GPU (2.x)
./venv/bin/pip install "tensorflow-gpu>=2.0.0"
-
CPU only (1.x)
./venv/bin/pip install "tensorflow<2.0.0"
-
CPU only (2.x)
./venv/bin/pip install "tensorflow>=2.0.0"
-
-
install library
-
via pip
./venv/bin/pip install wai.tfutils
-
from source (from within the directory containing the
setup.py
script)::./venv/bin/pip install .
-
wai.tfutils.load_frozen_graph
- for loading a frozen graph from diskwai.tfutils.load_labels
- for loading the label map and categories from a protobuf textwai.tfutils.inference_for_image
- for generating predictions for a single image