model

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const UnLimitInt = 1<<31 - 1

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyzeAttribute

type AnalyzeAttribute struct {
	Attribute     string        `json:"attribute"`
	Score         float32       `json:"confidence"`
	Source        Source        `json:"source"`
	Version       string        `json:"version"`
	AttributeTime []*TimePeriod `json:"time"`
}

type AnalyzeResult

type AnalyzeResult struct {
	Type       Scenario            `json:"type,omitempty"`
	Attributes []*AnalyzeAttribute `json:"result,omitempty"`
}

type AudioResult

type AudioResult struct {
	AudioUrl string `json:"audioUrl"`
}

audio

func (AudioResult) New

func (c AudioResult) New() SubTaskItem

type BaikeInfo

type BaikeInfo map[string]interface{}

type BriefList

type BriefList struct {
	Briefs []string `json:"briefs,omitempty"`
}

type CharacterResult

type CharacterResult []*CharacterResultItem

func (CharacterResult) New

func (c CharacterResult) New() SubTaskItem

type CharacterResultItem

type CharacterResultItem struct {
	Image     string
	Timestamp int
	Words     []*Word
}

character

type CoverResult

type CoverResult struct {
	CoverUrl string
}

cover

func (CoverResult) New

func (c CoverResult) New() SubTaskItem

type FaceBaseItem

type FaceBaseItem struct {
	FaceUrl    string `json:"faceUrl,omitempty"`
	Image      string `json:"image"`
	FrameNum   int    `json:"frame_num"`
	StartFrame int    `json:"start_frame"`
}

type FaceRecThumbnailData

type FaceRecThumbnailData struct {
	*FaceBaseItem
	Data     *FaceRecThumbnailDataItem `json:"data"`
	Location *FaceWithDegree           `json:"location"`
}

type FaceRecThumbnailDataItem

type FaceRecThumbnailDataItem struct {
	Name      string     `json:"name,omitempty"`
	Score     float64    `json:"radio,omitempty"`
	BaikeInfo *BaikeInfo `json:"baikeInfo,omitempty"`
}

type FaceRecThumbnailResult

type FaceRecThumbnailResult struct {
	Faces []*FaceRecThumbnailData `json:"faces"`
}

face_recognition_thumbnail

func (FaceRecThumbnailResult) New

type FaceRecTrackingData

type FaceRecTrackingData struct {
	*FaceBaseItem
	Data *FaceRecTrackingDataItem `json:"data"`
}

type FaceRecTrackingDataItem

type FaceRecTrackingDataItem struct {
	Name      string     `json:"name,omitempty"`
	Score     float64    `json:"radio,omitempty"`
	BaikeInfo *BaikeInfo `json:"baikeInfo,omitempty"`
}

type FaceRecTrackingResult

type FaceRecTrackingResult struct {
	Faces []*FaceRecTrackingData `json:"faces"`
}

face_recognition_tracking

func (FaceRecTrackingResult) New

type FaceTrackingResult

type FaceTrackingResult struct {
	Status  string          `json:"status"`
	Message string          `json:"message"`
	Faces   []*FaceBaseItem `json:"faces"`
}

face_tracking

func (FaceTrackingResult) New

type FaceWithDegree

type FaceWithDegree struct {
	Left   float32 `json:"left"`
	Top    float32 `json:"top"`
	Width  float32 `json:"width"`
	Height float32 `json:"height"`
	Degree float32 `json:"degree"`
}

type GetMediaResult

type GetMediaResult struct {
	MediaResultCommon
	StartTime        *time.Time             `json:"startTime,omitempty"`
	PublishTime      *time.Time             `json:"publishTime,omitempty"`
	DurationInSecond int                    `json:"durationInSecond,omitempty"`
	Results          []*AnalyzeResult       `json:"results,omitempty"`
	Error            *vcaError.AnalyzeError `json:"error,omitempty"`
}

type GetStreamResult

type GetStreamResult struct {
	StreamResultCommon
	StartTime        string                 `json:"start_time,omitempty"`
	DurationInSecond int                    `json:"duration_in_second,omitempty"`
	AnalyzerError    *vcaError.AnalyzeError `json:"error,omitempty"`
}

type HitsTime

type HitsTime struct {
	StartInSecond int `json:"startTimestampInSecond"`
	EndInSecond   int `json:"endTimestampInSecond"`
	StartInMS     int `json:"startTimestampInMS"`
	EndInMS       int `json:"endTimestampInMS"`
}

type ImageArgs

