sdkprotos

package
v0.10.11 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AIService_ClassifyImage_FullMethodName  = "/ai.AIService/ClassifyImage"
	AIService_RecognizeFaces_FullMethodName = "/ai.AIService/RecognizeFaces"
	AIService_TextClip_FullMethodName       = "/ai.AIService/TextClip"
	AIService_ImageClip_FullMethodName      = "/ai.AIService/ImageClip"
)

Variables

View Source
var AIService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ai.AIService",
	HandlerType: (*AIServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ClassifyImage",
			Handler:    _AIService_ClassifyImage_Handler,
		},
		{
			MethodName: "RecognizeFaces",
			Handler:    _AIService_RecognizeFaces_Handler,
		},
		{
			MethodName: "TextClip",
			Handler:    _AIService_TextClip_Handler,
		},
		{
			MethodName: "ImageClip",
			Handler:    _AIService_ImageClip_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ai_service.proto",
}

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

View Source
var File_ai_service_proto protoreflect.FileDescriptor

Functions

func RegisterAIServiceServer

func RegisterAIServiceServer(s grpc.ServiceRegistrar, srv AIServiceServer)

Types

type AIServiceClient

type AIServiceClient interface {
	// 根据图片路径获取图片分类
	ClassifyImage(ctx context.Context, in *ClassificationRequest, opts ...grpc.CallOption) (*ClassificationResponse, error)
	// 根据图片路径获取人脸信息
	RecognizeFaces(ctx context.Context, in *FaceRecognitionRequest, opts ...grpc.CallOption) (*FaceRecognitionResponse, error)
	// 获取文字的特征向量
	TextClip(ctx context.Context, in *TextClipRequest, opts ...grpc.CallOption) (*VectorResponse, error)
	// 获取图片的特征向量
	ImageClip(ctx context.Context, in *ImageClipRequest, opts ...grpc.CallOption) (*VectorResponse, error)
}

AIServiceClient is the client API for AIService 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.

func NewAIServiceClient

func NewAIServiceClient(cc grpc.ClientConnInterface) AIServiceClient

type AIServiceServer

type AIServiceServer interface {
	// 根据图片路径获取图片分类
	ClassifyImage(context.Context, *ClassificationRequest) (*ClassificationResponse, error)
	// 根据图片路径获取人脸信息
	RecognizeFaces(context.Context, *FaceRecognitionRequest) (*FaceRecognitionResponse, error)
	// 获取文字的特征向量
	TextClip(context.Context, *TextClipRequest) (*VectorResponse, error)
	// 获取图片的特征向量
	ImageClip(context.Context, *ImageClipRequest) (*VectorResponse, error)
	// contains filtered or unexported methods
}

AIServiceServer is the server API for AIService service. All implementations must embed UnimplementedAIServiceServer for forward compatibility

type ClassificationRequest

type ClassificationRequest struct {
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // 图片路径
	// contains filtered or unexported fields
}

消息类型定义

func (*ClassificationRequest) Descriptor deprecated

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

Deprecated: Use ClassificationRequest.ProtoReflect.Descriptor instead.

func (*ClassificationRequest) GetPath

func (x *ClassificationRequest) GetPath() string

func (*ClassificationRequest) ProtoMessage

func (*ClassificationRequest) ProtoMessage()

func (*ClassificationRequest) ProtoReflect

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

func (*ClassificationRequest) Reset

func (x *ClassificationRequest) Reset()

func (*ClassificationRequest) String

func (x *ClassificationRequest) String() string

type ClassificationResponse

type ClassificationResponse struct {
	ClassId   int32   `protobuf:"varint,1,opt,name=classId,proto3" json:"classId,omitempty"`    // 类别ID
	ClassName string  `protobuf:"bytes,2,opt,name=className,proto3" json:"className,omitempty"` // 类别名称
	Prop      float32 `protobuf:"fixed32,3,opt,name=prop,proto3" json:"prop,omitempty"`         // 可能性
	// contains filtered or unexported fields
}

func (*ClassificationResponse) Descriptor deprecated

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

Deprecated: Use ClassificationResponse.ProtoReflect.Descriptor instead.

func (*ClassificationResponse) GetClassId

func (x *ClassificationResponse) GetClassId() int32

func (*ClassificationResponse) GetClassName

func (x *ClassificationResponse) GetClassName() string

func (*ClassificationResponse) GetProp

func (x *ClassificationResponse) GetProp() float32

func (*ClassificationResponse) ProtoMessage

func (*ClassificationResponse) ProtoMessage()

func (*ClassificationResponse) ProtoReflect

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

func (*ClassificationResponse) Reset

func (x *ClassificationResponse) Reset()

func (*ClassificationResponse) String

func (x *ClassificationResponse) String() string

type FaceRecognitionRequest

type FaceRecognitionRequest struct {
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // 图片路径
	// contains filtered or unexported fields
}

func (*FaceRecognitionRequest) Descriptor deprecated

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

Deprecated: Use FaceRecognitionRequest.ProtoReflect.Descriptor instead.

func (*FaceRecognitionRequest) GetPath

func (x *FaceRecognitionRequest) GetPath() string

func (*FaceRecognitionRequest) ProtoMessage

func (*FaceRecognitionRequest) ProtoMessage()

func (*FaceRecognitionRequest) ProtoReflect

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

func (*FaceRecognitionRequest) Reset

