body

package
v0.0.0-...-2fb99e4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdvancedGeneralResponse

type AdvancedGeneralResponse struct {
	pkg.BaseResponse
	ResultNum int `json:"result_num"`
	Result    []struct {
		Keyword   string    `json:"keyword"`
		Score     float64   `json:"score"`
		Root      string    `json:"root"`
		BaikeInfo BaikeInfo `json:"baike_info"`
	} `json:"result"`
}

type AnimalResponse

type AnimalResponse struct {
	pkg.BaseResponse
	Result []struct {
		Name      string    `json:"name"`
		Score     string    `json:"score"`
		BaikeInfo BaikeInfo `json:"baike_info"`
	} `json:"result"`
}

type BaikeInfo

type BaikeInfo struct {
	BaikeUrl    string `json:"baike_url"`
	ImageUrl    string `json:"image_url"`
	Description string `json:"description"`
}

type CartoonRequest

type CartoonRequest struct {
	Image string `json:"image"`
}

func (*CartoonRequest) ToMap

func (r *CartoonRequest) ToMap() map[string]string

type CartoonResponse

type CartoonResponse struct {
	pkg.BaseResponse
	Image string `json:"image"`
}

type PlantResponse

type PlantResponse struct {
	pkg.BaseResponse
	Result []struct {
		Name      string    `json:"name"`
		Score     float64   `json:"score"`
		BaikeInfo BaikeInfo `json:"baike_info"`
	} `json:"result"`
}

type RecogniseRequest

type RecogniseRequest struct {
	Image     string                            `json:"image,omitempty"`
	ImgUrl    string                            `json:"imgUrl,omitempty"`
	Scenes    []string                          `json:"scenes"`
	SceneConf map[string]map[string]interface{} `json:"sceneConf"`
}

func NewAdvancedGeneralRecognise

func NewAdvancedGeneralRecognise(image string, baikeNum int) *RecogniseRequest

NewAdvancedGeneralRecognise 通用识别

func NewAnimalRecognise

func NewAnimalRecognise(image string, baikeNum int) *RecogniseRequest

NewAnimalRecognise 动物识别

func NewPlantRecognise

func NewPlantRecognise(image string, baikeNum int) *RecogniseRequest

NewPlantRecognise 植物识别

type RecogniseResponse

type RecogniseResponse struct {
	pkg.BaseResponse
	Result struct {
		Plant           PlantResponse           `json:"plant"`
		Animal          AnimalResponse          `json:"animal"`
		AdvancedGeneral AdvancedGeneralResponse `json:"advanced_general"`
	} `json:"result"`
}

type SDK

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

func NewSDK

func NewSDK(token string, err error) SDK

func (SDK) Cartoon

func (sdk SDK) Cartoon(req *CartoonRequest) (*CartoonResponse, error)

Cartoon 人像卡通 https://ai.baidu.com/ai-doc/IMAGEPROCESS/Mk4i6olx5

func (SDK) Recognise

func (sdk SDK) Recognise(req *RecogniseRequest) (*RecogniseResponse, error)

Recognise 图像识别 https://ai.baidu.com/ai-doc/IMAGERECOGNITION/Kkbg3gxs7

func (SDK) Separate

func (sdk SDK) Separate(req *SeparateRequest) (*SeparateResponse, error)

Separate 人像分割 https://ai.baidu.com/ai-doc/BODY/Fk3cpyxua

type SeparateRequest

type SeparateRequest struct {
	Image string `json:"image"`
	Type  string `json:"type"`
}

func (*SeparateRequest) ToMap

func (r *SeparateRequest) ToMap() map[string]string

type SeparateResponse

type SeparateResponse struct {
	pkg.BaseResponse
	Labelmap   string `json:"labelmap"`
	Scoremap   string `json:"scoremap"`
	Foreground string `json:"foreground"`
	PersonNum  int    `json:"person_num"`
	PersonInfo []struct {
		Top    float64 `json:"top"`
		Left   float64 `json:"left"`
		Width  float64 `json:"width"`
		Height float64 `json:"height"`
		Score  float64 `json:"score"`
	} `json:"person_info"`
}

Jump to

Keyboard shortcuts

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