type ImageArgs struct {
	Image string `json:"image,omitempty"` //图片url
	Brief string `json:"brief,omitempty"` //图片集名称
}

func (*ImageArgs) CheckParams

func (args *ImageArgs) CheckParams(checkBrief bool) error

type ImageClassify

type ImageClassify struct {
	Name  string  `json:"class_name"`
	Score float64 `json:"probability"`
}

type ImageClassifyAggResult

type ImageClassifyAggResult struct {
	ClassName string        `json:"className"`
	ScoreList []float64     `json:"confidenceList"`
	TimeList  []*TimePeriod `json:"timeListForHigherThanThreshold"`
	Score     float64       `json:"score"`
	MeanScore float64       `json:"meanConfidence"`
}

type ImageClassifyItem

type ImageClassifyItem struct {
	Image          string           `json:"image"`
	Timestamp      int              `json:"timestamp"`
	BlurScore      float64          `json:"blurScore"`
	ClassifyResult []*ImageClassify `json:"classifyResult"`
}

type ImageClassifyResult

type ImageClassifyResult struct {
	Detail []*ImageClassifyItem      `json:"detail"`
	Agg    []*ImageClassifyAggResult `json:"result"`
}

image_classify

func (ImageClassifyResult) New

type ImageLib

type ImageLib struct {
	UserId      string    `json:"-"`
	Lib         string    `json:"lib"`
	CreateTime  time.Time `json:"createTime"`
	Description string    `json:",omitempty"`
}

type ImageLibList

type ImageLibList struct {
	Libs []*ImageLib `json:"libs"`
}

type ImageList

type ImageList struct {
	LibName string   `json:"libName,omitempty"`
	Brief   string   `json:"brief,omitempty"`
	Images  []string `json:"images"`
}

func (*ImageList) CheckParams

func (i *ImageList) CheckParams(checkImages, checkBrief bool) error

type InvalidParamValue

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

func NewInvalidParamValue

func NewInvalidParamValue(name string, value interface{}) InvalidParamValue

func (InvalidParamValue) Error

func (e InvalidParamValue) Error() string

type KnowledgeGraphResult

type KnowledgeGraphResult struct {
	Genre               []string      `json:"genre,omitempty"`               //类型
	Name                []string      `json:"name,omitempty"`                //名称
	Country             []string      `json:"country,omitempty"`             //国家
	Region              []string      `json:"region,omitempty"`              //地区
	InLanguage          []string      `json:"inLanguage,omitempty"`          //内容语言
	DatePublished       []string      `json:"datePublished,omitempty"`       //年代
	RegionalReleaseDate []string      `json:"regionalReleaseDate,omitempty"` //上映时间
	ProductionCompany   []string      `json:"productionCompany,omitempty"`   //出品方
	PartOfSeries        []interface{} `json:"partOfSeries,omitempty"`
	Cast                []interface{} `json:"cast,omitempty"`
	Starring            []interface{} `json:"starring,omitempty"`
}

knowledge_graph

func (KnowledgeGraphResult) New

type Location

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

func (*Location) GetLocation

func (loc *Location) GetLocation() []int

left,top,width,height

type LogoItem

type LogoItem struct {
	Name     string    `json:"name"`
	Score    float64   `json:"probability"`
	Location *Location `json:"location"`
}

type LogoResult

type LogoResult []*LogoResultItem

func (LogoResult) New

func (l LogoResult) New() SubTaskItem

type LogoResultItem

type LogoResultItem struct {
	Image     string      `json:"image"`
	Timestamp int         `json:"timestamp"`
	Result    []*LogoItem `json:"result"`
}

logo private_logo

type MediaResultCommon

type MediaResultCommon struct {
	TaskId       string `json:"taskId,omitempty"`
	Source       string `json:"source,omitempty"`
	MediaId      string `json:"mediaId,omitempty"`
	Title        string `json:"title,omitempty"`
	SubTitle     string `json:"subTitle,omitempty"`
	Category     string `json:"category,omitempty"`
	Description  string `json:"description,omitempty"`
	Preset       string `json:"preset,omitempty"`
	Notification string `json:"notification,omitempty"`
	Status       Status `json:"status,omitempty"`
	Percent      int    `json:"percent,omitempty"`
	CreateTime   string `json:"createTime,omitempty"`
}

type ObjectDetectItem

type ObjectDetectItem struct {
	Keyword string  `json:"keyword"`
	Score   float64 `json:"score"`
	Root    string  `json:"root"`
}

