 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- type Celebrity
- type CelebrityInfoResponse
- type CelebrityResponse
- type Collection
- func (c *Collection) DeleteFaces(faceIDs []string) ([]string, error)
- func (c *Collection) IndexFacesByBytes(byt []byte) (*IndexFacesResponse, error)
- func (c *Collection) IndexFacesByBytesWithExternalImageID(externalID string, byt []byte) (*IndexFacesResponse, error)
- func (c *Collection) IndexFacesByS3Object(bucket, name string, version ...string) (*IndexFacesResponse, error)
- func (c *Collection) IndexFacesByS3ObjectWithExternalImageID(externalID string, bucket, name string, version ...string) (*IndexFacesResponse, error)
- func (c *Collection) IndexFacesFromLocalFile(filepath string) (*IndexFacesResponse, error)
- func (c *Collection) IndexFacesFromLocalFileWithExternalImageID(externalID string, filepath string) (*IndexFacesResponse, error)
- func (c *Collection) IndexFacesFromURL(url string) (*IndexFacesResponse, error)
- func (c *Collection) IndexFacesFromURLWithExternalImageID(externalID string, url string) (*IndexFacesResponse, error)
- func (c *Collection) ListAllFaces() ([]*Face, error)
- func (c *Collection) SearchFacesByBytes(byt []byte) (*SearchFacesResponse, error)
- func (c *Collection) SearchFacesByBytesWithThreshold(threshold float64, byt []byte) (*SearchFacesResponse, error)
- func (c *Collection) SearchFacesByFaceID(faceID string, threshold ...float64) (*SearchFacesResponse, error)
- func (c *Collection) SearchFacesByS3Object(bucket, name string, version ...string) (*SearchFacesResponse, error)
- func (c *Collection) SearchFacesByS3ObjectWithThreshold(threshold float64, bucket, name string, version ...string) (*SearchFacesResponse, error)
- func (c *Collection) SetLimit(limit int64)
 
- type CompareFaceResponse
- type CompareFacesMatch
- type Emotion
- type Face
- type FaceDetail
- type FaceDetailResponse
- type FaceMatch
- type FaceRecord
- type HTTPClient
- type IndexFacesResponse
- type Label
- type LabelResponse
- type Landmark
- type ModerationLabel
- type ModerationLabelResponse
- type Rekognition
- func (svc *Rekognition) CompareFaces(input *SDK.CompareFacesInput) (*CompareFaceResponse, error)
- func (svc *Rekognition) CompareFacesByBytes(source, target []byte) (*CompareFaceResponse, error)
- func (svc *Rekognition) CompareFacesFromLocalFile(source, target string) (*CompareFaceResponse, error)
- func (svc *Rekognition) CompareFacesFromURL(source, target string) (*CompareFaceResponse, error)
- func (svc *Rekognition) CreateCollection(name string) error
- func (svc *Rekognition) DetectFacesByBytes(byt []byte) (*FaceDetailResponse, error)
- func (svc *Rekognition) DetectFacesByS3Object(bucket, name string, version ...string) (*FaceDetailResponse, error)
- func (svc *Rekognition) DetectFacesFromLocalFile(filepath string) (*FaceDetailResponse, error)
- func (svc *Rekognition) DetectFacesFromURL(url string) (*FaceDetailResponse, error)
- func (svc *Rekognition) DetectLabelsByBytes(byt []byte) (*LabelResponse, error)
- func (svc *Rekognition) DetectLabelsByS3Object(bucket, name string, version ...string) (*LabelResponse, error)
- func (svc *Rekognition) DetectLabelsFromLocalFile(filepath string) (*LabelResponse, error)
- func (svc *Rekognition) DetectLabelsFromURL(url string) (*LabelResponse, error)
- func (svc *Rekognition) DetectModerationLabelsByBytes(byt []byte) (*ModerationLabelResponse, error)
- func (svc *Rekognition) DetectModerationLabelsByS3Object(bucket, name string, version ...string) (*ModerationLabelResponse, error)
- func (svc *Rekognition) DetectModerationLabelsFromLocalFile(filepath string) (*ModerationLabelResponse, error)
- func (svc *Rekognition) DetectModerationLabelsFromURL(url string) (*ModerationLabelResponse, error)
- func (svc *Rekognition) Errorf(format string, v ...interface{})
- func (svc *Rekognition) ForceDeleteCollection(name string) error
- func (svc *Rekognition) GetCelebrityInfoByID(id string) (*CelebrityInfoResponse, error)
- func (svc *Rekognition) GetCollection(name string) (*Collection, error)
- func (svc *Rekognition) Infof(format string, v ...interface{})
- func (svc *Rekognition) IsExistCollection(name string) (bool, error)
- func (svc *Rekognition) ListCollections() ([]string, error)
- func (svc *Rekognition) RecognizeCelebritiesByBytes(byt []byte) (*CelebrityResponse, error)
- func (svc *Rekognition) RecognizeCelebritiesByS3Object(bucket, name string, version ...string) (*CelebrityResponse, error)
- func (svc *Rekognition) RecognizeCelebritiesFromLocalFile(filepath string) (*CelebrityResponse, error)
- func (svc *Rekognition) RecognizeCelebritiesFromURL(url string) (*CelebrityResponse, error)
- func (svc *Rekognition) SetHTTPClient(httpClient HTTPClient)
- func (svc *Rekognition) SetLogger(logger log.Logger)
 