func (x *FaceRecognitionRequest) Reset()

func (*FaceRecognitionRequest) String

func (x *FaceRecognitionRequest) String() string

type FaceRecognitionResponse

type FaceRecognitionResponse struct {
	Faces []*FaceRecognitionResponse_Face `protobuf:"bytes,1,rep,name=faces,proto3" json:"faces,omitempty"` // 可能检测到多个人脸
	// contains filtered or unexported fields
}

func (*FaceRecognitionResponse) Descriptor deprecated

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

Deprecated: Use FaceRecognitionResponse.ProtoReflect.Descriptor instead.

func (*FaceRecognitionResponse) GetFaces

func (*FaceRecognitionResponse) ProtoMessage

func (*FaceRecognitionResponse) ProtoMessage()

func (*FaceRecognitionResponse) ProtoReflect

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

func (*FaceRecognitionResponse) Reset

func (x *FaceRecognitionResponse) Reset()

func (*FaceRecognitionResponse) String

func (x *FaceRecognitionResponse) String() string

type FaceRecognitionResponse_Face

type FaceRecognitionResponse_Face struct {
	Left    int32     `protobuf:"varint,1,opt,name=left,proto3" json:"left,omitempty"`
	Top     int32     `protobuf:"varint,2,opt,name=top,proto3" json:"top,omitempty"`
	Right   int32     `protobuf:"varint,3,opt,name=right,proto3" json:"right,omitempty"`
	Bottom  int32     `protobuf:"varint,4,opt,name=bottom,proto3" json:"bottom,omitempty"`
	Feature []float32 `protobuf:"fixed32,5,rep,packed,name=feature,proto3" json:"feature,omitempty"` // 人脸特征向量
	// contains filtered or unexported fields
}

func (*FaceRecognitionResponse_Face) Descriptor deprecated

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

Deprecated: Use FaceRecognitionResponse_Face.ProtoReflect.Descriptor instead.

func (*FaceRecognitionResponse_Face) GetBottom

func (x *FaceRecognitionResponse_Face) GetBottom() int32

func (*FaceRecognitionResponse_Face) GetFeature

func (x *FaceRecognitionResponse_Face) GetFeature() []float32

func (*FaceRecognitionResponse_Face) GetLeft

func (x *FaceRecognitionResponse_Face) GetLeft() int32

func (*FaceRecognitionResponse_Face) GetRight

func (x *FaceRecognitionResponse_Face) GetRight() int32

func (*FaceRecognitionResponse_Face) GetTop

func (x *FaceRecognitionResponse_Face) GetTop() int32

func (*FaceRecognitionResponse_Face) ProtoMessage

func (*FaceRecognitionResponse_Face) ProtoMessage()

func (*FaceRecognitionResponse_Face) ProtoReflect

func (*FaceRecognitionResponse_Face) Reset

func (x *FaceRecognitionResponse_Face) Reset()

func (*FaceRecognitionResponse_Face) String

type ImageClipRequest

type ImageClipRequest struct {
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // 图片路径
	// contains filtered or unexported fields
}

func (*ImageClipRequest) Descriptor deprecated

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

Deprecated: Use ImageClipRequest.ProtoReflect.Descriptor instead.

func (*ImageClipRequest) GetPath

func (x *ImageClipRequest) GetPath() string

func (*ImageClipRequest) ProtoMessage

func (*ImageClipRequest) ProtoMessage()

func (*ImageClipRequest) ProtoReflect

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

func (*ImageClipRequest) Reset

func (x *ImageClipRequest) Reset()

func (*ImageClipRequest) String

func (x *ImageClipRequest) String() string

type TextClipRequest

type TextClipRequest struct {
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // 文本内容
	// contains filtered or unexported fields
}

func (*TextClipRequest) Descriptor deprecated

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

Deprecated: Use TextClipRequest.ProtoReflect.Descriptor instead.

func (*TextClipRequest) GetText

func (x *TextClipRequest) GetText() string

func (*TextClipRequest) ProtoMessage

func (*TextClipRequest) ProtoMessage()

func (*TextClipRequest) ProtoReflect

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

func (*TextClipRequest) Reset

func (x *TextClipRequest) Reset()

func (*TextClipRequest) String

func (x *TextClipRequest) String() string

type UnimplementedAIServiceServer

type UnimplementedAIServiceServer struct {
}

UnimplementedAIServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAIServiceServer) ClassifyImage

func (UnimplementedAIServiceServer) ImageClip

func (UnimplementedAIServiceServer) RecognizeFaces

func (UnimplementedAIServiceServer) TextClip

type UnsafeAIServiceServer

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

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

type VectorResponse

type VectorResponse struct {
	Feature []float32 `protobuf:"fixed32,1,rep,packed,name=feature,proto3" json:"feature,omitempty"` // 特征向量
	// contains filtered or unexported fields
}

func (*VectorResponse) Descriptor deprecated

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

Deprecated: Use VectorResponse.ProtoReflect.Descriptor instead.

func (*VectorResponse) GetFeature

func (x *VectorResponse) GetFeature() []float32

func (*VectorResponse) ProtoMessage

func (*VectorResponse) ProtoMessage()

func (*VectorResponse) ProtoReflect

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

func (*VectorResponse) Reset

func (x *VectorResponse) Reset()

func (*VectorResponse) String

func (x *VectorResponse) String() string

Jump to

Keyboard shortcuts

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