type ObjectDetectResult

type ObjectDetectResult []*ObjectDetectResultItem

func (ObjectDetectResult) New

type ObjectDetectResultItem

type ObjectDetectResultItem struct {
	Image          string              `json:"image"`
	Timestamp      int                 `json:"timestamp"`
	ClassifyResult []*ObjectDetectItem `json:"classifyResult"`
}

object_detect

type OcrStructureResult

type OcrStructureResult struct {
	Status  string
	Results map[string][]*OcrStructureResultItem
}

ocr_structure

func (OcrStructureResult) New

type OcrStructureResultItem

type OcrStructureResultItem struct {
	StartTimeInSeconds int       `json:"startTimeInSeconds"`
	EndTimeInSeconds   int       `json:"endTimeInSeconds"`
	Word               string    `json:"word"`
	Score              float64   `json:"confidence"`
	Rect               *Location `json:"rect"`
	Duration           int       `json:"duration"`
	TimeList           [][]int   `json:"time_list"`
}

type Other

type Other map[string]interface{}

func (Other) New

func (o Other) New() SubTaskItem

type PostImageLibArgs

type PostImageLibArgs struct {
	Lib         string `json:"lib"`                   //库名称,长度不超过20,支持小写字母、数字和_,以字母开头,且必须全局唯一
	Description string `json:"description,omitempty"` //图片描述,长度不超过256
}

func (*PostImageLibArgs) CheckParams

func (args *PostImageLibArgs) CheckParams() error

type PrivateFaceImageData

type PrivateFaceImageData struct {
	Image  string                      `json:"image"`
	Result []*PrivateFaceImageDataItem `json:"result"`
}

type PrivateFaceImageDataItem

type PrivateFaceImageDataItem struct {
	Brief string  `json:"brief,omitempty"`
	Score float64 `json:"score,omitempty"`
}

type PrivateFaceImageResult

type PrivateFaceImageResult struct {
	Status  string                  `json:"status"`
	Results []*PrivateFaceImageData `json:"results"`
}

private_face_image

func (PrivateFaceImageResult) New

type PrivateFaceTrackingData

type PrivateFaceTrackingData struct {
	*FaceBaseItem
	Data     *PrivateFaceTrackingDataItem   `json:"data"`
	DataList []*PrivateFaceTrackingDataItem `json:"dataList"`
}

type PrivateFaceTrackingDataItem

type PrivateFaceTrackingDataItem struct {
	Name  string  `json:"name,omitempty"`
	Score float64 `json:"score,omitempty"`
}

type PrivateFaceTrackingResult

type PrivateFaceTrackingResult struct {
	Status    string                     `json:"status"`
	Threshold float32                    `json:"threshold"`
	Faces     []*PrivateFaceTrackingData `json:"faces"`
}

private_face_tracking

func (PrivateFaceTrackingResult) New

type PutMediaArgs

type PutMediaArgs struct {
	Source       string `json:"source"`
	Auth         string `json:"auth,omitempty"`
	Title        string `json:"title,omitempty"`
	SubTitle     string `json:"subTitle,omitempty"`
	Category     string `json:"category,omitempty"`
	Description  string `json:"description,omitempty"`
	Preset       string `json:"preset,omitempty"`
	Notification string `json:"notification,omitempty"`
	Priority     int    `json:"priority,omitempty"`
}

func (*PutMediaArgs) CheckParams

func (args *PutMediaArgs) CheckParams() error

type Scenario

type Scenario string

func (Scenario) Value

func (s Scenario) Value() string

type ScenarioClassifyItemV2

type ScenarioClassifyItemV2 struct {
	StartFrame int                   `json:"startframe"`
	EndFrame   int                   `json:"endframe"`
	Labels     []*ScenarioClassifyV2 `json:"labels"`
}

type ScenarioClassifyResultV2

type ScenarioClassifyResultV2 struct {
	Results []*ScenarioClassifyItemV2 `json:"results"`
}

scenario_classify_v2

func (ScenarioClassifyResultV2) New

type ScenarioClassifyV2

type ScenarioClassifyV2 struct {
	Name  string  `json:"name"`
	Score float64 `json:"confidence"`
}

type Source

type Source string

func (Source) Value

func (s Source) Value() string

type SpeechResult

type SpeechResult []*SpeechResultItem

func (SpeechResult) New

func (c SpeechResult) New() SubTaskItem

type SpeechResultItem

type SpeechResultItem struct {
	*HitsTime
	Text string `json:"statement"`
}

