Object Detection
Object Detection watches the candidate's camera for suspicious objects. Today it detects one object: a mobile phone. When a phone stays in view, AutoProctor records a violation with a snapshot, and it appears in the proctoring report and counts towards the Trust Score.
Enabling Object Detection
Set detectSuspiciousObjects: true in trackingOptions:
const proctoringOptions = {
trackingOptions: {
detectSuspiciousObjects: true
}
}
It is off by default. It turns the camera on even if no other camera feature is enabled.
How It Works
- Model download: when you call
.start(), the SDK downloads an object-detection model (about 13 MB compressed) from AutoProctor's CDN. Browsers cache it, so later attempts start faster. - Sampling: every 2 seconds, a camera frame is checked for a phone.
- Debounce: a phone is reported only when it is seen in at least 2 of the last 4 checks, so a single misread frame never raises a violation. If face detection (
numHumans) is on, nothing is reported before the candidate's face has been seen once. - Evidence: while the phone stays in view, an
apEvidenceEventwith code5012fires on every check (about every 2 seconds), and itsviolationCountkeeps rising. A snapshot is stored when the phone first appears, and again after each minute it stays in view, so a phone visible for a minute weighs more than a glimpse.
The candidate sees the same live feedback as for other violations (when informUser.testTaker is true). The message is deliberately vague about what was detected.
If the Model Can't Load
If the model can't be downloaded after three attempts, the test currently continues without object detection, and phones are not flagged for that attempt. The rest of the proctoring is unaffected.
apInst.isObjectDetectionReady() Needs v5 returns true once the model has loaded, when object detection is off, or when the model couldn't be downloaded and the test continued without it. It returns false before .setup() and while the model is still loading.
Content Security Policy
If your test page sets a strict Content-Security-Policy, allow the model's origin in script-src (the detection runtime is loaded with a dynamic import(), so connect-src alone is not enough), and allow WebAssembly with 'wasm-unsafe-eval'. Face detection, which is on by default, needs 'wasm-unsafe-eval' too. See Versions & Installation for a complete policy, including the connect-src origins the SDK needs. If you self-host the SDK's assets with assetsBaseUrl Needs v5, use that origin instead of cdn.autoproctor.co.
Related Events
| Event | Code | Meaning |
|---|---|---|
apEvidenceEvent | 5012 | A phone was detected in the camera view. Repeats about every 2 seconds while it stays in view. |
See JavaScript Events for the full reference.