- type SearchFacesResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CelebrityInfoResponse ¶
CelebrityInfoResponse is response data for `GetCelebrityInfo` operation.
func NewCelebrityInfoResponseFromAWSOutput ¶
func NewCelebrityInfoResponseFromAWSOutput(info *SDK.GetCelebrityInfoOutput) *CelebrityInfoResponse
NewCelebrityInfoResponseFromAWSOutput creates CelebrityInfoResponse from *SDK.GetCelebrityInfoOutput.
type CelebrityResponse ¶
type CelebrityResponse struct {
	List []*Celebrity
}
    CelebrityResponse is response data for `RecognizeCelebrities` operation.
type Collection ¶
type Collection struct {
	// contains filtered or unexported fields
}
    Collection has Collection client.
func NewCollection ¶
func NewCollection(svc *Rekognition, name string) *Collection
NewCollection returns initialized *Collection.
func (*Collection) DeleteFaces ¶
func (c *Collection) DeleteFaces(faceIDs []string) ([]string, error)
DeleteFaces executes `DeleteFaces` operation and delete faces in a collection.
func (*Collection) IndexFacesByBytes ¶
func (c *Collection) IndexFacesByBytes(byt []byte) (*IndexFacesResponse, error)
IndexFacesByBytes saves image of bytes into a collection.
func (*Collection) IndexFacesByBytesWithExternalImageID ¶
func (c *Collection) IndexFacesByBytesWithExternalImageID(externalID string, byt []byte) (*IndexFacesResponse, error)
IndexFacesByBytesWithExternalImageID saves image of bytes into a collection.
func (*Collection) IndexFacesByS3Object ¶
func (c *Collection) IndexFacesByS3Object(bucket, name string, version ...string) (*IndexFacesResponse, error)
IndexFacesByS3Object saves image of S3 object into a collection.
func (*Collection) IndexFacesByS3ObjectWithExternalImageID ¶
func (c *Collection) IndexFacesByS3ObjectWithExternalImageID(externalID string, bucket, name string, version ...string) (*IndexFacesResponse, error)
IndexFacesByS3ObjectWithExternalImageID saves image of S3 object into a collection.
func (*Collection) IndexFacesFromLocalFile ¶
func (c *Collection) IndexFacesFromLocalFile(filepath string) (*IndexFacesResponse, error)
IndexFacesFromLocalFile saves image into a collection from local image file.
func (*Collection) IndexFacesFromLocalFileWithExternalImageID ¶
func (c *Collection) IndexFacesFromLocalFileWithExternalImageID(externalID string, filepath string) (*IndexFacesResponse, error)
IndexFacesFromLocalFileWithExternalImageID saves image into a collection from local image file.
func (*Collection) IndexFacesFromURL ¶
func (c *Collection) IndexFacesFromURL(url string) (*IndexFacesResponse, error)
IndexFacesFromURL saves image into a collection from URL.
func (*Collection) IndexFacesFromURLWithExternalImageID ¶
func (c *Collection) IndexFacesFromURLWithExternalImageID(externalID string, url string) (*IndexFacesResponse, error)
IndexFacesFromURLWithExternalImageID saves image into a collection from URL.
func (*Collection) ListAllFaces ¶
func (c *Collection) ListAllFaces() ([]*Face, error)
ListAllFaces returns all of faces in a collection.
func (*Collection) SearchFacesByBytes ¶
func (c *Collection) SearchFacesByBytes(byt []byte) (*SearchFacesResponse, error)
SearchFacesByBytes searches similar faces by image of bytes in a collection.
func (*Collection) SearchFacesByBytesWithThreshold ¶
func (c *Collection) SearchFacesByBytesWithThreshold(threshold float64, byt []byte) (*SearchFacesResponse, error)
SearchFacesByBytesWithThreshold searches similar faces by image of bytes in a collection.
func (*Collection) SearchFacesByFaceID ¶
func (c *Collection) SearchFacesByFaceID(faceID string, threshold ...float64) (*SearchFacesResponse, error)
SearchFacesByFaceID searches similar faces by face id in a collection.
func (*Collection) SearchFacesByS3Object ¶
func (c *Collection) SearchFacesByS3Object(bucket, name string, version ...string) (*SearchFacesResponse, error)
SearchFacesByS3Object searches similar faces by image of S3 object in a collection.
func (*Collection) SearchFacesByS3ObjectWithThreshold ¶
func (c *Collection) SearchFacesByS3ObjectWithThreshold(threshold float64, bucket, name string, version ...string) (*SearchFacesResponse, error)
SearchFacesByS3ObjectWithThreshold searches similar faces by image of S3 object in a collection.
func (*Collection) SetLimit ¶
func (c *Collection) SetLimit(limit int64)
SetLimit sets limit, which is used for getting result list.
(e.g. MaxResults, MaxFaces etc...)
type CompareFaceResponse ¶
type CompareFaceResponse struct {
	MatchedList            []*FaceDetail
	UnmatchedList          []*FaceDetail
	SourceImage            *FaceDetail
	SourceImageOrientation string
	TargetImageOrientation string
}
    CompareFaceResponse is response data for `CompareFaces` operation.
