gofaceplus

package module
v0.0.0-...-0629bd0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2016 License: MIT Imports: 8 Imported by: 1

README

gofaceplus

Go api for face++

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Age

type Age struct {
	Range int64 `json:"range"`
	Value int64 `json:"value"`
}

type DetectResult

type DetectResult struct {
	Faces     []*Face `json:"face"`
	ImgHeight int64   `json:"img_height"`
	ImgWidth  int64   `json:"img_width"`
	ImgId     string  `json:"img_id"`
	SessionId string  `json:"session_id"`
	ImgUrl    string  `json:"url"`
}

type Face

type Face struct {
	Id        string    `json:"face_id"`
	Attrs     FaceAttrs `json:"attribute"`
	Positions Positions `json:"position"`
	Tag       string    `json:"tag"`
}

type FaceAttrs

type FaceAttrs struct {
	Age     Age     `json:"age"`
	Gender  Gender  `json:"gender"`
	Glass   Glass   `json:"glass"`
	Pose    Pose    `json:"pose"`
	Race    Race    `json:"race"`
	Smiling Smiling `json:"smiling"`
}

type FaceClient

type FaceClient struct {
	ApiServer string `json:"api_server"`
	ApiKey    string `json:"api_key"`
	ApiSecret string `json:"api_secret"`
}

func (*FaceClient) DetectImg

func (fc *FaceClient) DetectImg(imgPath string) (sessionId string, faces []*Face, img *Img, err error)

type Gender

type Gender struct {
	Confidence float64 `json:"confidence"`
	Value      string  `json:"value"`
}

type Glass

type Glass struct {
	Confidence float64 `json:"confidence"`
	Value      string  `json:"value"`
}

type Img

type Img struct {
	Id     string `json:"id"`
	Height int64  `json:"height"`
	Width  int64  `json:"width"`
	Url    string `json:"url"`
}

type PitchAngle

type PitchAngle struct {
	Value float64 `json:"value"`
}

type Point

type Point struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
}

type Pose

type Pose struct {
	PitchAngle PitchAngle `json:"pitch_angle"`
	RollAngle  RollAngle  `json:"roll_angle"`
	YawAngle   YawAngle   `json:"yaw_angle"`
}

type Positions

type Positions struct {
	Center     Point   `json:"center"`
	EyeLeft    Point   `json:"eye_left"`
	EyeRight   Point   `json:"eye_right"`
	Height     float64 `json:"height"` //0~100之间的实数,表示检出的脸的高度在图片中百分比
	Width      float64 `json:"width"`  //0~100之间的实数,表示检出的脸的宽度在图片中百分比
	MouseLeft  Point   `json:"mouse_left"`
	MouseRight Point   `json:"mouse_right"`
	Nose       Point   `json:"nose"`
}

type Race

type Race struct {
	Confidence float64 `json:"confidence"`
	Value      string  `json:"value"`
}

type RollAngle

type RollAngle struct {
	Value float64 `json:"value"`
}

type Smiling

type Smiling struct {
	Value float64 `json:"value"`
}

type YawAngle

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

Jump to

Keyboard shortcuts

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