Documentation ¶
Index ¶
- func FixRectForOpenCV(r *image.Rectangle, cols, rows int)
- func RegisterSTYoloServer(s *grpc.Server, srv STYoloServer)
- func Round(v float64) int
- type AppSettings
- type BBoxSettings
- type CamInfo
- func (*CamInfo) Descriptor() ([]byte, []int)
- func (m *CamInfo) GetCamId() string
- func (m *CamInfo) GetDetection() *Detection
- func (m *CamInfo) GetImage() []byte
- func (m *CamInfo) GetTimestamp() int64
- func (m *CamInfo) GetVirtualLine() *VirtualLineInfo
- func (*CamInfo) ProtoMessage()
- func (m *CamInfo) Reset()
- func (m *CamInfo) String() string
- func (m *CamInfo) XXX_DiscardUnknown()
- func (m *CamInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CamInfo) XXX_Merge(src proto.Message)
- func (m *CamInfo) XXX_Size() int
- func (m *CamInfo) XXX_Unmarshal(b []byte) error
- type CentroidSettings
- type CudaSettings
- type DetectedObject
- type DetectedObjects
- type Detection
- func (*Detection) Descriptor() ([]byte, []int)
- func (m *Detection) GetHeight() int32
- func (m *Detection) GetWidth() int32
- func (m *Detection) GetXLeft() int32
- func (m *Detection) GetYTop() int32
- func (*Detection) ProtoMessage()
- func (m *Detection) Reset()
- func (m *Detection) String() string
- func (m *Detection) XXX_DiscardUnknown()
- func (m *Detection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Detection) XXX_Merge(src proto.Message)
- func (m *Detection) XXX_Size() int
- func (m *Detection) XXX_Unmarshal(b []byte) error
- type DrawTrackSettings
- type FrameData
- type GrpcSettings
- type LinesSetting
- type MatPPROFSettings
- type MjpegSettings
- type NeuralNetworkSettings
- type Response
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) GetError() string
- func (m *Response) GetMessage() string
- func (m *Response) GetWarning() string
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) String() string
- func (m *Response) XXX_DiscardUnknown()
- func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Response) XXX_Merge(src proto.Message)
- func (m *Response) XXX_Size() int
- func (m *Response) XXX_Unmarshal(b []byte) error
- type STYoloClient
- type STYoloServer
- type TextSettings
- type TrackerSettings
- type UnimplementedSTYoloServer
- type VideoSettings
- type VirtualLine
- type VirtualLineInfo
- func (*VirtualLineInfo) Descriptor() ([]byte, []int)
- func (m *VirtualLineInfo) GetId() int64
- func (m *VirtualLineInfo) GetLeftX() int32
- func (m *VirtualLineInfo) GetLeftY() int32
- func (m *VirtualLineInfo) GetRightX() int32
- func (m *VirtualLineInfo) GetRightY() int32
- func (*VirtualLineInfo) ProtoMessage()
- func (m *VirtualLineInfo) Reset()
- func (m *VirtualLineInfo) String() string
- func (m *VirtualLineInfo) XXX_DiscardUnknown()
- func (m *VirtualLineInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VirtualLineInfo) XXX_Merge(src proto.Message)
- func (m *VirtualLineInfo) XXX_Size() int
- func (m *VirtualLineInfo) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FixRectForOpenCV ¶
func RegisterSTYoloServer ¶
func RegisterSTYoloServer(s *grpc.Server, srv STYoloServer)
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 CamInfo ¶
type CamInfo 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"` Detection *Detection `protobuf:"bytes,4,opt,name=detection,proto3" json:"detection,omitempty"` VirtualLine *VirtualLineInfo `protobuf:"bytes,5,opt,name=virtual_line,json=virtualLine,proto3" json:"virtual_line,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CamInfo) Descriptor ¶
func (*CamInfo) GetDetection ¶
func (*CamInfo) GetTimestamp ¶
func (*CamInfo) GetVirtualLine ¶ added in v0.2.0
func (m *CamInfo) GetVirtualLine() *VirtualLineInfo
func (*CamInfo) ProtoMessage ¶
func (*CamInfo) ProtoMessage()
func (*CamInfo) XXX_DiscardUnknown ¶
func (m *CamInfo) XXX_DiscardUnknown()
func (*CamInfo) XXX_Marshal ¶
func (*CamInfo) XXX_Unmarshal ¶
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 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Detection) Descriptor ¶
func (*Detection) ProtoMessage ¶
func (*Detection) ProtoMessage()
func (*Detection) XXX_DiscardUnknown ¶
func (m *Detection) XXX_DiscardUnknown()
func (*Detection) XXX_Marshal ¶
func (*Detection) XXX_Unmarshal ¶
type DrawTrackSettings ¶
type DrawTrackSettings struct { // 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"` }
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"` // 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 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Response) Descriptor ¶
func (*Response) GetMessage ¶
func (*Response) GetWarning ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) XXX_DiscardUnknown ¶
func (m *Response) XXX_DiscardUnknown()
func (*Response) XXX_Marshal ¶
func (*Response) XXX_Unmarshal ¶
type STYoloClient ¶
type STYoloClient interface {
SendDetection(ctx context.Context, in *CamInfo, opts ...grpc.CallOption) (*Response, error)
}
STYoloClient is the client API for STYolo service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSTYoloClient ¶
func NewSTYoloClient(cc grpc.ClientConnInterface) STYoloClient
type STYoloServer ¶
STYoloServer is the server API for STYolo 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 UnimplementedSTYoloServer ¶
type UnimplementedSTYoloServer struct { }
UnimplementedSTYoloServer can be embedded to have forward compatible implementations.
func (*UnimplementedSTYoloServer) SendDetection ¶
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 RightPT image.Point Color color.RGBA Direction bool SourceLeftPT image.Point SourceRightPT image.Point }
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*VirtualLineInfo) Descriptor ¶ added in v0.2.0
func (*VirtualLineInfo) Descriptor() ([]byte, []int)
func (*VirtualLineInfo) GetId ¶ added in v0.2.0
func (m *VirtualLineInfo) GetId() int64
func (*VirtualLineInfo) GetLeftX ¶ added in v0.2.0
func (m *VirtualLineInfo) GetLeftX() int32
func (*VirtualLineInfo) GetLeftY ¶ added in v0.2.0
func (m *VirtualLineInfo) GetLeftY() int32
func (*VirtualLineInfo) GetRightX ¶ added in v0.2.0
func (m *VirtualLineInfo) GetRightX() int32
func (*VirtualLineInfo) GetRightY ¶ added in v0.2.0
func (m *VirtualLineInfo) GetRightY() int32
func (*VirtualLineInfo) ProtoMessage ¶ added in v0.2.0
func (*VirtualLineInfo) ProtoMessage()
func (*VirtualLineInfo) Reset ¶ added in v0.2.0
func (m *VirtualLineInfo) Reset()
func (*VirtualLineInfo) String ¶ added in v0.2.0
func (m *VirtualLineInfo) String() string
func (*VirtualLineInfo) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *VirtualLineInfo) XXX_DiscardUnknown()
func (*VirtualLineInfo) XXX_Marshal ¶ added in v0.2.0
func (m *VirtualLineInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VirtualLineInfo) XXX_Merge ¶ added in v0.2.0
func (m *VirtualLineInfo) XXX_Merge(src proto.Message)
func (*VirtualLineInfo) XXX_Size ¶ added in v0.2.0
func (m *VirtualLineInfo) XXX_Size() int
func (*VirtualLineInfo) XXX_Unmarshal ¶ added in v0.2.0
func (m *VirtualLineInfo) XXX_Unmarshal(b []byte) error