Documentation ¶
Overview ¶
Package gofaces is a set of functions to handle the input and output of a Tint YOLO v2 model.
Index ¶
Constants ¶
const ( // HSize is the height of the input picture HSize = 416 // WSize is the width of the input picture WSize = 416 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Box ¶
type Box struct { R image.Rectangle Confidence float64 // The confidence the model has that there is at least one element in this box Elements []Element // contains filtered or unexported fields }
Box is holding a bounding box A bunding box is a rectangle R containing an object with Confidence. The object is one of the Elements (most likely the one with the highest probability)
func ProcessOutput ¶
ProcessOutput analyze the tensor dense and output the bouding boxes filled with the predictions
func Sanitize ¶
Sanitize the output from https://medium.com/@jonathan_hui/real-time-object-detection-with-yolo-yolov2-28b1b93e2088
- Sort the predictions by the confidence scores.
- Start from the top scores, ignore any current prediction if we find any previous predictions that have the same class and IoU > 0.5 with the current prediction.
- Repeat step 2 until all predictions are checked.