Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 975 Bytes

README.md

File metadata and controls

43 lines (29 loc) · 975 Bytes

TensorFlow models for TensorFlow Go

Overview

The purpose of this project is to host several TensorFlow models that can be loaded out of the box to use with TensorFlow Go.

Models

  • MobileNet object detection trained on COCO.

To install

To install the library use $ go get github.com/juandes/tensorflow-go-models/models

Usage

You can load and use a model like this:

package main

import (
	"fmt"

	"github.com/juandes/tensorflow-go-models/models"
)

var model *models.Coco

func main() {
	model = models.NewCoco()
	err := model.Load()
	if err != nil {
		fmt.Printf("Error loading model: %v", err)
		panic(err)
	}

	defer model.CloseSession()
}

In the cmd/ directory you can find an example of a web service that serves the MobileNet model. For more information about how to use it check out the blog post Using TensorFlow Go to serve an object detection model with a web service