Merge branch 'bug_iris_no_face_detected_hangs' into fix_typos
This commit is contained in:
commit
adceabe98e
|
@ -199,6 +199,9 @@ class NonMaxSuppressionCalculator : public CalculatorBase {
|
||||||
if (options_.return_empty_detections()) {
|
if (options_.return_empty_detections()) {
|
||||||
cc->Outputs().Index(0).Add(new Detections(), cc->InputTimestamp());
|
cc->Outputs().Index(0).Add(new Detections(), cc->InputTimestamp());
|
||||||
}
|
}
|
||||||
|
if (options_.error_on_empty_detections()) {
|
||||||
|
return ::mediapipe::InternalError("NonMaxSuppression received empty detections, but detections are required for this pipeline.");
|
||||||
|
}
|
||||||
return ::mediapipe::OkStatus();
|
return ::mediapipe::OkStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,9 @@ message NonMaxSuppressionCalculatorOptions {
|
||||||
// Whether to put empty detection vector in output stream.
|
// Whether to put empty detection vector in output stream.
|
||||||
optional bool return_empty_detections = 5;
|
optional bool return_empty_detections = 5;
|
||||||
|
|
||||||
|
// Whether to throw an error on an empty input detection vector
|
||||||
|
optional bool error_on_empty_detections = 8;
|
||||||
|
|
||||||
// Algorithms that can be used to apply non-maximum suppression.
|
// Algorithms that can be used to apply non-maximum suppression.
|
||||||
enum NmsAlgorithm {
|
enum NmsAlgorithm {
|
||||||
DEFAULT = 0;
|
DEFAULT = 0;
|
||||||
|
|
|
@ -128,6 +128,7 @@ node {
|
||||||
min_suppression_threshold: 0.3
|
min_suppression_threshold: 0.3
|
||||||
overlap_type: INTERSECTION_OVER_UNION
|
overlap_type: INTERSECTION_OVER_UNION
|
||||||
algorithm: WEIGHTED
|
algorithm: WEIGHTED
|
||||||
|
error_on_empty_detections: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user