Documentation ¶
Index ¶
- Variables
- func FixRectForOpenCV(r *image.Rectangle, cols, rows int)
- func RegisterServiceYOLOServer(s *grpc.Server, srv ServiceYOLOServer)
- func Round(v float64) int
- type AppSettings
- type BBoxSettings
- type CentroidSettings
- type ClassInfo
- type CudaSettings
- type DetectedObject
- type DetectedObjects
- type Detection
- func (*Detection) Descriptor() ([]byte, []int)deprecated
- func (x *Detection) GetHeight() int32
- func (x *Detection) GetWidth() int32
- func (x *Detection) GetXLeft() int32
- func (x *Detection) GetYTop() int32
- func (*Detection) ProtoMessage()
- func (x *Detection) ProtoReflect() protoreflect.Message
- func (x *Detection) Reset()
- func (x *Detection) String() string
- type DrawTrackSettings
- type FrameData
- type GrpcSettings
- type LinesSetting
- type MatPPROFSettings
- type MjpegSettings
- type NeuralNetworkSettings
- type ObjectInformation
- func (*ObjectInformation) Descriptor() ([]byte, []int)deprecated
- func (x *ObjectInformation) GetCamId() string
- func (x *ObjectInformation) GetClass() *ClassInfo
- func (x *ObjectInformation) GetDetection() *Detection
- func (x *ObjectInformation) GetImage() []byte
- func (x *ObjectInformation) GetTimestamp() int64
- func (x *ObjectInformation) GetVirtualLine() *VirtualLineInfo
- func (*ObjectInformation) ProtoMessage()
- func (x *ObjectInformation) ProtoReflect() protoreflect.Message
- func (x *ObjectInformation) Reset()
- func (x *ObjectInformation) String() string
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetError() string
- func (x *Response) GetMessage() string
- func (x *Response) GetWarning() string
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type ServiceYOLOClient
- type ServiceYOLOServer
- type TextSettings
- type TrackerSettings
- type UnimplementedServiceYOLOServer
- type VideoSettings
- type VirtualLine
- type VirtualLineInfo
- func (*VirtualLineInfo) Descriptor() ([]byte, []int)deprecated
- func (x *VirtualLineInfo) GetId() int64
- func (x *VirtualLineInfo) GetLeftX() int32
- func (x *VirtualLineInfo) GetLeftY() int32
- func (x *VirtualLineInfo) GetRightX() int32
- func (x *VirtualLineInfo) GetRightY() int32
- func (*VirtualLineInfo) ProtoMessage()
- func (x *VirtualLineInfo) ProtoReflect() protoreflect.Message
- func (x *VirtualLineInfo) Reset()
- func (x *VirtualLineInfo) String() string
Constants ¶
This section is empty.
Variables ¶
var File_yolo_grpc_proto protoreflect.FileDescriptor
Functions ¶
func FixRectForOpenCV ¶
func RegisterServiceYOLOServer ¶ added in v0.4.1
func RegisterServiceYOLOServer(s *grpc.Server, srv ServiceYOLOServer)
Types ¶
type AppSettings ¶
type AppSettings struct { VideoSettings VideoSettings `json:"video_settings"` NeuralNetworkSettings NeuralNetworkSettings `json:"neural_network_settings"` CudaSettings CudaSettings `json:"cuda_settings"` MjpegSettings MjpegSettings `json:"mjpeg_settings"` GrpcSettings GrpcSettings `json:"grpc_settings"` TrackerSettings TrackerSettings `json:"tracker_settings"` MatPPROFSettings MatPPROFSettings `json:"matpprof_settings"` }
AppSettings Settings for application
func NewSettings ¶
func NewSettings(fname string) (*AppSettings, error)
NewSettings Create new AppSettings from content of configuration file
type BBoxSettings ¶
BBoxSettings Options for detection rectangle
type CentroidSettings ¶
type CentroidSettings struct { RGBA [4]uint8 `json:"rgba"` Radius int `json:"radius"` Thickness int `json:"thickness"` }
CentroidSettings Options for center of detection rectangle
type ClassInfo ¶ added in v0.4.1
type ClassInfo struct { ClassId int32 `protobuf:"varint,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` ClassName string `protobuf:"bytes,2,opt,name=class_name,json=className,proto3" json:"class_name,omitempty"` // contains filtered or unexported fields }
func (*ClassInfo) Descriptor
deprecated
added in
v0.4.1
func (*ClassInfo) GetClassId ¶ added in v0.4.1
func (*ClassInfo) GetClassName ¶ added in v0.4.1
func (*ClassInfo) ProtoMessage ¶ added in v0.4.1
func (*ClassInfo) ProtoMessage()
func (*ClassInfo) ProtoReflect ¶ added in v0.4.1
func (x *ClassInfo) ProtoReflect() protoreflect.Message
type CudaSettings ¶
type CudaSettings struct {
Enable bool `json:"enable"`
}
CudaSettings CUDA settings
type DetectedObject ¶
DetectedObject Store detected object info
type DetectedObjects ¶
type DetectedObjects []*DetectedObject
DetectedObjects Just alias to slice of DetectedObject
type Detection ¶
type Detection struct { XLeft int32 `protobuf:"varint,1,opt,name=x_left,json=xLeft,proto3" json:"x_left,omitempty"` YTop int32 `protobuf:"varint,2,opt,name=y_top,json=yTop,proto3" json:"y_top,omitempty"` Height int32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` Width int32 `protobuf:"varint,4,opt,name=width,proto3" json:"width,omitempty"` // contains filtered or unexported fields }
func (*Detection) Descriptor
deprecated
func (*Detection) ProtoMessage ¶
func (*Detection) ProtoMessage()
func (*Detection) ProtoReflect ¶ added in v0.4.1
func (x *Detection) ProtoReflect() protoreflect.Message
type DrawTrackSettings ¶
type DrawTrackSettings struct { // Restriction for maximum points in single track MaxPointsInTrack int `json:"max_points_in_track"` // Drawing options for detection rectangle BBoxSettings BBoxSettings `json:"bbox_settings"` // Drawing options for center of detection rectangle CentroidSettings CentroidSettings `json:"centroid_settings"` // Drawing options for text in top left corner of detection rectangle TextSettings TextSettings `json:"text_settings"` // Do you want to display ID of object (uuid) DisplayObjectID bool `json:"display_object_id"` }
DrawTrackSettings Drawing settings for MJPEG/imshow
type FrameData ¶
type FrameData struct { ImgSource gocv.Mat // Source image ImgScaled gocv.Mat // Scaled image ImgSTD image.Image }
FrameData Wrapper around gocv.Mat
func (*FrameData) Close ¶
func (fd *FrameData) Close()
Close Simplify memory management for each gocv.Mat of FrameData
func (*FrameData) Preprocess ¶
type GrpcSettings ¶
type GrpcSettings struct { Enable bool `json:"enable"` ServerIP string `json:"server_ip"` ServerPort int `json:"server_port"` }
GrpcSettings gRPC-server address
type LinesSetting ¶
type LinesSetting struct { LineID int64 `json:"line_id"` Begin [2]int `json:"begin"` End [2]int `json:"end"` Direction string `json:"direction"` DetectClasses []string `json:"detect_classes"` RGBA [4]uint8 `json:"rgba"` CropMode string `json:"crop_mode"` // Exported, but not from JSON VLine *VirtualLine `json:"-"` }
LinesSetting Virtual lines
type MatPPROFSettings ¶
type MatPPROFSettings struct {
Enable bool `json:"enable"`
}
MatPPROFSettings pprof settings of gocv.Mat
type MjpegSettings ¶
type MjpegSettings struct { ImshowEnable bool `json:"imshow_enable"` Enable bool `json:"enable"` Port int `json:"port"` }
MjpegSettings settings for output
type NeuralNetworkSettings ¶
type NeuralNetworkSettings struct { DarknetCFG string `json:"darknet_cfg"` DarknetWeights string `json:"darknet_weights"` // DarknetClasses string `json:"darknet_classes"` ConfThreshold float64 `json:"conf_threshold"` NmsThreshold float64 `json:"nms_threshold"` TargetClasses []string `json:"target_classes"` }
NeuralNetworkSettings Neural network
type ObjectInformation ¶ added in v0.4.1
type ObjectInformation struct { CamId string `protobuf:"bytes,1,opt,name=cam_id,json=camId,proto3" json:"cam_id,omitempty"` Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Image []byte `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` // bytes of full image in PNG - format Detection *Detection `protobuf:"bytes,4,opt,name=detection,proto3" json:"detection,omitempty"` Class *ClassInfo `protobuf:"bytes,5,opt,name=class,proto3" json:"class,omitempty"` VirtualLine *VirtualLineInfo `protobuf:"bytes,6,opt,name=virtual_line,json=virtualLine,proto3" json:"virtual_line,omitempty"` // contains filtered or unexported fields }
func (*ObjectInformation) Descriptor
deprecated
added in
v0.4.1
func (*ObjectInformation) Descriptor() ([]byte, []int)
Deprecated: Use ObjectInformation.ProtoReflect.Descriptor instead.
func (*ObjectInformation) GetCamId ¶ added in v0.4.1
func (x *ObjectInformation) GetCamId() string
func (*ObjectInformation) GetClass ¶ added in v0.4.1
func (x *ObjectInformation) GetClass() *ClassInfo
func (*ObjectInformation) GetDetection ¶ added in v0.4.1
func (x *ObjectInformation) GetDetection() *Detection
func (*ObjectInformation) GetImage ¶ added in v0.4.1
func (x *ObjectInformation) GetImage() []byte
func (*ObjectInformation) GetTimestamp ¶ added in v0.4.1
func (x *ObjectInformation) GetTimestamp() int64
func (*ObjectInformation) GetVirtualLine ¶ added in v0.4.1
func (x *ObjectInformation) GetVirtualLine() *VirtualLineInfo
func (*ObjectInformation) ProtoMessage ¶ added in v0.4.1
func (*ObjectInformation) ProtoMessage()
func (*ObjectInformation) ProtoReflect ¶ added in v0.4.1
func (x *ObjectInformation) ProtoReflect() protoreflect.Message
func (*ObjectInformation) Reset ¶ added in v0.4.1
func (x *ObjectInformation) Reset()
func (*ObjectInformation) String ¶ added in v0.4.1
func (x *ObjectInformation) String() string
type Response ¶
type Response struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Warning string `protobuf:"bytes,2,opt,name=warning,proto3" json:"warning,omitempty"` Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) GetMessage ¶
func (*Response) GetWarning ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶ added in v0.4.1
func (x *Response) ProtoReflect() protoreflect.Message
type ServiceYOLOClient ¶ added in v0.4.1
type ServiceYOLOClient interface {
SendDetection(ctx context.Context, in *ObjectInformation, opts ...grpc.CallOption) (*Response, error)
}
ServiceYOLOClient is the client API for ServiceYOLO service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewServiceYOLOClient ¶ added in v0.4.1
func NewServiceYOLOClient(cc grpc.ClientConnInterface) ServiceYOLOClient
type ServiceYOLOServer ¶ added in v0.4.1
type ServiceYOLOServer interface {
SendDetection(context.Context, *ObjectInformation) (*Response, error)
}
ServiceYOLOServer is the server API for ServiceYOLO service.
type TextSettings ¶
type TextSettings struct { RGBA [4]uint8 `json:"rgba"` Scale float64 `json:"scale"` Thickness int `json:"thickness"` Font string `json:"font"` // Possible values are: hershey_simplex, hershey_plain, hershey_duplex, hershey_complex, hershey_triplex, hershey_complex_small, hershey_script_simplex, hershey_script_cddomplex, italic }
TextSettings Options for text in top left corner of detection rectangle
type TrackerSettings ¶
type TrackerSettings struct { LinesSettings []LinesSetting `json:"lines_settings"` DrawTrackSettings DrawTrackSettings `json:"draw_track_settings"` // Exported, but not from JSON DrawOptions *blob.DrawOptions `json:"-"` }
TrackerSettings Object tracker settings
type UnimplementedServiceYOLOServer ¶ added in v0.4.1
type UnimplementedServiceYOLOServer struct { }
UnimplementedServiceYOLOServer can be embedded to have forward compatible implementations.
func (*UnimplementedServiceYOLOServer) SendDetection ¶ added in v0.4.1
func (*UnimplementedServiceYOLOServer) SendDetection(context.Context, *ObjectInformation) (*Response, error)
type VideoSettings ¶
type VideoSettings struct { Source string `json:"source"` Width int `json:"width"` Height int `json:"height"` ReducedWidth int `json:"reduced_width"` ReducedHeight int `json:"reduced_height"` CameraID string `json:"camera_id"` // Exported, but not from JSON ScaleX float64 `json:"-"` ScaleY float64 `json:"-"` }
VideoSettings Settings for video
type VirtualLine ¶
type VirtualLine struct { LeftPT image.Point `json:"-"` RightPT image.Point `json:"-"` Color color.RGBA `json:"-"` Direction bool `json:"-"` CropObject bool `json:"-"` SourceLeftPT image.Point `json:"-"` SourceRightPT image.Point `json:"-"` }
VirtualLine Detection line attributes
func (*VirtualLine) Draw ¶
func (vline *VirtualLine) Draw(img *gocv.Mat)
Draw Draw virtual line on image
type VirtualLineInfo ¶ added in v0.2.0
type VirtualLineInfo struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` LeftX int32 `protobuf:"varint,2,opt,name=left_x,json=leftX,proto3" json:"left_x,omitempty"` LeftY int32 `protobuf:"varint,3,opt,name=left_y,json=leftY,proto3" json:"left_y,omitempty"` RightX int32 `protobuf:"varint,4,opt,name=right_x,json=rightX,proto3" json:"right_x,omitempty"` RightY int32 `protobuf:"varint,5,opt,name=right_y,json=rightY,proto3" json:"right_y,omitempty"` // contains filtered or unexported fields }
func (*VirtualLineInfo) Descriptor
deprecated
added in
v0.2.0
func (*VirtualLineInfo) Descriptor() ([]byte, []int)
Deprecated: Use VirtualLineInfo.ProtoReflect.Descriptor instead.
func (*VirtualLineInfo) GetId ¶ added in v0.2.0
func (x *VirtualLineInfo) GetId() int64
func (*VirtualLineInfo) GetLeftX ¶ added in v0.2.0
func (x *VirtualLineInfo) GetLeftX() int32
func (*VirtualLineInfo) GetLeftY ¶ added in v0.2.0
func (x *VirtualLineInfo) GetLeftY() int32
func (*VirtualLineInfo) GetRightX ¶ added in v0.2.0
func (x *VirtualLineInfo) GetRightX() int32
func (*VirtualLineInfo) GetRightY ¶ added in v0.2.0
func (x *VirtualLineInfo) GetRightY() int32
func (*VirtualLineInfo) ProtoMessage ¶ added in v0.2.0
func (*VirtualLineInfo) ProtoMessage()
func (*VirtualLineInfo) ProtoReflect ¶ added in v0.4.1
func (x *VirtualLineInfo) ProtoReflect() protoreflect.Message
func (*VirtualLineInfo) Reset ¶ added in v0.2.0
func (x *VirtualLineInfo) Reset()
func (*VirtualLineInfo) String ¶ added in v0.2.0
func (x *VirtualLineInfo) String() string