func NewCompareFaceResponseFromAWSOutput ¶
func NewCompareFaceResponseFromAWSOutput(output *SDK.CompareFacesOutput) *CompareFaceResponse
NewCompareFaceResponseFromAWSOutput creates CompareFaceResponse from *SDK.CompareFacesOutput.
type CompareFacesMatch ¶
type CompareFacesMatch struct {
	*FaceDetail
	Similarity float64
}
    CompareFacesMatch has detailed face data and similarity. (wrapper struct for *SDK.ComparedFace)
type Face ¶
type Face struct {
	HasFace        bool
	FaceConfidence float64
	BoundingHeight float64
	BoundingWidth  float64
	BoundingTop    float64
	BoundingLeft   float64
	ExternalImageID string
	FaceID          string
	ImageID         string
}
    Face has face data in collection. (wrapper struct for *SDK.Face)
func NewFaceFromAWSFace ¶
NewFaceFromAWSFace creates Face from *SDK.Face.
type FaceDetail ¶
type FaceDetail struct {
	// estimated age range.
	HasAgeRange  bool
	AgeRangeHigh int
	AgeRangeLow  int
	HasBeard        bool
	BeardConfidence float64
	HasMustache        bool
	MustacheConfidence float64
	HasEyeglasses        bool
	EyeglassesConfidence float64
	HasSunglasses        bool
	SunglassesConfidence float64
	HasEyesOpen        bool
	EyesOpenConfidence float64
	HasMouthOpen        bool
	MouthOpenConfidence float64
	HasSmile        bool
	SmileConfidence float64
	HasPose   bool
	PosePitch float64
	PoseRoll  float64
	PoseYaw   float64
	HasImageQuality        bool
	ImageQualityBrightness float64
	ImageQualitySharpness  float64
	HasGender        bool
	Gender           string
	GenderConfidence float64
	HasFace        bool
	FaceConfidence float64
	BoundingHeight float64
	BoundingWidth  float64
	BoundingTop    float64
	BoundingLeft   float64
	HasEmotion bool
	Emotions   []Emotion
	HasLandmark bool
	Landmarks   []Landmark
}
    FaceDetail has detailed face data. (wrapper struct for *SDK.FaceDetail)
func NewFaceDetailFromAWSComparedFace ¶
func NewFaceDetailFromAWSComparedFace(face *SDK.ComparedFace) *FaceDetail
NewFaceDetailFromAWSComparedFace creates FaceDetail from *SDK.ComparedFace.
func NewFaceDetailFromAWSFaceDetail ¶
func NewFaceDetailFromAWSFaceDetail(face *SDK.FaceDetail) *FaceDetail
NewFaceDetailFromAWSFaceDetail creates FaceDetail from *SDK.FaceDetail.
type FaceDetailResponse ¶
type FaceDetailResponse struct {
	List        []*FaceDetail
	Orientation string
}
    FaceDetailResponse is response data for `DetectFaces` operation.
type FaceRecord ¶
type FaceRecord struct {
	*Face
	*FaceDetail
}
    FaceRecord has face and detail data. (wrapper struct for *SDK.FaceRecord)
