public class RemoveOverlappingObjects extends ReduceElementsGreedy
This involves non-maximum suppression for object-masks using an Intersection over Union score.
A strategy for reducing elements that greedily removes any element with a strong overlap with another.
The highest-confidence element is always retained as a priority over lower-confidence elements.
The strength of the overlap is measured by a score with 0 <= score <= 1
).
See Non-maximum suppression for a description of the algorithm.
Constructor and Description |
---|
RemoveOverlappingObjects() |
Modifier and Type | Method and Description |
---|---|
double |
getScoreThreshold()
Bounding boxes with scores above this threshold are removed.
|
protected boolean |
processObjects(ObjectForReduction source,
ObjectForReduction overlapping,
ReduceObjectsGraph graph)
Processes two objects.
|
void |
setScoreThreshold(double scoreThreshold)
Bounding boxes with scores above this threshold are removed.
|
protected boolean |
shouldObjectsBeProcessed(ObjectMask source,
ObjectMask other)
Whether to include another (possibly-overlapping with
source ) element in processing? |
reduce
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
protected boolean shouldObjectsBeProcessed(ObjectMask source, ObjectMask other)
ReduceElementsGreedy
source
) element in processing?shouldObjectsBeProcessed
in class ReduceElementsGreedy
source
- the element we are currently processing, for which we search for possibly
overlapping elementother
- another object which we are considering to include in processing (in conjunction
with source
).other
should be included in processing.protected boolean processObjects(ObjectForReduction source, ObjectForReduction overlapping, ReduceObjectsGraph graph)
ReduceElementsGreedy
processObjects
in class ReduceElementsGreedy
source
- the element that is being processed as the source, the object with
higher confidence.overlapping
- the element that is deemed to overlap with the sourceElement
about
which a decision is to be made.graph
- the graph relating objects to each other, and determining the priority for
reduction.source
object was altered during processing, false if it was not.public double getScoreThreshold()
public void setScoreThreshold(double scoreThreshold)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.