aibase

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

README

RULEX 基础AI框架

科学计算

  • 概率模型
  • 均方差
  • 最小二乘法

基础AI算法

  • ANN
  • RNN

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAi

func GetAi(uuid string) *typex.AI

func GetRuleX

func GetRuleX() typex.RuleX

func ListAi

func ListAi() []*typex.AI

func LoadAi

func LoadAi(Ai *typex.AI) error

func NewBodyPoseRecognition

func NewBodyPoseRecognition(re typex.RuleX) typex.XAi

func RemoveAi

func RemoveAi(uuid string) error

func StartAi

func StartAi(uuid string) error

func Stop

func Stop()

func StopAi

func StopAi(uuid string) error

func UpdateAi

func UpdateAi(Ai *typex.AI) error

Types

type AIRuntime

type AIRuntime struct {
	RuleEngine typex.RuleX
	AiBases    map[string]*typex.AI
}

func AIBaseRuntime

func AIBaseRuntime() *AIRuntime

func InitAIRuntime

func InitAIRuntime(re typex.RuleX) *AIRuntime

type Algorithm

type Algorithm struct {
	UUID        string // UUID
	Type        string // 模型类型: ANN_APP1 RNN_APP2 CNN_APP3 ....
	Name        string // 名称
	State       int    // 0开启;1关闭
	Document    string // 文档连接
	Description string // 概述
}

* * 算法模型 *

type AlgorithmResource

type AlgorithmResource interface {
	Init(map[string]interface{}) error // 初始化环境
	// Type , Sample, ExpectOut
	Train(string, [][]float64, [][]float64) error      // 训练模型
	Load() error                                       // 加载模型
	OnCall(string, [][]float64) map[string]interface{} // 用数据去执行
	Unload() error                                     // 卸载模型
	AiDetail() Algorithm                               // 获取信息
}

* * AI 接口 *

type BodyPoseRecognition

type BodyPoseRecognition struct {
}

func (*BodyPoseRecognition) Infer

func (ba *BodyPoseRecognition) Infer(input [][]float64) [][]float64

func (*BodyPoseRecognition) Start

func (ba *BodyPoseRecognition) Start(map[string]interface{}) error

func (*BodyPoseRecognition) Stop

func (ba *BodyPoseRecognition) Stop()

Jump to

Keyboard shortcuts

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