gapi_parseYolo
import { gapi_parseYolo } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Parses output of Yolo network.
Extracts detection information (box, confidence, label) from Yolo output, filters it by given confidence and performs non-maximum suppression for overlapping boxes.
Note: Function textual ID is "org.opencv.nn.parsers.parseYolo"
Note: The default anchor values are specified for YOLO v2 Tiny as described in Intel Open Model Zoo <a href="https://github.com/openvinotoolkit/open_model_zoo/blob/master/models/public/yolo-v2-tiny-tf/yolo-v2-tiny-tf.md">documentation</a>.
gapi_parseYolo(in_: GMat, inSz: GOpaque_Size, confidenceThreshold: number, nmsThreshold: number, anchors: FloatVector): tuple_GArray_Rect_and_GArray_int;4 available overloads
gapi_parseYolo(in_: GMat, inSz: GOpaque_Size): tuple_GArray_Rect_and_GArray_int;gapi_parseYolo(in_: GMat, inSz: GOpaque_Size, confidenceThreshold: number): tuple_GArray_Rect_and_GArray_int;gapi_parseYolo(in_: GMat, inSz: GOpaque_Size, confidenceThreshold: number, nmsThreshold: number): tuple_GArray_Rect_and_GArray_int;gapi_parseYolo(in_: GMat, inSz: GOpaque_Size, confidenceThreshold: number, nmsThreshold: number, anchors: FloatVector): tuple_GArray_Rect_and_GArray_int;in_Input CV_32F tensor with {1,13,13,N} dimensions, N should satisfy:
\texttt{N} = (\texttt{num_classes} + \texttt{5}) * \texttt{5},where num_classes - a number of classes Yolo network was trained with.
inSzSize to project detected boxes to (size of the input image).
confidenceThresholdIf confidence of the detection is smaller than confidence threshold, detection is rejected.
nmsThresholdNon-maximum suppression threshold which controls minimum relative box intersection area required for rejecting the box with a smaller confidence. If 1.f, nms is not performed and no boxes are rejected.
anchorsAnchors Yolo network was trained with.
a tuple with a vector of detected boxes and a vector of appropriate labels.
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.