speech

type Status

type Status string

type StreamArgs

type StreamArgs struct {
	Source           string `json:"source"`
	Preset           string `json:"preset,omitempty"`
	Notification     string `json:"notification"`
	IntervalInSecond int    `json:"intervalInSecond,omitempty"`
	Description      string `json:"description,omitempty"`
}

func (*StreamArgs) CheckParams

func (args *StreamArgs) CheckParams() error

type StreamResultCommon

type StreamResultCommon struct {
	StreamId         string `json:"streamId,omitempty"`
	Source           string `json:"source,omitempty"`
	Preset           string `json:"preset,omitempty"`
	Notification     string `json:"notification,omitempty"`
	Description      string `json:"description,omitempty"`
	IntervalInSecond int    `json:"intervalInSecond,omitempty"`
	CreateTime       string `json:"createTime,omitempty"`
	Status           Status `json:"status,omitempty"`
}

type SubTask

type SubTask string

func (SubTask) Value

func (s SubTask) Value() string

type SubTaskItem

type SubTaskItem interface {
	New() SubTaskItem
}

type SubTaskResult

type SubTaskResult struct {
	TaskId    string  `json:"taskId"`
	SubTaskId string  `json:"subTaskId"`
	Source    string  `json:"source"`
	Type      SubTask `json:"type"`
	Status    Status  `json:"status"`
	Result    string  `json:"result"`
	AggResult string  `json:"aggregationResult,omitempty"`
	SubTaskItem
}

type TextrankResult

type TextrankResult []*TextrankResultItem

textrank_character textrank_speech

func (TextrankResult) New

func (t TextrankResult) New() SubTaskItem

type TextrankResultItem

type TextrankResultItem struct {
	Keyword  string  `json:"keyword"`
	Weight   float64 `json:"weight"`
	TimeList [][]int `json:"time_list"`
}

type ThumbnailResult

type ThumbnailResult struct {
	Prefix string   `json:"thumbnailPrefix"`
	Urls   []string `json:"thumbnailUrls"` //可能为空
}

thumbnail

func (ThumbnailResult) New

func (t ThumbnailResult) New() SubTaskItem

type TimePeriod

type TimePeriod struct {
	Start int64 `json:"start"`
	End   int64 `json:"end"`
}

func NewTimePeriod

func NewTimePeriod(start, end int64) *TimePeriod

func (*TimePeriod) After

func (t *TimePeriod) After(end int64) bool

func (*TimePeriod) Before

func (t *TimePeriod) Before(start int64) bool

func (*TimePeriod) Equal

func (t *TimePeriod) Equal(o *TimePeriod) bool

func (*TimePeriod) InPeriod

func (t *TimePeriod) InPeriod(offset int64) int

return -1 if offset<start,1 if offset> end ,else 0

func (*TimePeriod) IsPoint

func (t *TimePeriod) IsPoint() bool

func (*TimePeriod) Near

func (t *TimePeriod) Near(p int64) bool

type TimePeriodSlice

type TimePeriodSlice []*TimePeriod

func (*TimePeriodSlice) Append

func (t *TimePeriodSlice) Append(period *TimePeriod)

func (*TimePeriodSlice) Init

func (t *TimePeriodSlice) Init()

func (TimePeriodSlice) Len

func (t TimePeriodSlice) Len() int

func (TimePeriodSlice) Less

func (t TimePeriodSlice) Less(i, j int) bool

func (*TimePeriodSlice) Remove

func (t *TimePeriodSlice) Remove(period *TimePeriod)

func (TimePeriodSlice) Swap

func (t TimePeriodSlice) Swap(i, j int)

type TitleResult

type TitleResult struct {
	Title string `json:"title"`
}

title

func (TitleResult) New

func (c TitleResult) New() SubTaskItem

type VideoClassify

type VideoClassify struct {
	Name  string  `json:"value"`
	Score float64 `json:"probability"`
}

type VideoClassifyKgItem

type VideoClassifyKgItem struct {
	Title    *VideoClassify   `json:"title"`
	Subtitle []*VideoClassify `json:"subtitle"`
}

type VideoResult

type VideoResult struct {
	VideoUrl string
}

video

func (VideoResult) New

func (v VideoResult) New() SubTaskItem

type Word

type Word struct {
	Text  string    `json:"word"`
	Rect  *Location `json:"rect,omitempty"`
	Score float64   `json:"confidence"`
}

Jump to

Keyboard shortcuts

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