vision

package
v0.0.0-...-5fa7aab Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const (
	VisionService_BatchAnalyze_FullMethodName = "/yandex.cloud.ai.vision.v1.VisionService/BatchAnalyze"
)

Variables

View Source
var (
	Feature_Type_name = map[int32]string{
		0: "TYPE_UNSPECIFIED",
		1: "TEXT_DETECTION",
		2: "CLASSIFICATION",
		3: "FACE_DETECTION",
		4: "IMAGE_COPY_SEARCH",
	}
	Feature_Type_value = map[string]int32{
		"TYPE_UNSPECIFIED":  0,
		"TEXT_DETECTION":    1,
		"CLASSIFICATION":    2,
		"FACE_DETECTION":    3,
		"IMAGE_COPY_SEARCH": 4,
	}
)

Enum value maps for Feature_Type.

View Source
var File_yandex_cloud_ai_vision_v1_classification_proto protoreflect.FileDescriptor
View Source
var File_yandex_cloud_ai_vision_v1_face_detection_proto protoreflect.FileDescriptor
View Source
var File_yandex_cloud_ai_vision_v1_image_copy_search_proto protoreflect.FileDescriptor
View Source
var File_yandex_cloud_ai_vision_v1_primitives_proto protoreflect.FileDescriptor
View Source
var File_yandex_cloud_ai_vision_v1_text_detection_proto protoreflect.FileDescriptor
View Source
var File_yandex_cloud_ai_vision_v1_vision_service_proto protoreflect.FileDescriptor
View Source
var VisionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.ai.vision.v1.VisionService",
	HandlerType: (*VisionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "BatchAnalyze",
			Handler:    _VisionService_BatchAnalyze_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/ai/vision/v1/vision_service.proto",
}

VisionService_ServiceDesc is the grpc.ServiceDesc for VisionService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterVisionServiceServer

func RegisterVisionServiceServer(s grpc.ServiceRegistrar, srv VisionServiceServer)

Types

type AnalyzeResult

type AnalyzeResult struct {

	// Results for each requested feature.
	// Feature results have the same order as in the request.
	Results []*FeatureResult `protobuf:"bytes,2,rep,name=results,proto3" json:"results,omitempty"`
	// Return error in case of error with file processing.
	Error *status.Status `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*AnalyzeResult) Descriptor deprecated

func (*AnalyzeResult) Descriptor() ([]byte, []int)

Deprecated: Use AnalyzeResult.ProtoReflect.Descriptor instead.

func (*AnalyzeResult) GetError

func (x *AnalyzeResult) GetError() *status.Status

func (*AnalyzeResult) GetResults

func (x *AnalyzeResult) GetResults() []*FeatureResult

func (*AnalyzeResult) ProtoMessage

func (*AnalyzeResult) ProtoMessage()

func (*AnalyzeResult) ProtoReflect

func (x *AnalyzeResult) ProtoReflect() protoreflect.Message

func (*AnalyzeResult) Reset

func (x *AnalyzeResult) Reset()

func (*AnalyzeResult) SetError

func (m *AnalyzeResult) SetError(v *status.Status)

func (*AnalyzeResult) SetResults

func (m *AnalyzeResult) SetResults(v []*FeatureResult)

func (*AnalyzeResult) String

func (x *AnalyzeResult) String() string

type AnalyzeSpec

type AnalyzeSpec struct {

	// Types that are assignable to Source:
	//
	//	*AnalyzeSpec_Content
	//	*AnalyzeSpec_Signature
	Source isAnalyzeSpec_Source `protobuf_oneof:"source"`
	// Requested features to use for analysis.
	//
	// Max count of requested features for one file is 8.
	Features []*Feature `protobuf:"bytes,3,rep,name=features,proto3" json:"features,omitempty"`
	// [MIME type](https://en.wikipedia.org/wiki/Media_type) of content (for example, “ application/pdf “).
	MimeType string `protobuf:"bytes,4,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
	// contains filtered or unexported fields
}

func (*AnalyzeSpec) Descriptor deprecated

func (*AnalyzeSpec) Descriptor() ([]byte, []int)

Deprecated: Use AnalyzeSpec.ProtoReflect.Descriptor instead.

func (*AnalyzeSpec) GetContent

func (x *AnalyzeSpec) GetContent() []byte

func (*AnalyzeSpec) GetFeatures

func (x *AnalyzeSpec) GetFeatures() []*Feature

func (*AnalyzeSpec) GetMimeType

func (x *AnalyzeSpec) GetMimeType() string

func (*AnalyzeSpec) GetSignature

func (x *AnalyzeSpec) GetSignature() string

func (*AnalyzeSpec) GetSource

func (m *AnalyzeSpec) GetSource() isAnalyzeSpec_Source

func (*AnalyzeSpec) ProtoMessage

func (*AnalyzeSpec) ProtoMessage()