type HTTPClient ¶
HTTPClient is used for fetching image data from URL.
type IndexFacesResponse ¶
type IndexFacesResponse struct {
	List        []*FaceRecord
	Orientation string
}
    IndexFacesResponse is response data for `IndexFaces` operation.
func NewIndexFacesResponseFromAWSOutput ¶
func NewIndexFacesResponseFromAWSOutput(output *SDK.IndexFacesOutput) *IndexFacesResponse
NewIndexFacesResponseFromAWSOutput creates IndexFacesResponse from *SDK.IndexFacesOutput.
type Label ¶
Label has label data.
func NewLabelFromAWSLabel ¶
NewLabelFromAWSLabel creates Label from *SDK.Label.
type LabelResponse ¶
LabelResponse is response data for `DetectLabels` operation.
type ModerationLabel ¶
ModerationLabel has moderation label data.
func NewModerationLabelFromAWSModerationLabel ¶
func NewModerationLabelFromAWSModerationLabel(label *SDK.ModerationLabel) *ModerationLabel
NewModerationLabelFromAWSModerationLabel creates ModerationLabel from *SDK.ModerationLabel.
type ModerationLabelResponse ¶
type ModerationLabelResponse struct {
	List []*ModerationLabel
}
    ModerationLabelResponse is response data for `DetectModerationLabels` operation.
type Rekognition ¶
type Rekognition struct {
	// contains filtered or unexported fields
}
    Rekognition has Rekognition client.
