go-tensorflow-image-recognition

command module
v0.0.0-...-fe7a3c7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2019 License: MIT Imports: 14 Imported by: 0

README

Image Recognition API in Go using TensorFlow

This is the underlying code for article Build an Image Recognition API with Go and TensorFlow.

Running the service

Build the image.

$ docker build -t localhost/recognition .

Run service in a container.

$ docker run -p 8080:8080 --rm localhost/recognition

Call the service.

$ curl localhost:8080/recognize -F 'image=@./cat.jpg'
{
  "filename": "cat.jpg",
  "labels": [
    { "label": "tabby", "probability": 0.45087516 },
    { "label": "Egyptian cat", "probability": 0.26096493 },
    { "label": "tiger cat", "probability": 0.23208225 },
    { "label": "lynx", "probability": 0.050698064 },
    { "label": "grey fox", "probability": 0.0019019963 }
  ]
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL