class TensorflowLite::Image::FaceDetection
- TensorflowLite::Image::FaceDetection
- Reference
- Object
Included Modules
Defined in:
tflite_image/face_detection.crInstance Method Summary
- #anchors : Array(Anchor)
- #confidence_threshold : Float32
- #confidence_threshold=(confidence_threshold : Float32)
-
#generate_anchors(strides : Array(Int32), anchor_offset_x : Float64 = 0.5, anchor_offset_y : Float64 = 0.5, aspect_ratios : Array(Float64) = [1.0], scales_per_octave : Int32 = 2, min_scale : Float64 = 0.1, max_scale : Float64 = 0.9) : Array(Anchor)
This is a trimmed down version of the C++ code; all irrelevant parts have been removed.
- #intersection_over_union(det1 : Output, det2 : Output) : Float32
- #nms_similarity_threshold : Float32
- #nms_similarity_threshold=(nms_similarity_threshold : Float32)
- #non_maximum_suppression(detections : Array(Output), iou_threshold : Float32) : Array(Output)
-
#process(image : Canvas | FFmpeg::Frame) : Array(Output)
attempts to classify the object, assumes the image has already been prepared
-
#sigmoid(data : Slice(Float32)) : Slice(Float32)
Mapping to (0,1) score limit is 100 in mediapipe and leads to overflows with IEEE 754 floats this lower limit is safe for use with the sigmoid functions and float32
Instance methods inherited from module TensorflowLite::Image::Common
aspect_ratio : Float64
aspect_ratio,
client : Client
client,
detection_adjustments(image, scale_mode : Scale = @scaling_mode)detection_adjustments(image_width : Int32, image_height : Int32, scale_mode : Scale = @scaling_mode) detection_adjustments, input_format : Format input_format, labels : Array(String) labels, process(image : Canvas | FFmpeg::Frame) : Array process, resolution : Tuple(Int32, Int32) resolution, run(canvas : Canvas, scale_mode : Scale = @scaling_mode, resize_method : StumpyResize::InterpolationMethod = :bilinear) run, scaling_mode : Scale scaling_mode, scaling_mode=(scaling_mode : Scale) scaling_mode=
Constructor methods inherited from module TensorflowLite::Image::Common
new(client : Client, labels : Array(String) | Nil = nil, scaling_mode : Scale = DEFAULT_SCALE_MODE, input_format : Format | Nil = nil, output_format : Format | Nil = nil)
new
Instance Method Detail
This is a trimmed down version of the C++ code; all irrelevant parts have been removed. (reference: mediapipe/calculators/tflite/ssd_anchors_calculator.cc) also: https://github.com/patlevin/face-detection-tflite/blob/main/fdlite/face_detection.py#L58
attempts to classify the object, assumes the image has already been prepared
Mapping to (0,1) score limit is 100 in mediapipe and leads to overflows with IEEE 754 floats this lower limit is safe for use with the sigmoid functions and float32