diff --git a/openbr/plugins/imgproc/slidingwindow.cpp b/openbr/plugins/imgproc/slidingwindow.cpp index 686dfd3..36ec0f3 100644 --- a/openbr/plugins/imgproc/slidingwindow.cpp +++ b/openbr/plugins/imgproc/slidingwindow.cpp @@ -77,6 +77,15 @@ class SlidingWindowTransform : public MetaTransform Size maxObjectSize; foreach (const Template &t, src) { + // As a special case, skip detection if the appropriate metadata already exists + if (t.file.contains("Face")) { + Template u = t; + u.file.setRects(QList() << t.file.get("Face")); + u.file.set("Confidence", t.file.get("Confidence", 1)); + dst.append(u); + continue; + } + const bool enrollAll = t.file.getBool("enrollAll"); // Mirror the behavior of ExpandTransform in the special case