add imagenet labels for demo

This commit is contained in:
Ali Abid 2020-11-02 18:21:31 -08:00
parent ff7dee0086
commit d2b5abf749
2 changed files with 1004 additions and 3 deletions

File diff suppressed because it is too large Load Diff

View File

@ -7,10 +7,11 @@ import numpy as np
from PIL import Image
import requests
from urllib.request import urlretrieve
import json
# # Download human-readable labels for ImageNet.
response = requests.get("https://git.io/JJkYN")
labels = response.text.split("\n")
# Load human-readable labels for ImageNet.
with open("files/imagenet_labels.json") as labels_file:
labels = json.load(labels_file)
mobile_net = tf.keras.applications.MobileNetV2()