Skip to content

Instantly share code, notes, and snippets.

@jzstark
Last active November 20, 2017 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jzstark/ba52dc005f135cafb4d3fbc6006291bb to your computer and use it in GitHub Desktop.
Save jzstark/ba52dc005f135cafb4d3fbc6006291bb to your computer and use it in GitHub Desktop.
Example code to use InceptionV3 API

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment