ml.postprocessing.edgeimpulse — Edge Impulse
The ml.postprocessing.edgeimpulse module contains post-processing classes
for Edge Impulse models.
class Fomo – Fast Objects More Objects
Post-processor for FOMO (Fast Objects More Objects) model output.
- class ml.postprocessing.edgeimpulse.Fomo(threshold: float = 0.4, w_scale: float = 1.414214, h_scale: float = 1.414214, nms_threshold: float = 0.1, nms_sigma: float = 0.001)
Creates a FOMO post-processor.
thresholdminimum score required for a detection to be kept.w_scalehorizontal scale factor applied to the grid cell width before non-max-suppression. Larger values cause neighboring cells to be merged into a single detection.h_scalevertical scale factor applied to the grid cell height before non-max-suppression. Larger values cause neighboring cells to be merged into a single detection.nms_thresholdIoU threshold passed to non-max-suppression.nms_sigmasigma value passed to non-max-suppression (soft-NMS).- __call__(model: ml.Model, inputs: list, outputs: list) list
Invoked by
ml.Model.predict()with the model, its inputs, and its raw outputs. Returns a list of per-class detection lists. Each detection is a((x, y, w, h), score)tuple. Empty class lists are included so that the position of each list in the output matches the class index in the model output. Returns an empty tuple when nothing is detected.