@camstack/types 1.2.157 → 1.2.158

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,13 @@ export interface SpatialDetection {
9
9
  readonly mask?: Uint8Array;
10
10
  readonly maskWidth?: number;
11
11
  readonly maskHeight?: number;
12
+ /**
13
+ * Mirrored from {@link ObjectDetection.nativeRecovery} when this detection
14
+ * enters the tracker. The tracker's SPAWN gates (per-class score floor,
15
+ * person-over-animal dedup) are tuned for the coarse full-frame pass; a box
16
+ * measured at native resolution is not the thing they exist to kill.
17
+ */
18
+ readonly nativeRecovery?: NativeRecoveryEvidence;
12
19
  }
13
20
  export interface CropInput {
14
21
  readonly frame: FrameInput;
@@ -216,6 +223,37 @@ export interface DetectionBase {
216
223
  readonly labels: readonly ScoredLabel[];
217
224
  readonly track?: TrackInfo;
218
225
  readonly debug?: DetectionDebug;
226
+ /**
227
+ * Present when this box did NOT come from the full-frame pass but from a
228
+ * SECOND detector pass on a native-resolution crop of a motion region
229
+ * (`small-subject-recovery.ts` in the runner). See
230
+ * {@link NativeRecoveryEvidence}.
231
+ */
232
+ readonly nativeRecovery?: NativeRecoveryEvidence;
233
+ }
234
+ /**
235
+ * What a native-resolution second pass ALREADY measured about a box.
236
+ *
237
+ * The first-level detector sees a 4K frame at 320 px: a 100 px dog is 8 px and
238
+ * is not emitted. The runner's recovery pass re-runs THE SAME detector on a
239
+ * 640–800 px native square around the moving region and finds it at 0.82–0.91
240
+ * (`docs/benchmarks/pipeline-frame-model-eval.md`, case `miss-dog-615`). That
241
+ * pass is already a second look at better pixels — so every downstream gate
242
+ * whose job is to ask "did the coarse pass see a real thing?" has its answer,
243
+ * and re-deriving a THIRD, tighter crop of the same subject can only lose
244
+ * information (D377).
245
+ *
246
+ * Carried from the runner to post-analysis on the emitted frame result and
247
+ * mirrored onto the tracker's {@link SpatialDetection}. Plain data: no pixels,
248
+ * no handle — the crop it names is long gone, and its VERDICT is what travels.
249
+ */
250
+ export interface NativeRecoveryEvidence {
251
+ /** Score the second pass measured, on the native crop, with the same model. */
252
+ readonly score: number;
253
+ /** Side of the native square the crop was cut from, in native pixels. */
254
+ readonly cropSidePx: number;
255
+ /** Side of the compressed view the model actually saw, in pixels. */
256
+ readonly viewPx: number;
219
257
  }
220
258
  /** Object detection (first-level person/vehicle/animal OR detail face/plate). */
221
259
  export interface ObjectDetection extends DetectionBase {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.157",
3
+ "version": "1.2.158",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",