func (*AnalyzeSpec) ProtoReflect

func (x *AnalyzeSpec) ProtoReflect() protoreflect.Message

func (*AnalyzeSpec) Reset

func (x *AnalyzeSpec) Reset()

func (*AnalyzeSpec) SetContent

func (m *AnalyzeSpec) SetContent(v []byte)

func (*AnalyzeSpec) SetFeatures

func (m *AnalyzeSpec) SetFeatures(v []*Feature)

func (*AnalyzeSpec) SetMimeType

func (m *AnalyzeSpec) SetMimeType(v string)

func (*AnalyzeSpec) SetSignature

func (m *AnalyzeSpec) SetSignature(v string)

func (*AnalyzeSpec) SetSource

func (m *AnalyzeSpec) SetSource(v AnalyzeSpec_Source)

func (*AnalyzeSpec) String

func (x *AnalyzeSpec) String() string

type AnalyzeSpec_Content

type AnalyzeSpec_Content struct {
	// Image content, represented as a stream of bytes.
	// Note: As with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64.
	Content []byte `protobuf:"bytes,1,opt,name=content,proto3,oneof"`
}

type AnalyzeSpec_Signature

type AnalyzeSpec_Signature struct {
	Signature string `protobuf:"bytes,5,opt,name=signature,proto3,oneof"`
}

type AnalyzeSpec_Source

type AnalyzeSpec_Source = isAnalyzeSpec_Source

type BatchAnalyzeRequest

type BatchAnalyzeRequest struct {

	// A list of specifications. Each specification contains the file to analyze and features to use for analysis.
	//
	// Restrictions:
	// * Supported file formats: `JPEG`, `PNG`.
	// * Maximum file size: 1 MB.
	// * Image size should not exceed 20M pixels (length x width).
	AnalyzeSpecs []*AnalyzeSpec `protobuf:"bytes,1,rep,name=analyze_specs,json=analyzeSpecs,proto3" json:"analyze_specs,omitempty"`
	// ID of the folder to which you have access.
	// Required for authorization with a user account (see [yandex.cloud.iam.v1.UserAccount] resource).
	// Don't specify this field if you make the request on behalf of a service account.
	FolderId string `protobuf:"bytes,2,opt,name=folder_id,json=folderId,proto3" json:"folder_id,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchAnalyzeRequest) Descriptor deprecated

func (*BatchAnalyzeRequest) Descriptor() ([]byte, []int)

Deprecated: Use BatchAnalyzeRequest.ProtoReflect.Descriptor instead.

func (*BatchAnalyzeRequest) GetAnalyzeSpecs

func (x *BatchAnalyzeRequest) GetAnalyzeSpecs() []*AnalyzeSpec

func (*BatchAnalyzeRequest) GetFolderId

func (x *BatchAnalyzeRequest) GetFolderId() string

func (*BatchAnalyzeRequest) ProtoMessage

func (*BatchAnalyzeRequest) ProtoMessage()

func (*BatchAnalyzeRequest) ProtoReflect

func (x *BatchAnalyzeRequest) ProtoReflect() protoreflect.Message

func (*BatchAnalyzeRequest) Reset

func (x *BatchAnalyzeRequest) Reset()

func (*BatchAnalyzeRequest) SetAnalyzeSpecs

func (m *BatchAnalyzeRequest) SetAnalyzeSpecs(v []*AnalyzeSpec)

func (*BatchAnalyzeRequest) SetFolderId

func (m *BatchAnalyzeRequest) SetFolderId(v string)

func (*BatchAnalyzeRequest) String

func (x *BatchAnalyzeRequest) String() string

type BatchAnalyzeResponse

type BatchAnalyzeResponse struct {

	// Request results.
	// Results have the same order as specifications in the request.
	Results []*AnalyzeResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchAnalyzeResponse) Descriptor deprecated

func (*BatchAnalyzeResponse) Descriptor() ([]byte, []int)

Deprecated: Use BatchAnalyzeResponse.ProtoReflect.Descriptor instead.

func (*BatchAnalyzeResponse) GetResults

func (x *BatchAnalyzeResponse) GetResults() []*AnalyzeResult

func (*BatchAnalyzeResponse) ProtoMessage

func (*BatchAnalyzeResponse) ProtoMessage()

func (*BatchAnalyzeResponse) ProtoReflect

func (x *BatchAnalyzeResponse) ProtoReflect() protoreflect.Message

func (*BatchAnalyzeResponse) Reset

func (x *BatchAnalyzeResponse) Reset()

func (*BatchAnalyzeResponse) SetResults

func (m *BatchAnalyzeResponse) SetResults(v []*AnalyzeResult)

func (*BatchAnalyzeResponse) String

func (x *BatchAnalyzeResponse) String() string

type Block

type Block struct {

	// Area on the page where the text block is located.
	BoundingBox *Polygon `protobuf:"bytes,1,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
	// Recognized lines in this block.
	Lines []*Line `protobuf:"bytes,2,rep,name=lines,proto3" json:"lines,omitempty"`
	// contains filtered or unexported fields
}

