imagenet

package
v0.0.0-...-1f5ce45 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ImageModeTensorflow         = "tf"
	ImageModeTensorflowPositive = "tf-pos"
	ImageModeCaffe              = "caffe"
)

Variables

View Source
var DefaultLabels = Labels{}/* 1000 elements not displayed */

Functions

This section is empty.

Types

type LabelItem

type LabelItem struct {
	Name, Description string
}

type Labels

type Labels map[int]LabelItem

func LabelsFromFile

func LabelsFromFile(jsonFile string) (Labels, error)

func (Labels) Get

func (l Labels) Get(i int, indexCorrection int) string

type Model

type Model struct {
	Labels Labels

	ID                      string
	ModelName, TagName      string
	InputLayer, OutputLayer string
	ImageMode               string
	LabelsPath              string
	ImageHeight, ImageWidth uint
	IndexCorrection         int
	// contains filtered or unexported fields
}

func NewNasnet

func NewNasnet(modelRoot string) (*Model, func() error, error)

func NewPnasnet

func NewPnasnet(modelRoot string) (*Model, func() error, error)

func NewResnet

func NewResnet(modelRoot string) (*Model, func() error, error)

func NewXception

func NewXception(modelRoot string) (*Model, func() error, error)

func (*Model) Classify

func (m *Model) Classify(img image.Image) (gildasai.Predictions, error)

func (*Model) Load

func (m *Model) Load() (func() error, error)

Jump to

Keyboard shortcuts

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