inference

package
v0.0.0-...-21fa723 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	UserModelPath string
	LHost         string
}

Config 이미지 추론 모델 생성 설정정보

type CreateRequest

type CreateRequest struct {
	// Image root path for training
	ImagePath string `json:"imagePath"`

	// Model meta information
	ModelPath   string `json:"modelPath"`
	ConfigFile  string `json:"configFile"`
	Description string `json:"desc"`

	Epochs int `json:"epochs"`

	Trial bool `json:"trial"`
}

CreateRequest 모델 생성 요청

type CreateResponse

type CreateResponse struct {
	ModelPath string `json:"modelPath" binding:"required"`
}

CreateResponse 모델 생성 응답

type InferLabel

type InferLabel struct {
	Prob  float32 `json:"probability"`
	Label string  `json:"label"`
}

InferLabel 이미지 추론 항목

type Inference

type Inference struct {
	// contains filtered or unexported fields
}

Inference 이미지 추론 모델 관리

func New

func New(c Config) (i *Inference, err error)

New 이미지 추론 모델 생성

func (*Inference) CreateModel

func (i *Inference) CreateModel(newModel, subject, desc string, epochs int, trial bool) (map[string]interface{}, error)

CreateModel 추론모델 생성

func (*Inference) DeleteModel

func (i *Inference) DeleteModel(model string) error

DeleteModel 모델 삭제

func (*Inference) Destroy

func (i *Inference) Destroy()

Destroy 추론 모델 해제

func (*Inference) GetModel

func (i *Inference) GetModel(model string, verbose bool) map[string]interface{}

GetModel 이미지 추론 모델 정보 반환

func (*Inference) GetModels

func (i *Inference) GetModels() []string

GetModels 이미지 추론 모델 목록 반환

func (*Inference) Infer

func (i *Inference) Infer(model, image, format string, k int) ([]InferLabel, error)

Infer 추론

func (*Inference) OperateModel

func (i *Inference) OperateModel(model, modelPath string) error

OperateModel 생성 된 추론모델 로드

Jump to

Keyboard shortcuts

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