func (*Block) Descriptor deprecated

func (*Block) Descriptor() ([]byte, []int)

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetBoundingBox

func (x *Block) GetBoundingBox() *Polygon

func (*Block) GetLines

func (x *Block) GetLines() []*Line

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) ProtoReflect

func (x *Block) ProtoReflect() protoreflect.Message

func (*Block) Reset

func (x *Block) Reset()

func (*Block) SetBoundingBox

func (m *Block) SetBoundingBox(v *Polygon)

func (*Block) SetLines

func (m *Block) SetLines(v []*Line)

func (*Block) String

func (x *Block) String() string

type ClassAnnotation

type ClassAnnotation struct {

	// Properties extracted by a specified model.
	//
	// For example, if you ask to evaluate the image quality,
	// the service could return such properties as `good` and `bad`.
	Properties []*Property `protobuf:"bytes,1,rep,name=properties,proto3" json:"properties,omitempty"`
	// contains filtered or unexported fields
}

func (*ClassAnnotation) Descriptor deprecated

func (*ClassAnnotation) Descriptor() ([]byte, []int)

Deprecated: Use ClassAnnotation.ProtoReflect.Descriptor instead.

func (*ClassAnnotation) GetProperties

func (x *ClassAnnotation) GetProperties() []*Property

func (*ClassAnnotation) ProtoMessage

func (*ClassAnnotation) ProtoMessage()

func (*ClassAnnotation) ProtoReflect

func (x *ClassAnnotation) ProtoReflect() protoreflect.Message

func (*ClassAnnotation) Reset

func (x *ClassAnnotation) Reset()

func (*ClassAnnotation) SetProperties

func (m *ClassAnnotation) SetProperties(v []*Property)

func (*ClassAnnotation) String

func (x *ClassAnnotation) String() string

type CopyMatch

type CopyMatch struct {

	// url of image
	ImageUrl string `protobuf:"bytes,1,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"`
	// url of page that contains image
	PageUrl string `protobuf:"bytes,2,opt,name=page_url,json=pageUrl,proto3" json:"page_url,omitempty"`
	// page title that contains image
	Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
	// image description
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*CopyMatch) Descriptor deprecated

func (*CopyMatch) Descriptor() ([]byte, []int)

Deprecated: Use CopyMatch.ProtoReflect.Descriptor instead.

func (*CopyMatch) GetDescription

func (x *CopyMatch) GetDescription() string

func (*CopyMatch) GetImageUrl

func (x *CopyMatch) GetImageUrl() string

func (*CopyMatch) GetPageUrl

func (x *CopyMatch) GetPageUrl() string

func (*CopyMatch) GetTitle

func (x *CopyMatch) GetTitle() string

func (*CopyMatch) ProtoMessage

func (*CopyMatch) ProtoMessage()

func (*CopyMatch) ProtoReflect

func (x *CopyMatch) ProtoReflect() protoreflect.Message

func (*CopyMatch) Reset

func (x *CopyMatch) Reset()

func (*CopyMatch) SetDescription

func (m *CopyMatch) SetDescription(v string)

func (*CopyMatch) SetImageUrl

func (m *CopyMatch) SetImageUrl(v string)

func (*CopyMatch) SetPageUrl

func (m *CopyMatch) SetPageUrl(v string)

func (*CopyMatch) SetTitle

func (m *CopyMatch) SetTitle(v string)

func (*CopyMatch) String

func (x *CopyMatch) String() string

type Entity

type Entity struct {

	// Entity name
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Recognized entity text
	Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*Entity) Descriptor deprecated

func (*Entity) Descriptor() ([]byte, []int)

Deprecated: Use Entity.ProtoReflect.Descriptor instead.

func (*Entity) GetName

func (x *Entity) GetName() string

func (*Entity) GetText

func (x *Entity) GetText() string

func (*Entity) ProtoMessage

func (*Entity) ProtoMessage()

func (*Entity) ProtoReflect

func (x *Entity) ProtoReflect() protoreflect.Message

func (*Entity) Reset

func (x *Entity) Reset()

func (*Entity) SetName

func (m *Entity) SetName(v string)

func (*Entity) SetText

func (m *Entity) SetText(v string)

func (*Entity) String

func (x *Entity) String() string

type Face

