Documentation ¶
Index ¶
- type BaseResponse
- type DetectFace
- type DetectRequest
- type DetectResponse
- type GroupDelRequest
- type GroupDelResponse
- type MatchUser
- type MultiSearchRequest
- type MultiSearchResponse
- type SDK
- func (sdk SDK) Detect(req *DetectRequest) (*DetectResponse, error)
- func (sdk SDK) GroupDel(req *GroupDelRequest) (*GroupDelResponse, error)
- func (sdk SDK) MultiSearch(req *MultiSearchRequest) (*MultiSearchResponse, error)
- func (sdk SDK) Search(req *SearchRequest) (*SearchResponse, error)
- func (sdk SDK) UserAdd(req *UserAddRequest) (*UserAddResponse, error)
- func (sdk SDK) UserDel(req *UserDelRequest) (*UserDelResponse, error)
- type SearchRequest
- type SearchResponse
- type UserAddRequest
- type UserAddResponse
- type UserDelRequest
- type UserDelResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseResponse ¶
type BaseResponse struct{ pkg.BaseResponse }
type DetectFace ¶
type DetectFace struct { FaceToken string `json:"face_token"` Location struct { Left float64 `json:"left"` Top float64 `json:"top"` Width float64 `json:"width"` Height float64 `json:"height"` Rotation float64 `json:"rotation"` } `json:"location"` FaceProbability float64 `json:"face_probability"` Angle struct { Yaw float64 `json:"yaw"` Pitch float64 `json:"pitch"` Roll float64 `json:"roll"` } `json:"angle"` Age float64 `json:"age"` Beauty float64 `json:"beauty"` Expression struct { Type string `json:"type"` Probability float64 `json:"probability"` } `json:"expression"` Gender struct { Type string `json:"type"` Probability float64 `json:"probability"` } `json:"gender"` Glasses struct { Type string `json:"type"` Probability float64 `json:"probability"` } `json:"glasses"` Emotion struct { Type string `json:"type"` Probability float64 `json:"probability"` } `json:"emotion"` Mask struct { Type int `json:"type"` Probability float64 `json:"probability"` } `json:"mask"` Quality struct { Occlusion struct { LeftEye float64 `json:"left_eye"` RightEye float64 `json:"right_eye"` Nose float64 `json:"nose"` Mouth float64 `json:"mouth"` LeftCheek float64 `json:"left_cheek"` RightCheek float64 `json:"right_cheek"` ChinContour float64 `json:"chin_contour"` } `json:"occlusion"` Blur float64 `json:"blur"` Illumination float64 `json:"illumination"` Completeness int8 `json:"completeness"` } `json:"quality"` }
func (*DetectFace) HasGlasses ¶
func (df *DetectFace) HasGlasses() bool
func (*DetectFace) HasMask ¶
func (df *DetectFace) HasMask() bool
type DetectRequest ¶
type DetectResponse ¶
type DetectResponse struct { BaseResponse Result struct { FaceNum int `json:"face_num"` FaceList []*DetectFace `json:"face_list"` } `json:"result"` }
type GroupDelRequest ¶
type GroupDelRequest struct {
GroupId string `json:"group_id"`
}
type GroupDelResponse ¶
type GroupDelResponse struct{ BaseResponse }
type MultiSearchRequest ¶
type MultiSearchRequest struct { Image string `json:"image"` ImageType string `json:"image_type"` GroupIdList string `json:"group_id_list"` QualityControl string `json:"quality_control,omitempty"` LivenessControl string `json:"liveness_control,omitempty"` MatchThreshold float64 `json:"match_threshold,omitempty"` MaxFaceNum int `json:"max_face_num,omitempty"` MaxUserNum int `json:"max_user_num,omitempty"` }
type MultiSearchResponse ¶
type MultiSearchResponse struct { BaseResponse Result struct { FaceNum int `json:"face_num"` FaceList []struct { FaceToken string `json:"face_token"` Location struct { Left float64 `json:"left"` Top float64 `json:"top"` Width float64 `json:"width"` Height float64 `json:"height"` Rotation float64 `json:"rotation"` } `json:"location"` UserList []MatchUser `json:"user_list"` } `json:"face_list"` } `json:"result"` }
type SDK ¶
type SDK struct {
// contains filtered or unexported fields
}
func (SDK) Detect ¶
func (sdk SDK) Detect(req *DetectRequest) (*DetectResponse, error)
Detect 人脸检测 https://ai.baidu.com/ai-doc/FACE/yk37c1u4t
func (SDK) GroupDel ¶
func (sdk SDK) GroupDel(req *GroupDelRequest) (*GroupDelResponse, error)
GroupDel 删除人脸组 https://ai.baidu.com/ai-doc/FACE/7k37c1twu#%E5%88%A0%E9%99%A4%E7%94%A8%E6%88%B7%E7%BB%84
func (SDK) MultiSearch ¶
func (sdk SDK) MultiSearch(req *MultiSearchRequest) (*MultiSearchResponse, error)
MultiSearch M:N搜索 https://ai.baidu.com/ai-doc/FACE/Gk37c1uzc#%E4%BA%BA%E8%84%B8%E6%90%9C%E7%B4%A2-mn-%E8%AF%86%E5%88%AB
func (SDK) Search ¶
func (sdk SDK) Search(req *SearchRequest) (*SearchResponse, error)
Search 人脸搜索 https://ai.baidu.com/ai-doc/FACE/Gk37c1uzc
func (SDK) UserAdd ¶
func (sdk SDK) UserAdd(req *UserAddRequest) (*UserAddResponse, error)
UserAdd 注册人脸 https://ai.baidu.com/ai-doc/FACE/7k37c1twu#%E4%BA%BA%E8%84%B8%E6%B3%A8%E5%86%8C
func (SDK) UserDel ¶
func (sdk SDK) UserDel(req *UserDelRequest) (*UserDelResponse, error)
UserDel 删除人脸 https://ai.baidu.com/ai-doc/FACE/7k37c1twu
type SearchRequest ¶
type SearchRequest struct { Image string `json:"image"` ImageType string `json:"image_type"` GroupIdList string `json:"group_id_list"` QualityControl string `json:"quality_control,omitempty"` LivenessControl string `json:"liveness_control,omitempty"` UserId string `json:"user_id,omitempty"` MaxUserNum int `json:"max_user_num,omitempty"` MatchThreshold int `json:"match_threshold,omitempty"` }
type SearchResponse ¶
type SearchResponse struct { BaseResponse Result struct { FaceToken string `json:"face_token"` UserList []MatchUser `json:"user_list"` } `json:"result"` }
type UserAddRequest ¶
type UserAddRequest struct { Image string `json:"image"` ImageType string `json:"image_type"` GroupId string `json:"group_id"` UserId string `json:"user_id"` UserInfo string `json:"user_info,omitempty"` QualityControl string `json:"quality_control,omitempty"` LivenessControl string `json:"liveness_control,omitempty"` ActionType string `json:"action_type,omitempty"` }
type UserAddResponse ¶
type UserAddResponse struct { BaseResponse Result struct { FaceToken string `json:"face_token"` Location struct { Left float64 `json:"left"` Top float64 `json:"top"` Width float64 `json:"width"` Height float64 `json:"height"` Rotation float64 `json:"rotation"` } `json:"location"` } `json:"result"` }
type UserDelRequest ¶
type UserDelResponse ¶
type UserDelResponse struct{ BaseResponse }
Click to show internal directories.
Click to hide internal directories.