Inception API Example
An example code snippet to use the InceptionV3 API.
#!/usr/bin/env owl | |
open Owl | |
#zoo "9428a62a31dbea75511882ab8218076f" (* InceptionV3 *) | |
let _ = | |
(* Image on local machine *) | |
let img = "panda.png" in | |
(* Inference on image *) | |
let labels = InceptionV3.infer img in | |
(* Output to other formats *) | |
let labels_json = InceptionV3.to_json ~top:5 labels in | |
let labels_tuples = InceptionV3.to_tuples ~top:5 labels in | |
labels, labels_json, labels_tuples |