type Face struct {

	// Area on the image where the face is located.
	BoundingBox *Polygon `protobuf:"bytes,1,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
	// contains filtered or unexported fields
}

func (*Face) Descriptor deprecated

func (*Face) Descriptor() ([]byte, []int)

Deprecated: Use Face.ProtoReflect.Descriptor instead.

func (*Face) GetBoundingBox

func (x *Face) GetBoundingBox() *Polygon

func (*Face) ProtoMessage

func (*Face) ProtoMessage()

func (*Face) ProtoReflect

func (x *Face) ProtoReflect() protoreflect.Message

func (*Face) Reset

func (x *Face) Reset()

func (*Face) SetBoundingBox

func (m *Face) SetBoundingBox(v *Polygon)

func (*Face) String

func (x *Face) String() string

type FaceAnnotation

type FaceAnnotation struct {

	// An array of detected faces for the specified image.
	Faces []*Face `protobuf:"bytes,1,rep,name=faces,proto3" json:"faces,omitempty"`
	// contains filtered or unexported fields
}

func (*FaceAnnotation) Descriptor deprecated

func (*FaceAnnotation) Descriptor() ([]byte, []int)

Deprecated: Use FaceAnnotation.ProtoReflect.Descriptor instead.

func (*FaceAnnotation) GetFaces

func (x *FaceAnnotation) GetFaces() []*Face

func (*FaceAnnotation) ProtoMessage

func (*FaceAnnotation) ProtoMessage()

func (*FaceAnnotation) ProtoReflect

func (x *FaceAnnotation) ProtoReflect() protoreflect.Message

func (*FaceAnnotation) Reset

func (x *FaceAnnotation) Reset()

func (*FaceAnnotation) SetFaces

func (m *FaceAnnotation) SetFaces(v []*Face)

func (*FaceAnnotation) String

func (x *FaceAnnotation) String() string

type Feature

type Feature struct {

	// Type of requested feature.
	Type Feature_Type `protobuf:"varint,1,opt,name=type,proto3,enum=yandex.cloud.ai.vision.v1.Feature_Type" json:"type,omitempty"`
	// Types that are assignable to Config:
	//
	//	*Feature_ClassificationConfig
	//	*Feature_TextDetectionConfig
	Config isFeature_Config `protobuf_oneof:"config"`
	// contains filtered or unexported fields
}

func (*Feature) Descriptor deprecated

func (*Feature) Descriptor() ([]byte, []int)

Deprecated: Use Feature.ProtoReflect.Descriptor instead.

func (*Feature) GetClassificationConfig

func (x *Feature) GetClassificationConfig() *FeatureClassificationConfig

func (*Feature) GetConfig

func (m *Feature) GetConfig() isFeature_Config

func (*Feature) GetTextDetectionConfig

func (x *Feature) GetTextDetectionConfig() *FeatureTextDetectionConfig

func (*Feature) GetType

func (x *Feature) GetType() Feature_Type

func (*Feature) ProtoMessage

func (*Feature) ProtoMessage()

func (*Feature) ProtoReflect

func (x *Feature) ProtoReflect() protoreflect.Message

func (*Feature) Reset

func (x *Feature) Reset()

func (*Feature) SetClassificationConfig

func (m *Feature) SetClassificationConfig(v *FeatureClassificationConfig)

func (*Feature) SetConfig

func (m *Feature) SetConfig(v Feature_Config)

func (*Feature) SetTextDetectionConfig

func (m *Feature) SetTextDetectionConfig(v *FeatureTextDetectionConfig)

func (*Feature) SetType

func (m *Feature) SetType(v Feature_Type)

func (*Feature) String

func (x *Feature) String() string

type FeatureClassificationConfig

type FeatureClassificationConfig struct {

	// Model to use for image classification.
	Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	// contains filtered or unexported fields
}

func (*FeatureClassificationConfig) Descriptor deprecated

func (*FeatureClassificationConfig) Descriptor() ([]byte, []int)

Deprecated: Use FeatureClassificationConfig.ProtoReflect.Descriptor instead.

func (*FeatureClassificationConfig) GetModel

func (x *FeatureClassificationConfig) GetModel() string

func (*FeatureClassificationConfig) ProtoMessage

func (*FeatureClassificationConfig) ProtoMessage()

func (*FeatureClassificationConfig) ProtoReflect

func (*FeatureClassificationConfig) Reset

func (x *FeatureClassificationConfig) Reset()

func (*FeatureClassificationConfig) SetModel

func (m *FeatureClassificationConfig) SetModel(v string)

func (*FeatureClassificationConfig) String

func (x *FeatureClassificationConfig) String() string

type FeatureResult

type FeatureResult struct {

	// Types that are assignable to Feature:
	//
	//	*FeatureResult_TextDetection
	//	*FeatureResult_Classification
	//	*FeatureResult_FaceDetection
	//	*FeatureResult_ImageCopySearch
	Feature isFeatureResult_Feature `protobuf_oneof:"feature"`
	// Return error in case of error during the specified feature processing.
	Error *status.Status `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*FeatureResult) Descriptor deprecated

func (*FeatureResult) Descriptor() ([]byte, []int)

Deprecated: Use FeatureResult.ProtoReflect.Descriptor instead.

func (*FeatureResult) GetClassification

