To increase performance, the extension reuses a static instance of CIDetector rather than creating a new object for each call to rectWithFace.

From the Apple docs on CIDetector: “This class can maintain many state variables that can impact performance. So for best performance, reuse CIDetector instances instead of creating new ones.”