enable local images for efficientnet.py
MODIFY
examples/efficientnet.py
examples/efficientnet.py
@@ -234,7 +234,10 @@ if __name__ == "__main__":
cap.release()
cv2.destroyAllWindows()
else:
+ if url.startswith('http'):
img = Image.open(io.BytesIO(fetch(url)))
+ else:
+ img = Image.open(url)
st = time.time()
out, _ = infer(model, img)
print(np.argmax(out.data), np.max(out.data), lbls[np.argmax(out.data)])

enable local images for efficientnet.py (#116)