Documentation ¶
Index ¶
- Constants
- func DetectionsToObjects(dets []DetectResult) []tracker.Object
- func NewIDGenerator() *idGenerator
- type BoxRect
- type BoxRectMode
- type DetectResult
- type DetectionResult
- type KeyPoint
- type LPRNet
- type LPRNetParams
- type PPOCRBox
- type PPOCRDetect
- type PPOCRDetectParams
- type PPOCRDetectResult
- type PPOCRPoint
- type PPOCRRecognise
- type PPOCRRecogniseParams
- type PPOCRRecogniseResult
- type RetinaFace
- type RetinaFaceParams
- type RetinaFaceResult
- type SegMask
- type SegmentData
- type YOLOStride
- type YOLOX
- type YOLOXParams
- type YOLOXResult
- type YOLOv10
- type YOLOv10Params
- type YOLOv10Result
- type YOLOv5
- type YOLOv5Params
- type YOLOv5Result
- type YOLOv5Seg
- func (y *YOLOv5Seg) DetectObjects(outputs *rknnlite.Outputs, resizer *preprocess.Resizer) DetectionResult
- func (y *YOLOv5Seg) SegmentMask(detectObjs DetectionResult, resizer *preprocess.Resizer) SegMask
- func (y *YOLOv5Seg) TrackMask(detectObjs DetectionResult, trackObjs []*tracker.STrack, ...) SegMask
- type YOLOv5SegParams
- type YOLOv5SegResult
- type YOLOv8
- type YOLOv8Params
- type YOLOv8Pose
- type YOLOv8PoseParams
- type YOLOv8PoseResult
- type YOLOv8Result
- type YOLOv8Seg
- func (y *YOLOv8Seg) DetectObjects(outputs *rknnlite.Outputs, resizer *preprocess.Resizer) DetectionResult
- func (y *YOLOv8Seg) SegmentMask(detectObjs DetectionResult, resizer *preprocess.Resizer) SegMask
- func (y *YOLOv8Seg) TrackMask(detectObjs DetectionResult, trackObjs []*tracker.STrack, ...) SegMask
- type YOLOv8SegParams
- type YOLOv8SegResult
- type YOLOv8obb
- type YOLOv8obbParams
- type YOLOv8obbResult
Constants ¶
const ( // MaxContours is the maximum number of contours to process on an image MaxContours = 1000 // ContourMinSize is the minimum number size contour ContourMinSize = 3 )
Variables ¶
This section is empty.
Functions ¶
func DetectionsToObjects ¶
func DetectionsToObjects(dets []DetectResult) []tracker.Object
DetectionsToObjects takes a postprocess object detection results and converts it into a tracker object
func NewIDGenerator ¶
func NewIDGenerator() *idGenerator
Types ¶
type BoxRect ¶
type BoxRect struct { Left int // Left boundary of the bounding box Right int // Right boundary of the bounding box Top int // Top boundary of the bounding box Bottom int // Bottom boundary of the bounding box X int // X coordinate of the bounding box center Y int // Y coordinate of the bounding box center Width int // Width of the bounding box Height int // Height of the bounding box Angle float32 // Rotation angle of the bounding box in radians Mode BoxRectMode // Mode indicates how the BoxRect was set }
BoxRect are the dimensions of the bounding box of a detect object
type BoxRectMode ¶
type BoxRectMode int
BoxRectMode indicates how the BoxRect was set
const ( ModeLTRB BoxRectMode = 0 // (Default) Left, Top, Right, Bottom mode ModeXYWH BoxRectMode = 1 // X, Y, Width, Height, Angle mode )
type DetectResult ¶
type DetectResult struct { // Class is the line number in the labels file the Model was trained on // defining the Class of the detected object Class int // Box are the bounding box dimensions of the object location Box BoxRect // Probability is the confidence score of the object detected Probability float32 // ID is a unique ID assigned to the detection result ID int64 }
DetectResult defines the attributes of a single object detected
type DetectionResult ¶
type DetectionResult interface {
GetDetectResults() []DetectResult
}
type KeyPoint ¶
Keypoint is used for specifying the X, Y coordinates and confidence score of an individual point used in Pose Estimatation
type LPRNet ¶
type LPRNet struct {
Params LPRNetParams
}
LPRNet defines the struct for LPRNet model inference post processing
func NewLPRNet ¶
func NewLPRNet(p LPRNetParams) *LPRNet
NewLPRNet return an instance of the LPRNet post processor
func (*LPRNet) ReadPlates ¶
ReadPlates takes the RKNN outputs and reads out the license plate numbers
type LPRNetParams ¶
type LPRNetParams struct { // PlatePositions is the number of license plate positions to traverse PlatePositions int // PlateChars are the characters on the number plate used to train the model PlateChars []string // contains filtered or unexported fields }
LPRNetParams defines the struct containing the LPRNet parameters to use for post processing operations
type PPOCRBox ¶
type PPOCRBox struct { LeftTop PPOCRPoint RightTop PPOCRPoint RightBottom PPOCRPoint LeftBottom PPOCRPoint Score float32 }
PPOCRBox represents a bounding box with corners and a score
type PPOCRDetect ¶
type PPOCRDetect struct {
Params PPOCRDetectParams
}
PPOCRDetect defines the struct for the PPOCR Detection model inference post processing
func NewPPOCRDetect ¶
func NewPPOCRDetect(param PPOCRDetectParams) *PPOCRDetect
NewPPOCRDetect returns and instance of the PPOCRDetect post processor
func (*PPOCRDetect) Detect ¶
func (p *PPOCRDetect) Detect(outputs *rknnlite.Outputs, scaleW float32, scaleH float32) []PPOCRDetectResult
Detect takes the RKNN oiutputs and converts them to co-ordinates for the bounding boxes of each area of text detected.
func (*PPOCRDetect) GetContourArea ¶
func (p *PPOCRDetect) GetContourArea(box [][]float32, unclipRatio float32) float32
GetContourArea calculates the area of the contour and returns the distance based on the unclip ratio
type PPOCRDetectParams ¶
type PPOCRDetectParams struct { Threshold float32 BoxThreshold float32 Dilation bool BoxType string // poly|quad UnclipRatio float32 ScoreMode string // slow|fast ModelWidth int ModelHeight int }
PPOCRDetectParams defines the struct containing the PPOCRDetect parameters to use for post preocessing operations
type PPOCRDetectResult ¶
type PPOCRDetectResult struct {
Box []PPOCRBox
}
PPOCRDetectResult is the bounding box result for an area of text detected
type PPOCRPoint ¶
type PPOCRPoint struct {
X, Y int
}
PPOCRPoint represents a point with x and y coordinates
type PPOCRRecognise ¶
type PPOCRRecognise struct {
Params PPOCRRecogniseParams
}
PPOCRRecognise defines the struct for the PPOCR model inference post processing
func NewPPOCRRecognise ¶
func NewPPOCRRecognise(param PPOCRRecogniseParams) *PPOCRRecognise
NewPPOCRRecognise returns an instance of the PPOCR post processor
func (*PPOCRRecognise) Recognise ¶
func (p *PPOCRRecognise) Recognise(outputs *rknnlite.Outputs) []PPOCRRecogniseResult
Recognise takes the RKNN outputs and converts them to text
type PPOCRRecogniseParams ¶
type PPOCRRecogniseParams struct { // ModelChars is the list of characters used to train the PPOCR model ModelChars []string // OutputSeqLen is the length of sequence output data from the OCR model OutputSeqLen int // contains filtered or unexported fields }
PPOCRParams defines the struct containing the PPOCR parameters to use for post processing operations
type PPOCRRecogniseResult ¶
type PPOCRRecogniseResult struct { // Text is the recognised text Text string // Score is the confidence score of the text recognised Score float32 }
PPOCRRecogniseResult is a text result recognised by OCR
type RetinaFace ¶
type RetinaFace struct { // Params are the Model configuration parameters Params RetinaFaceParams // contains filtered or unexported fields }
RetinaFace defines the struct for the RetinaFace model inference post processing
func NewRetinaFace ¶
func NewRetinaFace(p RetinaFaceParams) *RetinaFace
NewRetinaFace returns an instance of the RetinaFace post processor
func (*RetinaFace) DetectFaces ¶
func (r *RetinaFace) DetectFaces(outputs *rknnlite.Outputs, resizer *preprocess.Resizer) DetectionResult
DetectFaces takes the RKNN outputs and runs the face detection process then returns the result
func (*RetinaFace) GetFaceLandmarks ¶
func (r *RetinaFace) GetFaceLandmarks(detectObjs DetectionResult) [][]KeyPoint
GetFaceLandmarks returns the landmark keypoints for the detected faces
type RetinaFaceParams ¶
type RetinaFaceParams struct { // ConfThreshold is the minimum probability score required for a bounding box // region to be considered for processing ConfThreshold float32 // NMSThreshold is the Non-Maximum Suppression threshold used for defining // the maximum allowed Intersection Over Union (IoU) between two // bounding boxes for both to be kept NMSThreshold float32 // VisThreshold is the Visualisation threshold VisThreshold float32 // MaxObjectNumber is the maximum number of objects detected that can be // returned MaxObjectNumber int // KeyPointsNumber is the number of face landmark keypoints representing // different features of the face KeyPointsNumber int }
RetinaFaceParams defines the struct containing the RetinaFace parameters to use for post processing operations
func WiderFaceParams ¶
func WiderFaceParams() RetinaFaceParams
WiderFaceParams returns an instance of RetinaFaceParams configured with the default values for a Model trained on the WIDERFACE dataset featuring: - NMS Threshold: 0.4 - ConfThreshold: 0.5 - VisThreshold: 0.4 - MaxObjectNumber: 128 - KeyPointsNumber: 5
type RetinaFaceResult ¶
type RetinaFaceResult struct { DetectResults []DetectResult KeyPoints [][]KeyPoint }
RetinaFaceResult defines a struct used for retina face detection results
func (RetinaFaceResult) GetDetectResults ¶
func (r RetinaFaceResult) GetDetectResults() []DetectResult
GetDetectResults returns the object detection results containing bounding boxes
func (RetinaFaceResult) GetKeyPoints ¶
func (r RetinaFaceResult) GetKeyPoints() [][]KeyPoint
GetKeyPoints returns the keypoints of the detected faces landmark features
type SegMask ¶
type SegMask struct { // Mask is the segment mask data Mask []uint8 }
SegMask defines the segment mask data that is returned with detection results
type SegmentData ¶
type SegmentData struct {
// contains filtered or unexported fields
}
SegmentData defines a struct for storing segment data that was created during the object detection phase so we can process segment masks afterwards
type YOLOStride ¶
type YOLOX ¶
type YOLOX struct { // Params are the Model configuration parameters Params YOLOXParams // contains filtered or unexported fields }
YOLOX defines the struct for YOLOX model inference post processing
func NewYOLOX ¶
func NewYOLOX(p YOLOXParams) *YOLOX
NewYOLOX returns an instance of the YOLOX post processor
func (*YOLOX) DetectObjects ¶
func (y *YOLOX) DetectObjects(outputs *rknnlite.Outputs, resizer *preprocess.Resizer) DetectionResult
DetectObjects takes the RKNN outputs and runs the object detection process then returns the results
type YOLOXParams ¶
type YOLOXParams struct { // Strides Strides []YOLOStride // BoxThreshold is the minimum probability score required for a bounding box // region to be considered for processing BoxThreshold float32 // NMSThreshold is the Non-Maximum Suppression threshold used for defining // the maximum allowed Intersection Over Union (IoU) between two // bounding boxes for both to be kept NMSThreshold float32 // ObjectClassNum is the number of different object classes the Model has // been trained with ObjectClassNum int // ProbBoxSize is the length of array elements representing each bounding // box's attributes. Which represents the bounding box attributes plus // number of objects (ObjectClassNum) the Model was trained with ProbBoxSize int // MaxObjectNumber is the maximum number of objects detected that can be // returned MaxObjectNumber int }
YOLOXParams defines the struct containing the YOLOX parameters to use for post processing operations
func YOLOXCOCOParams ¶
func YOLOXCOCOParams() YOLOXParams
YOLOXCOCOParams returns and instance of YOLOXParams configured with default values for a Model trained on the COCO dataset featuring: - Object Classes: 80 - Strides of: 8, 16, 32 - Box Threshold: 0.25 - NMS Threshold: 0.45 - Prob Box Size: 85
- This is 80 Object Classes plus the 5 attributes used to define a bounding box being:
- x & y coordinates for the center of the bounding box
- width and height of the box relative to whole image
- confidence score
- Maximum Object Number: 64
type YOLOXResult ¶
type YOLOXResult struct {
DetectResults []DetectResult
}
YOLOXResult defines a struct used for object detection results
func (YOLOXResult) GetDetectResults ¶
func (r YOLOXResult) GetDetectResults() []DetectResult
GetDetectResults returns the object detection results containing bounding boxes
type YOLOv10 ¶
type YOLOv10 struct { // Params are the Model configuration parameters Params YOLOv10Params // contains filtered or unexported fields }
YOLOv10 defines the struct for YOLOv10 model inference post processing
func NewYOLOv10 ¶
func NewYOLOv10(p YOLOv10Params) *YOLOv10
NewYOLOv10 returns an instance of the YOLOv10 post processor
func (*YOLOv10) DetectObjects ¶
func (y *YOLOv10) DetectObjects(outputs *rknnlite.Outputs, resizer *preprocess.Resizer) DetectionResult
DetectObjects takes the RKNN outputs and runs the object detection process then returns the results
type YOLOv10Params ¶
type YOLOv10Params struct { // BoxThreshold is the minimum probability score required for a bounding box // region to be considered for processing BoxThreshold float32 // NMSThreshold is the Non-Maximum Suppression threshold used for defining // the maximum allowed Intersection Over Union (IoU) between two // bounding boxes for both to be kept NMSThreshold float32 // ObjectClassNum is the number of different object classes the Model has // been trained with ObjectClassNum int // ProbBoxSize is the length of array elements representing each bounding // box's attributes. Which represents the bounding box attributes plus // number of objects (ObjectClassNum) the Model was trained with ProbBoxSize int // MaxObjectNumber is the maximum number of objects detected that can be // returned MaxObjectNumber int }
YOLOv10Params defines the struct containing the YOLOv10 parameters to use for post processing operations
func YOLOv10COCOParams ¶
func YOLOv10COCOParams() YOLOv10Params
YOLOv10DefaultParams returns an instance of YOLOv10Params configured with default values for a Model trained on the COCO dataset featuring: - Object Classes: 80 - Box Threshold: 0.25 - NMS Threshold: 0.45 - Maximum Object Number: 64
type YOLOv10Result ¶
type YOLOv10Result struct {
DetectResults []DetectResult
}
YOLOv10Result defines a struct used for object detection results
func (YOLOv10Result) GetDetectResults ¶
func (r YOLOv10Result) GetDetectResults() []DetectResult
GetDetectResults returns the object detection results containing bounding boxes
type YOLOv5 ¶
type YOLOv5 struct { // Params are the Model configuration parameters Params YOLOv5Params // contains filtered or unexported fields }
YOLOv5 defines the struct for YOLOv5 model inference post processing
func NewYOLOv5 ¶
func NewYOLOv5(p YOLOv5Params) *YOLOv5
NewYOLOv5 returns an instance of the YOLOv5 post processor
func (*YOLOv5) DetectObjects ¶
func (y *YOLOv5) DetectObjects(outputs *rknnlite.Outputs, resizer *preprocess.Resizer) DetectionResult
DetectObjects takes the RKNN outputs and runs the object detection process then returns the results
type YOLOv5Params ¶
type YOLOv5Params struct { // Strides Strides []YOLOStride // BoxThreshold is the minimum probability score required for a bounding box // region to be considered for processing BoxThreshold float32 // NMSThreshold is the Non-Maximum Suppression threshold used for defining // the maximum allowed Intersection Over Union (IoU) between two // bounding boxes for both to be kept NMSThreshold float32 // ObjectClassNum is the number of different object classes the Model has // been trained with ObjectClassNum int // ProbBoxSize is the length of array elements representing each bounding // box's attributes. Which represents the bounding box attributes plus // number of objects (ObjectClassNum) the Model was trained with ProbBoxSize int // MaxObjectNumber is the maximum number of objects detected that can be // returned MaxObjectNumber int }
YOLOv5Params defines the struct containing the YOLOv5 parameters to use for post processing operations
func YOLOv5COCOParams ¶
func YOLOv5COCOParams() YOLOv5Params
YOLOv5DefaultParams returns an instance of YOLOv5Params configured with default values for a Model trained on the COCO dataset featuring: - Object Classes: 80 - Anchor Boxes for each Stride of:
- Stride 8: (10x13), (16x30), (33x23)
- Stride 16: (30x61), (62x45), (59x119)
- Stride 32: (116x90), (156x198), (373x326)
- Box Threshold: 0.25 - NMS Threshold: 0.45 - Prob Box Size: 85
- This is 80 Object Classes plus the 5 attributes used to define a bounding box being:
- x & y coordinates for the center of the bounding box
- width and height of the box relative to whole image
- confidence score
- Maximum Object Number: 64
type YOLOv5Result ¶
type YOLOv5Result struct {
DetectResults []DetectResult
}
YOLOv5Result defines a struct used for object detection results
func (YOLOv5Result) GetDetectResults ¶
func (r YOLOv5Result) GetDetectResults() []DetectResult
GetDetectResults returns the object detection results containing bounding boxes
type YOLOv5Seg ¶
type YOLOv5Seg struct { // Params are the Model configuration parameters Params YOLOv5SegParams // contains filtered or unexported fields }
YOLOv5Seg defines the struct for YOLOv5Seg model inference post processing
func NewYOLOv5Seg ¶
func NewYOLOv5Seg(p YOLOv5SegParams) *YOLOv5Seg
NewYOLOv5Seg returns an instance of the YOLOv5Seg post processor
func (*YOLOv5Seg) DetectObjects ¶
func (y *YOLOv5Seg) DetectObjects(outputs *rknnlite.Outputs, resizer *preprocess.Resizer) DetectionResult
DetectObjects takes the RKNN outputs and runs the object detection process then returns the results
func (*YOLOv5Seg) SegmentMask ¶
func (y *YOLOv5Seg) SegmentMask(detectObjs DetectionResult, resizer *preprocess.Resizer) SegMask
SegmentMask creates segment mask data for object detection results
func (*YOLOv5Seg) TrackMask ¶
func (y *YOLOv5Seg) TrackMask(detectObjs DetectionResult, trackObjs []*tracker.STrack, resizer *preprocess.Resizer) SegMask
TrackMask creates segment mask data for tracked objects
type YOLOv5SegParams ¶
type YOLOv5SegParams struct { // Strides Strides []YOLOStride // BoxThreshold is the minimum probability score required for a bounding box // region to be considered for processing BoxThreshold float32 // NMSThreshold is the Non-Maximum Suppression threshold used for defining // the maximum allowed Intersection Over Union (IoU) between two // bounding boxes for both to be kept NMSThreshold float32 // ObjectClassNum is the number of different object classes the Model has // been trained with ObjectClassNum int // ProbBoxSize is the length of array elements representing each bounding // box's attributes. Which represents the bounding box attributes plus // number of objects (ObjectClassNum) the Model was trained with ProbBoxSize int // MaxObjectNumber is the maximum number of objects detected that can be // returned MaxObjectNumber int }
YOLOv5SegParams defines the struct containing the YOLOv5Seg parameters to use for post processing operations
func YOLOv5SegCOCOParams ¶
func YOLOv5SegCOCOParams() YOLOv5SegParams
YOLOv5SegDefaultParams returns an instance of YOLOv5SegParams configured with default values for a Model trained on the COCO dataset featuring: - Object Classes: 80 - Anchor Boxes for each Stride of:
- Stride 8: (10x13), (16x30), (33x23)
- Stride 16: (30x61), (62x45), (59x119)
- Stride 32: (116x90), (156x198), (373x326)
- Box Threshold: 0.25 - NMS Threshold: 0.45 - Prob Box Size: 85
- This is 80 Object Classes plus the 5 attributes used to define a bounding box being:
- x & y coordinates for the center of the bounding box
- width and height of the box relative to whole image
- confidence score
- Maximum Object Number: 64
type YOLOv5SegResult ¶
type YOLOv5SegResult struct { DetectResults []DetectResult SegmentData SegmentData }
YOLOv5SegResult defines a struct used for the results of YOLO segmentation models
func (YOLOv5SegResult) GetDetectResults ¶
func (r YOLOv5SegResult) GetDetectResults() []DetectResult
GetDetectResults returns the object detection results containing bounding boxes
func (YOLOv5SegResult) GetSegmentData ¶
func (r YOLOv5SegResult) GetSegmentData() SegmentData
type YOLOv8 ¶
type YOLOv8 struct { // Params are the Model configuration parameters Params YOLOv8Params // contains filtered or unexported fields }
YOLOv8 defines the struct for YOLOv8 model inference post processing
func NewYOLOv8 ¶
func NewYOLOv8(p YOLOv8Params) *YOLOv8
NewYOLOv8 returns an instance of the YOLOv8 post processor
func (*YOLOv8) DetectObjects ¶
func (y *YOLOv8) DetectObjects(outputs *rknnlite.Outputs, resizer *preprocess.Resizer) DetectionResult
DetectObjects takes the RKNN outputs and runs the object detection process then returns the results
type YOLOv8Params ¶
type YOLOv8Params struct { // BoxThreshold is the minimum probability score required for a bounding box // region to be considered for processing BoxThreshold float32 // NMSThreshold is the Non-Maximum Suppression threshold used for defining // the maximum allowed Intersection Over Union (IoU) between two // bounding boxes for both to be kept NMSThreshold float32 // ObjectClassNum is the number of different object classes the Model has // been trained with ObjectClassNum int // MaxObjectNumber is the maximum number of objects detected that can be // returned MaxObjectNumber int }
YOLOv8Params defines the struct containing the YOLOv8 parameters to use for post processing operations
func YOLOv8COCOParams ¶
func YOLOv8COCOParams() YOLOv8Params
YOLOv8DefaultParams returns an instance of YOLOv8Params configured with default values for a Model trained on the COCO dataset featuring: - Object Classes: 80 - Box Threshold: 0.25 - NMS Threshold: 0.45 - Maximum Object Number: 64
type YOLOv8Pose ¶
type YOLOv8Pose struct { // Params are the Model configuration parameters Params YOLOv8PoseParams // contains filtered or unexported fields }
YOLOv8Pose defines the struct for YOLOv8 model inference post processing
func NewYOLOv8Pose ¶
func NewYOLOv8Pose(p YOLOv8PoseParams) *YOLOv8Pose
NewYOLOv8Pose returns an instance of the YOLOv8Pose post processor
func (*YOLOv8Pose) DetectObjects ¶
func (y *YOLOv8Pose) DetectObjects(outputs *rknnlite.Outputs, resizer *preprocess.Resizer) DetectionResult
DetectObjects takes the RKNN outputs and runs the object detection process then returns the results
func (*YOLOv8Pose) GetPoseEstimation ¶
func (y *YOLOv8Pose) GetPoseEstimation(detectObjs DetectionResult) [][]KeyPoint
GetPoseEstimation returns the keypoints for the detection objects used in pose estimation
type YOLOv8PoseParams ¶
type YOLOv8PoseParams struct { // BoxThreshold is the minimum probability score required for a bounding box // region to be considered for processing BoxThreshold float32 // NMSThreshold is the Non-Maximum Suppression threshold used for defining // the maximum allowed Intersection Over Union (IoU) between two // bounding boxes for both to be kept NMSThreshold float32 // ObjectClassNum is the number of different object classes the Model has // been trained with ObjectClassNum int // MaxObjectNumber is the maximum number of objects detected that can be // returned MaxObjectNumber int // KeyPointsNumber is the number of COCO keypoints representing different parts // of the body the pose model is trained on KeyPointsNumber int }
YOLOv8PoseParams defines the struct containing the YOLOv8 parameters to use for post processing operations
func YOLOv8PoseCOCOParams ¶
func YOLOv8PoseCOCOParams() YOLOv8PoseParams
YOLOv8PoseDefaultParams returns an instance of YOLOv8PoseParams configured with default values for a Model trained on the COCO dataset featuring: - Object Classes: 1 - Box Threshold: 0.5 - NMS Threshold: 0.4 - Maximum Object Number: 64 - KeyPoints Number: 17
type YOLOv8PoseResult ¶
type YOLOv8PoseResult struct { DetectResults []DetectResult KeyPoints [][]KeyPoint }
YOLOv8PoseResult defines a struct used for object detection results
func (YOLOv8PoseResult) GetDetectResults ¶
func (r YOLOv8PoseResult) GetDetectResults() []DetectResult
GetDetectResults returns the object detection results containing bounding boxes
func (YOLOv8PoseResult) GetKeyPoints ¶
func (r YOLOv8PoseResult) GetKeyPoints() [][]KeyPoint
type YOLOv8Result ¶
type YOLOv8Result struct {
DetectResults []DetectResult
}
YOLOv8Result defines a struct used for object detection results
func (YOLOv8Result) GetDetectResults ¶
func (r YOLOv8Result) GetDetectResults() []DetectResult
GetDetectResults returns the object detection results containing bounding boxes
type YOLOv8Seg ¶
type YOLOv8Seg struct { // Params are the Model configuration parameters Params YOLOv8SegParams // contains filtered or unexported fields }
YOLOv8Seg defines the struct for YOLOv8Seg model inference post processing
func NewYOLOv8Seg ¶
func NewYOLOv8Seg(p YOLOv8SegParams) *YOLOv8Seg
NewYOLOv8 returns an instance of the YOLOv8Seg post processor
func (*YOLOv8Seg) DetectObjects ¶
func (y *YOLOv8Seg) DetectObjects(outputs *rknnlite.Outputs, resizer *preprocess.Resizer) DetectionResult
DetectObjects takes the RKNN outputs and runs the object detection process then returns the results
func (*YOLOv8Seg) SegmentMask ¶
func (y *YOLOv8Seg) SegmentMask(detectObjs DetectionResult, resizer *preprocess.Resizer) SegMask
SegmentMask creates segment mask data for object detection results
func (*YOLOv8Seg) TrackMask ¶
func (y *YOLOv8Seg) TrackMask(detectObjs DetectionResult, trackObjs []*tracker.STrack, resizer *preprocess.Resizer) SegMask
TrackMask creates segment mask data for tracked objects
type YOLOv8SegParams ¶
type YOLOv8SegParams struct { // BoxThreshold is the minimum probability score required for a bounding box // region to be considered for processing BoxThreshold float32 // NMSThreshold is the Non-Maximum Suppression threshold used for defining // the maximum allowed Intersection Over Union (IoU) between two // bounding boxes for both to be kept NMSThreshold float32 // ObjectClassNum is the number of different object classes the Model has // been trained with ObjectClassNum int // MaxObjectNumber is the maximum number of objects detected that can be // returned MaxObjectNumber int }
YOLOv8SegParams defines the struct containing the YOLOv8Seg parameters to use for post processing operations
func YOLOv8SegCOCOParams ¶
func YOLOv8SegCOCOParams() YOLOv8SegParams
YOLOv8SegDefaultParams returns an instance of YOLOv8SegParams configured with default values for a Model trained on the COCO dataset featuring: - Object Classes: 80 - Box Threshold: 0.25 - NMS Threshold: 0.45 - Maximum Object Number: 64
type YOLOv8SegResult ¶
type YOLOv8SegResult struct { DetectResults []DetectResult SegmentData SegmentData }
YOLOv8SegResult defines a struct used for object detection results
func (YOLOv8SegResult) GetDetectResults ¶
func (r YOLOv8SegResult) GetDetectResults() []DetectResult
GetDetectResults returns the object detection results containing bounding boxes
func (YOLOv8SegResult) GetSegmentData ¶
func (r YOLOv8SegResult) GetSegmentData() SegmentData
type YOLOv8obb ¶
type YOLOv8obb struct { // Params are the Model configuration parameters Params YOLOv8obbParams // contains filtered or unexported fields }
YOLOv8obb defines the struct for YOLOv8-obb model inference post processing
func NewYOLOv8obb ¶
func NewYOLOv8obb(p YOLOv8obbParams) *YOLOv8obb
NewYOLOv8obb returns an instance of the YOLOv8obb post processor
func (*YOLOv8obb) DetectObjects ¶
func (y *YOLOv8obb) DetectObjects(outputs *rknnlite.Outputs, resizer *preprocess.Resizer) DetectionResult
DetectObjects takes the RKNN outputs and runs the object detection process then returns the results
type YOLOv8obbParams ¶
type YOLOv8obbParams struct { // BoxThreshold is the minimum probability score required for a bounding box // region to be considered for processing BoxThreshold float32 // NMSThreshold is the Non-Maximum Suppression threshold used for defining // the maximum allowed Intersection Over Union (IoU) between two // bounding boxes for both to be kept NMSThreshold float32 // ObjectClassNum is the number of different object classes the Model has // been trained with ObjectClassNum int // MaxObjectNumber is the maximum number of objects detected that can be // returned MaxObjectNumber int }
YOLOv8obbParams defines the struct containing the YOLOv8-obb parameters to use for post processing operations
func YOLOv8obbDOTAv1Params ¶
func YOLOv8obbDOTAv1Params() YOLOv8obbParams
YOLOv8obbDOTAv1Params returns an instance of YOLOv8obbParams configured with default values for a Model trained on the DOTAv1 dataset - Object Classes: 15 - Box Threshold: 0.5 - NMS Threshold: 0.4 - Maximum Object Number: 64
type YOLOv8obbResult ¶
type YOLOv8obbResult struct {
DetectResults []DetectResult
}
YOLOv8obbResult defines a struct used for object detection results
func (YOLOv8obbResult) GetDetectResults ¶
func (r YOLOv8obbResult) GetDetectResults() []DetectResult
GetDetectResults returns the object detection results containing bounding boxes