func (x *FeatureResult) GetClassification() *ClassAnnotation

func (*FeatureResult) GetError

func (x *FeatureResult) GetError() *status.Status

func (*FeatureResult) GetFaceDetection

func (x *FeatureResult) GetFaceDetection() *FaceAnnotation

func (*FeatureResult) GetFeature

func (m *FeatureResult) GetFeature() isFeatureResult_Feature

func (*FeatureResult) GetImageCopySearch

func (x *FeatureResult) GetImageCopySearch() *ImageCopySearchAnnotation

func (*FeatureResult) GetTextDetection

func (x *FeatureResult) GetTextDetection() *TextAnnotation

func (*FeatureResult) ProtoMessage

func (*FeatureResult) ProtoMessage()

func (*FeatureResult) ProtoReflect

func (x *FeatureResult) ProtoReflect() protoreflect.Message

func (*FeatureResult) Reset

func (x *FeatureResult) Reset()

func (*FeatureResult) SetClassification

func (m *FeatureResult) SetClassification(v *ClassAnnotation)

func (*FeatureResult) SetError

func (m *FeatureResult) SetError(v *status.Status)

func (*FeatureResult) SetFaceDetection

func (m *FeatureResult) SetFaceDetection(v *FaceAnnotation)

func (*FeatureResult) SetFeature

func (m *FeatureResult) SetFeature(v FeatureResult_Feature)

func (*FeatureResult) SetImageCopySearch

func (m *FeatureResult) SetImageCopySearch(v *ImageCopySearchAnnotation)

func (*FeatureResult) SetTextDetection

func (m *FeatureResult) SetTextDetection(v *TextAnnotation)

func (*FeatureResult) String

func (x *FeatureResult) String() string

type FeatureResult_Classification

type FeatureResult_Classification struct {
	// Classification result.
	Classification *ClassAnnotation `protobuf:"bytes,3,opt,name=classification,proto3,oneof"`
}

type FeatureResult_FaceDetection

type FeatureResult_FaceDetection struct {
	// Face detection result.
	FaceDetection *FaceAnnotation `protobuf:"bytes,4,opt,name=face_detection,json=faceDetection,proto3,oneof"`
}

type FeatureResult_Feature

type FeatureResult_Feature = isFeatureResult_Feature

type FeatureResult_ImageCopySearch

type FeatureResult_ImageCopySearch struct {
	// Image Copy Search result.
	ImageCopySearch *ImageCopySearchAnnotation `protobuf:"bytes,5,opt,name=image_copy_search,json=imageCopySearch,proto3,oneof"`
}

type FeatureResult_TextDetection

type FeatureResult_TextDetection struct {
	// Text detection (OCR) result.
	TextDetection *TextAnnotation `protobuf:"bytes,2,opt,name=text_detection,json=textDetection,proto3,oneof"`
}

type FeatureTextDetectionConfig

type FeatureTextDetectionConfig struct {

	// List of the languages to recognize text.
	// Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `ru`).
	LanguageCodes []string `protobuf:"bytes,1,rep,name=language_codes,json=languageCodes,proto3" json:"language_codes,omitempty"`
	// Model to use for text detection.
	// Possible values:
	// * `page` (default): this model is suitable for detecting multiple text entries in an image.
	// * `line`: this model is suitable for cropped images with one line of text.
	Model string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"`
	// contains filtered or unexported fields
}

func (*FeatureTextDetectionConfig) Descriptor deprecated

func (*FeatureTextDetectionConfig) Descriptor() ([]byte, []int)

Deprecated: Use FeatureTextDetectionConfig.ProtoReflect.Descriptor instead.

func (*FeatureTextDetectionConfig) GetLanguageCodes

func (x *FeatureTextDetectionConfig) GetLanguageCodes() []string

func (*FeatureTextDetectionConfig) GetModel

func (x *FeatureTextDetectionConfig) GetModel() string

func (*FeatureTextDetectionConfig) ProtoMessage

func (*FeatureTextDetectionConfig) ProtoMessage()

func (*FeatureTextDetectionConfig) ProtoReflect

func (*FeatureTextDetectionConfig) Reset

func (x *FeatureTextDetectionConfig) Reset()

func (*FeatureTextDetectionConfig) SetLanguageCodes

func (m *FeatureTextDetectionConfig) SetLanguageCodes(v []string)

func (*FeatureTextDetectionConfig) SetModel

func (m *FeatureTextDetectionConfig) SetModel(v string)

func (*FeatureTextDetectionConfig) String

func (x *FeatureTextDetectionConfig) String() string

type Feature_ClassificationConfig

type Feature_ClassificationConfig struct {
	// Required for the `CLASSIFICATION` type. Specifies configuration for the classification feature.
	ClassificationConfig *FeatureClassificationConfig `protobuf:"bytes,2,opt,name=classification_config,json=classificationConfig,proto3,oneof"`
}