func (*Rekognition) CompareFaces ¶
func (svc *Rekognition) CompareFaces(input *SDK.CompareFacesInput) (*CompareFaceResponse, error)
CompareFaces executes `CompareFaces` operation and gets celebrities info.
func (*Rekognition) CompareFacesByBytes ¶
func (svc *Rekognition) CompareFacesByBytes(source, target []byte) (*CompareFaceResponse, error)
CompareFacesByBytes compares faces from image of bytes.
func (*Rekognition) CompareFacesFromLocalFile ¶
func (svc *Rekognition) CompareFacesFromLocalFile(source, target string) (*CompareFaceResponse, error)
CompareFacesFromLocalFile compares faces from local image files.
func (*Rekognition) CompareFacesFromURL ¶
func (svc *Rekognition) CompareFacesFromURL(source, target string) (*CompareFaceResponse, error)
CompareFacesFromURL compares faces from URL.
func (*Rekognition) CreateCollection ¶
func (svc *Rekognition) CreateCollection(name string) error
CreateCollection creates new Rekognition collection.
func (*Rekognition) DetectFacesByBytes ¶
func (svc *Rekognition) DetectFacesByBytes(byt []byte) (*FaceDetailResponse, error)
DetectFacesByBytes gets label info from image of bytes.
func (*Rekognition) DetectFacesByS3Object ¶
func (svc *Rekognition) DetectFacesByS3Object(bucket, name string, version ...string) (*FaceDetailResponse, error)
DetectFacesByS3Object gets label info from image of S3 object.
func (*Rekognition) DetectFacesFromLocalFile ¶
func (svc *Rekognition) DetectFacesFromLocalFile(filepath string) (*FaceDetailResponse, error)
DetectFacesFromLocalFile gets label info from local image file.
func (*Rekognition) DetectFacesFromURL ¶
func (svc *Rekognition) DetectFacesFromURL(url string) (*FaceDetailResponse, error)
DetectFacesFromURL gets label info from URL.
func (*Rekognition) DetectLabelsByBytes ¶
func (svc *Rekognition) DetectLabelsByBytes(byt []byte) (*LabelResponse, error)
DetectLabelsByBytes gets label info from image of bytes.
func (*Rekognition) DetectLabelsByS3Object ¶
func (svc *Rekognition) DetectLabelsByS3Object(bucket, name string, version ...string) (*LabelResponse, error)
DetectLabelsByS3Object gets label info from image of S3 object.
func (*Rekognition) DetectLabelsFromLocalFile ¶
func (svc *Rekognition) DetectLabelsFromLocalFile(filepath string) (*LabelResponse, error)
DetectLabelsFromLocalFile gets label info from local image file.
func (*Rekognition) DetectLabelsFromURL ¶
func (svc *Rekognition) DetectLabelsFromURL(url string) (*LabelResponse, error)
DetectLabelsFromURL gets label info from URL.
func (*Rekognition) DetectModerationLabelsByBytes ¶
func (svc *Rekognition) DetectModerationLabelsByBytes(byt []byte) (*ModerationLabelResponse, error)
DetectModerationLabelsByBytes gets moderation info from image of bytes.
func (*Rekognition) DetectModerationLabelsByS3Object ¶
func (svc *Rekognition) DetectModerationLabelsByS3Object(bucket, name string, version ...string) (*ModerationLabelResponse, error)
DetectModerationLabelsByS3Object gets moderation info from image of S3 object.
func (*Rekognition) DetectModerationLabelsFromLocalFile ¶
func (svc *Rekognition) DetectModerationLabelsFromLocalFile(filepath string) (*ModerationLabelResponse, error)
DetectModerationLabelsFromLocalFile gets moderation info from local image file.
func (*Rekognition) DetectModerationLabelsFromURL ¶
func (svc *Rekognition) DetectModerationLabelsFromURL(url string) (*ModerationLabelResponse, error)
DetectModerationLabelsFromURL gets moderation info from URL.
func (*Rekognition) Errorf ¶
func (svc *Rekognition) Errorf(format string, v ...interface{})
Errorf logging error information.
func (*Rekognition) ForceDeleteCollection ¶
func (svc *Rekognition) ForceDeleteCollection(name string) error
ForceDeleteCollection deletes Rekognition collection by given name with prefix.
func (*Rekognition) GetCelebrityInfoByID ¶
func (svc *Rekognition) GetCelebrityInfoByID(id string) (*CelebrityInfoResponse, error)
GetCelebrityInfoByID gets celebrities info by id.
func (*Rekognition) GetCollection ¶
func (svc *Rekognition) GetCollection(name string) (*Collection, error)
GetCollection gets Rekognition collection.
func (*Rekognition) Infof ¶
func (svc *Rekognition) Infof(format string, v ...interface{})
Infof logging information.
func (*Rekognition) IsExistCollection ¶
func (svc *Rekognition) IsExistCollection(name string) (bool, error)
IsExistCollection checks if the Collection already exists or not.
func (*Rekognition) ListCollections ¶
func (svc *Rekognition) ListCollections() ([]string, error)
ListCollections returns list of collections.
func (*Rekognition) RecognizeCelebritiesByBytes ¶
func (svc *Rekognition) RecognizeCelebritiesByBytes(byt []byte) (*CelebrityResponse, error)
RecognizeCelebritiesByBytes gets celebrities info from image of bytes.
func (*Rekognition) RecognizeCelebritiesByS3Object ¶
func (svc *Rekognition) RecognizeCelebritiesByS3Object(bucket, name string, version ...string) (*CelebrityResponse, error)
RecognizeCelebritiesByS3Object gets celebrities info from image of S3 object.
func (*Rekognition) RecognizeCelebritiesFromLocalFile ¶
func (svc *Rekognition) RecognizeCelebritiesFromLocalFile(filepath string) (*CelebrityResponse, error)
RecognizeCelebritiesFromLocalFile gets celebrities info from local image file.
func (*Rekognition) RecognizeCelebritiesFromURL ¶
func (svc *Rekognition) RecognizeCelebritiesFromURL(url string) (*CelebrityResponse, error)
RecognizeCelebritiesFromURL gets celebrities info from URL.
func (*Rekognition) SetHTTPClient ¶
func (svc *Rekognition) SetHTTPClient(httpClient HTTPClient)
SetHTTPClient sets httpClient.
func (*Rekognition) SetLogger ¶
func (svc *Rekognition) SetLogger(logger log.Logger)
SetLogger sets logger.
type SearchFacesResponse ¶
type SearchFacesResponse struct {
	List []*FaceMatch
	// returned by `SearchFaces` operation
	FaceID string
	// returned by `SearchFacesByImage` operation
	HasFace        bool
	FaceConfidence float64
	BoundingHeight float64
	BoundingWidth  float64
	BoundingTop    float64
	BoundingLeft   float64
}
    SearchFacesResponse is response data for `SearchFaces` operation.
func NewSearchFacesResponseFromAWSOutput ¶
func NewSearchFacesResponseFromAWSOutput(output *SDK.SearchFacesOutput) *SearchFacesResponse
NewSearchFacesResponseFromAWSOutput creates SearchFacesResponse from *SDK.SearchFacesOutput.
func NewSearchFacesResponseFromAWSOutputByImage ¶
func NewSearchFacesResponseFromAWSOutputByImage(output *SDK.SearchFacesByImageOutput) *SearchFacesResponse
NewSearchFacesResponseFromAWSOutputByImage creates SearchFacesResponse from *SDK.SearchFacesByImageOutput.