type Feature_Config

type Feature_Config = isFeature_Config

type Feature_TextDetectionConfig

type Feature_TextDetectionConfig struct {
	// Required for the `TEXT_DETECTION` type. Specifies configuration for the text detection (OCR) feature.
	TextDetectionConfig *FeatureTextDetectionConfig `protobuf:"bytes,3,opt,name=text_detection_config,json=textDetectionConfig,proto3,oneof"`
}

type Feature_Type

type Feature_Type int32
const (
	Feature_TYPE_UNSPECIFIED Feature_Type = 0
	// Text detection (OCR) feature.
	Feature_TEXT_DETECTION Feature_Type = 1
	// Classification feature.
	Feature_CLASSIFICATION Feature_Type = 2
	// Face detection feature.
	Feature_FACE_DETECTION Feature_Type = 3
	// Image copy search.
	Feature_IMAGE_COPY_SEARCH Feature_Type = 4
)

func (Feature_Type) Descriptor

func (Feature_Type) Enum

func (x Feature_Type) Enum() *Feature_Type

func (Feature_Type) EnumDescriptor deprecated

func (Feature_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Feature_Type.Descriptor instead.

func (Feature_Type) Number

func (Feature_Type) String

func (x Feature_Type) String() string

func (Feature_Type) Type

type ImageCopySearchAnnotation

type ImageCopySearchAnnotation struct {

	// Number of image copies
	CopyCount int64 `protobuf:"varint,1,opt,name=copy_count,json=copyCount,proto3" json:"copy_count,omitempty"`
	// Top relevance result of image copy search
	TopResults []*CopyMatch `protobuf:"bytes,2,rep,name=top_results,json=topResults,proto3" json:"top_results,omitempty"`
	// contains filtered or unexported fields
}

func (*ImageCopySearchAnnotation) Descriptor deprecated

func (*ImageCopySearchAnnotation) Descriptor() ([]byte, []int)

Deprecated: Use ImageCopySearchAnnotation.ProtoReflect.Descriptor instead.

func (*ImageCopySearchAnnotation) GetCopyCount

func (x *ImageCopySearchAnnotation) GetCopyCount() int64

func (*ImageCopySearchAnnotation) GetTopResults

func (x *ImageCopySearchAnnotation) GetTopResults() []*CopyMatch

func (*ImageCopySearchAnnotation) ProtoMessage

func (*ImageCopySearchAnnotation) ProtoMessage()

func (*ImageCopySearchAnnotation) ProtoReflect

func (*ImageCopySearchAnnotation) Reset

func (x *ImageCopySearchAnnotation) Reset()

func (*ImageCopySearchAnnotation) SetCopyCount

func (m *ImageCopySearchAnnotation) SetCopyCount(v int64)

func (*ImageCopySearchAnnotation) SetTopResults

func (m *ImageCopySearchAnnotation) SetTopResults(v []*CopyMatch)

func (*ImageCopySearchAnnotation) String

func (x *ImageCopySearchAnnotation) String() string

type Line

type Line struct {

	// Area on the page where the line is located.
	BoundingBox *Polygon `protobuf:"bytes,1,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
	// Recognized words in this line.
	Words []*Word `protobuf:"bytes,2,rep,name=words,proto3" json:"words,omitempty"`
	// Confidence of the OCR results for the line. Range [0, 1].
	Confidence float64 `protobuf:"fixed64,3,opt,name=confidence,proto3" json:"confidence,omitempty"`
	// contains filtered or unexported fields
}

func (*Line) Descriptor deprecated

func (*Line) Descriptor() ([]byte, []int)

Deprecated: Use Line.ProtoReflect.Descriptor instead.

func (*Line) GetBoundingBox

func (x *Line) GetBoundingBox() *Polygon

func (*Line) GetConfidence

func (x *Line) GetConfidence() float64

func (*Line) GetWords

func (x *Line) GetWords() []*Word

func (*Line) ProtoMessage

func (*Line) ProtoMessage()

func (*Line) ProtoReflect

func (x *Line) ProtoReflect() protoreflect.Message

func (*Line) Reset

func (x *Line) Reset()

func (*Line) SetBoundingBox

func (m *Line) SetBoundingBox(v *Polygon)

func (*Line) SetConfidence

func (m *Line) SetConfidence(v float64)

func (*Line) SetWords

func (m *Line) SetWords(v []*Word)

func (*Line) String

func (x *Line) String() string

type Page

type Page struct {

	// Page width in pixels.
	Width int64 `protobuf:"varint,1,opt,name=width,proto3" json:"width,omitempty"`
	// Page height in pixels.
	Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
	// Recognized text blocks in this page.
	Blocks []*Block `protobuf:"bytes,3,rep,name=blocks,proto3" json:"blocks,omitempty"`
	// Recognized entities
	Entities []*Entity `protobuf:"bytes,4,rep,name=entities,proto3" json:"entities,omitempty"`
	// contains filtered or unexported fields
}

func (*Page) Descriptor deprecated

func (*Page) Descriptor() ([]byte, []int)

Deprecated: Use Page.ProtoReflect.Descriptor instead.

func (*Page) GetBlocks

func (x *Page) GetBlocks() []*Block

func (*Page) GetEntities

func (x *Page) GetEntities() []*Entity

func (*Page) GetHeight

func (x *Page) GetHeight() int64

func (*Page) GetWidth

func (x *Page) GetWidth() int64

func (*Page) ProtoMessage

func (*Page) ProtoMessage()

func (*Page) ProtoReflect

func (x *Page) ProtoReflect() protoreflect.Message

func (*Page) Reset

func (x *Page) Reset()

func (*Page) SetBlocks

func (m *Page) SetBlocks(v []*Block)

func (*Page) SetEntities

func (m *Page) SetEntities(v []*Entity)

func (*Page) SetHeight

func (m *Page) SetHeight(v int64)

func (*Page) SetWidth

func (m *Page) SetWidth(v int64)

func (*Page) String

func (x *Page) String() string

type Polygon

type Polygon struct {

	// The bounding polygon vertices.
	Vertices []*Vertex `protobuf:"bytes,1,rep,name=vertices,proto3" json:"vertices,omitempty"`
	// contains filtered or unexported fields
}

func (*Polygon) Descriptor deprecated

func (*Polygon) Descriptor() ([]byte, []int)

Deprecated: Use Polygon.ProtoReflect.Descriptor instead.

func (*Polygon) GetVertices

func (x *Polygon) GetVertices() []*Vertex

func (*Polygon) ProtoMessage

func (*Polygon) ProtoMessage()

func (*Polygon) ProtoReflect

func (x *Polygon) ProtoReflect() protoreflect.Message

func (*Polygon) Reset

func (x *Polygon) Reset()

func (*Polygon) SetVertices

func (m *Polygon) SetVertices(v []*Vertex)

func (*Polygon) String

func (x *Polygon) String() string

type Property

type Property struct {

	// Property name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Probability of the property, from 0 to 1.
	Probability float64 `protobuf:"fixed64,2,opt,name=probability,proto3" json:"probability,omitempty"`
	// contains filtered or unexported fields
}

func (*Property) Descriptor deprecated

func (*Property) Descriptor() ([]byte, []int)

Deprecated: Use Property.ProtoReflect.Descriptor instead.

func (*Property) GetName

func (x *Property) GetName() string

func (*Property) GetProbability

func (x *Property) GetProbability() float64

func (*Property) ProtoMessage

func (*Property) ProtoMessage()

func (*Property) ProtoReflect

func (x *Property) ProtoReflect() protoreflect.Message

func (*Property) Reset

func (x *Property) Reset()

func (*Property) SetName

func (m *Property) SetName(v string)

func (*Property) SetProbability

func (m *Property) SetProbability(v float64)

func (*Property) String

func (x *Property) String() string

type TextAnnotation

type TextAnnotation struct {

	// Pages of the recognized file.
	//
	// For JPEG and PNG files contains only 1 page.
	Pages []*Page `protobuf:"bytes,1,rep,name=pages,proto3" json:"pages,omitempty"`
	// contains filtered or unexported fields
}

func (*TextAnnotation) Descriptor deprecated

func (*TextAnnotation) Descriptor() ([]byte, []int)

Deprecated: Use TextAnnotation.ProtoReflect.Descriptor instead.

func (*TextAnnotation) GetPages

func (x *TextAnnotation) GetPages() []*Page

func (*TextAnnotation) ProtoMessage

func (*TextAnnotation) ProtoMessage()

func (*TextAnnotation) ProtoReflect

func (x *TextAnnotation) ProtoReflect() protoreflect.Message

func (*TextAnnotation) Reset

func (x *TextAnnotation) Reset()

func (*TextAnnotation) SetPages

func (m *TextAnnotation) SetPages(v []*Page)

func (*TextAnnotation) String

func (x *TextAnnotation) String() string

type UnimplementedVisionServiceServer

type UnimplementedVisionServiceServer struct {
}

UnimplementedVisionServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedVisionServiceServer) BatchAnalyze

type UnsafeVisionServiceServer

type UnsafeVisionServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeVisionServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to VisionServiceServer will result in compilation errors.

type Vertex

type Vertex struct {

	// X coordinate in pixels.
	X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"`
	// Y coordinate in pixels.
	Y int64 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"`
	// contains filtered or unexported fields
}

func (*Vertex) Descriptor deprecated

func (*Vertex) Descriptor() ([]byte, []int)

Deprecated: Use Vertex.ProtoReflect.Descriptor instead.

func (*Vertex) GetX

func (x *Vertex) GetX() int64

func (*Vertex) GetY

func (x *Vertex) GetY() int64

func (*Vertex) ProtoMessage

func (*Vertex) ProtoMessage()

func (*Vertex) ProtoReflect

func (x *Vertex) ProtoReflect() protoreflect.Message

func (*Vertex) Reset

func (x *Vertex) Reset()

func (*Vertex) SetX

func (m *Vertex) SetX(v int64)

func (*Vertex) SetY

func (m *Vertex) SetY(v int64)

func (*Vertex) String

func (x *Vertex) String() string

type VisionServiceClient

type VisionServiceClient interface {
	// Analyzes a batch of images and returns results with annotations.
	BatchAnalyze(ctx context.Context, in *BatchAnalyzeRequest, opts ...grpc.CallOption) (*BatchAnalyzeResponse, error)
}

VisionServiceClient is the client API for VisionService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type VisionServiceServer

type VisionServiceServer interface {
	// Analyzes a batch of images and returns results with annotations.
	BatchAnalyze(context.Context, *BatchAnalyzeRequest) (*BatchAnalyzeResponse, error)
}

VisionServiceServer is the server API for VisionService service. All implementations should embed UnimplementedVisionServiceServer for forward compatibility

type Word

type Word struct {

	// Area on the page where the word is located.
	BoundingBox *Polygon `protobuf:"bytes,1,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"`
	// Recognized word value.
	Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// Confidence of the OCR results for the word. Range [0, 1].
	Confidence float64 `protobuf:"fixed64,3,opt,name=confidence,proto3" json:"confidence,omitempty"`
	// A list of detected languages together with confidence.
	Languages []*Word_DetectedLanguage `protobuf:"bytes,4,rep,name=languages,proto3" json:"languages,omitempty"`
	// Id of recognized word in entities array
	EntityIndex int64 `protobuf:"varint,5,opt,name=entity_index,json=entityIndex,proto3" json:"entity_index,omitempty"`
	// contains filtered or unexported fields
}

func (*Word) Descriptor deprecated

func (*Word) Descriptor() ([]byte, []int)

Deprecated: Use Word.ProtoReflect.Descriptor instead.

func (*Word) GetBoundingBox

func (x *Word) GetBoundingBox() *Polygon

func (*Word) GetConfidence

func (x *Word) GetConfidence() float64

func (*Word) GetEntityIndex

func (x *Word) GetEntityIndex() int64

func (*Word) GetLanguages

func (x *Word) GetLanguages() []*Word_DetectedLanguage

func (*Word) GetText

func (x *Word) GetText() string

func (*Word) ProtoMessage

func (*Word) ProtoMessage()

func (*Word) ProtoReflect

func (x *Word) ProtoReflect() protoreflect.Message

func (*Word) Reset

func (x *Word) Reset()

func (*Word) SetBoundingBox

func (m *Word) SetBoundingBox(v *Polygon)

func (*Word) SetConfidence

func (m *Word) SetConfidence(v float64)

func (*Word) SetEntityIndex

func (m *Word) SetEntityIndex(v int64)

func (*Word) SetLanguages

func (m *Word) SetLanguages(v []*Word_DetectedLanguage)

func (*Word) SetText

func (m *Word) SetText(v string)

func (*Word) String

func (x *Word) String() string

type Word_DetectedLanguage

type Word_DetectedLanguage struct {

	// Detected language code.
	LanguageCode string `protobuf:"bytes,1,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
	// Confidence of detected language. Range [0, 1].
	Confidence float64 `protobuf:"fixed64,2,opt,name=confidence,proto3" json:"confidence,omitempty"`
	// contains filtered or unexported fields
}

func (*Word_DetectedLanguage) Descriptor deprecated

func (*Word_DetectedLanguage) Descriptor() ([]byte, []int)

Deprecated: Use Word_DetectedLanguage.ProtoReflect.Descriptor instead.

func (*Word_DetectedLanguage) GetConfidence

func (x *Word_DetectedLanguage) GetConfidence() float64

func (*Word_DetectedLanguage) GetLanguageCode

func (x *Word_DetectedLanguage) GetLanguageCode() string

func (*Word_DetectedLanguage) ProtoMessage

func (*Word_DetectedLanguage) ProtoMessage()

func (*Word_DetectedLanguage) ProtoReflect

func (x *Word_DetectedLanguage) ProtoReflect() protoreflect.Message

func (*Word_DetectedLanguage) Reset

func (x *Word_DetectedLanguage) Reset()

func (*Word_DetectedLanguage) SetConfidence

func (m *Word_DetectedLanguage) SetConfidence(v float64)

func (*Word_DetectedLanguage) SetLanguageCode

func (m *Word_DetectedLanguage) SetLanguageCode(v string)

func (*Word_DetectedLanguage) String

func (x *Word_DetectedLanguage) String() string

Jump to

Keyboard shortcuts

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