# SOL Vision object registry

Deployed October 10, 2026. Local viewer:
<http://127.0.0.1:8888/api/dashboard/object-registry/view>
or the workstation's current LAN address on port 8888. Public clients receive
403 for the viewer, frame input, JSON, and evidence routes.

## What is running

`sol-object-registry.service` samples both existing camera managers every ten
seconds. It never opens a V4L2 device or substitutes a camera. An atomic local
frame route supplies the original upright image, capture ID, time, freshness,
and screen-candidate geometry. Stale frames, warm-up placeholder images, and
duplicate capture IDs cannot create sightings or missing-object events.

The worker reuses the installed YOLO11n ONNX model through OpenVINO on CPU,
with two inference threads and a 0.35 reporting threshold. Eighty ordinary
object categories are available. Results are **provisional model labels**,
not accepted identities. The spider retains its user-confirmed visual
references, two recorded views, and rotation/scale reacquisition. Its name
remains **unknown spider entity**, and only its face is overlaid.

The registry adds no household alerts, person identities, or crossing counts.
It does not draw generic detector guesses on the public camera feed.

## Records and meanings

- SQLite authority: `/mnt/sol-data/sol-stack/object-registry/objects.sqlite3`.
- Named objects have durable `obj-` identifiers. The imported spider is
  `obj-45c73f1de776426e`; its history begins at registry installation, not at the
  creation times of older reference images.
- Generic detections have `track-` episode IDs. Association requires the same
  camera, category, detector, recent observation, and overlapping box, with
  one-to-one assignment. It is spatial continuity, not visual re-identification.
  After an episode is lost, a later generic detection gets a new episode.
- `tentative`: one generic detection. `observed`: a named-reference match or
  repeated generic evidence. Neither confirms a model's semantic class.
- `not_seen`: three fresh samples did not match; not proof of departure.
- `unknown`: camera or detector observations unavailable; never counted as
  absence. The viewer also expires a stopped worker's current states.
- Events include registration, first observation, repeated detection,
  reacquisition, unavailability, not-seen, and sampled sightings. Repeated
  sightings are written at most once per minute per object.
- Evidence crops are local, mode 0600, and SHA-256 recorded. The generated
  evidence budget is 512 MiB; upon reaching it, metadata recording continues
  without new crops. Existing evidence is preserved. No public upload occurs.
- `model_class_score` and `normalized_template_similarity` are separate
  measures; neither is a calibrated probability of identity.
- Screen containment is recorded as context when available. The current screen
  polygon can be a fallback/incorrect candidate, so it does not establish that
  the object is physically in the room or on the television.

## Operation and enrollment

```bash
systemctl --user status sol-object-registry.service
python3 /home/david/random/bin/sol_object_registry.py status
```

Enroll another named object using a confirmed **upright** reference image and
its pixel crop (x, y, width, height):

```bash
python3 /home/david/random/bin/sol_object_registry.py enroll \
  --camera record-player --label 'chosen name' \
  --image /path/to/upright-reference.png --bbox 100 100 40 50
```

`--camera c615` is also supported. Reference matching is camera-scoped. New
named entries and the initial spider import are persisted in SQLite; a
generated `~/.local/state/sol-vision-camera/named-objects.json` projection keeps
the existing renderer and worker in agreement. Do not independently edit that
projection as the registry authority. Raw/secondary overlays are unchanged;
secondary named observations appear in the registry.

Stopping the registry service leaves camera ownership and playback alone.
It refuses to start if `/mnt/sol-data` is not mounted. The loopback worker API
is port 18919; the existing dashboard proxies only allowlisted read routes.
The viewer is read-only; enrollment is a local CLI operation.

## Installed inventory and online comparison

The search covered user services, container inventory, Flatpak applications,
system packages and command-line tools, Python packages, installed model files,
and the prior detector benchmark reports. Installed and relevant:

| Utility | Role and decision |
|---|---|
| OpenCV 4.13 system / 5.0 detector venv | Existing capture/tracking, reference matching, image processing. Reused. |
| OpenVINO 2026.3.1 + YOLO11n ONNX | Bounded CPU generic detector. Reused in the worker. |
| Ultralytics 8.4.150 + YOLOE-11s + MobileCLIP | Installed text/visual prompting option. Benchmarked; not enabled for alerts or substituted for user identities. |
| PyTorch 2.14 CPU / torchvision 0.29 | Installed detector environment; no CUDA inference assumed. |
| MediaPipe ONNX/HOG | Existing person-candidate system; untouched. |
| SmolVLM 500M | Existing scene-description path; prose remains hypothesis rather than database identity. |
| Motion 4.3.2 | Installed isolated diagnostic, disabled after noisy earlier trials. Not activated. |
| Tesseract, FFmpeg, GStreamer | Installed OCR/transport tools; not object registries. |
| Frigate | No running container found; earlier download was paused. Not installed during this change. |

Official options reviewed:

- [YOLOE](https://docs.ultralytics.com/models/yoloe): text/visual-prompt detection
  and segmentation. It supports custom categories, but the QuickCam still needs
  scene-specific validation. Visual-prompt class IDs require application naming.
- [Ultralytics tracking](https://docs.ultralytics.com/modes/track): multiple
  tracking backends, including ByteTrack and BoT-SORT. Useful for a higher-rate
  continuous tracker, but their IDs alone are not durable real-world identities.
- [Frigate](https://docs.frigate.video/configuration/review/): full NVR with
  review timelines and tracked objects. Broader than the current registry need;
  replacing the existing capture/display stack is unnecessary here.
- [SAM 2](https://github.com/facebookresearch/sam2) and
  [SAM 3](https://github.com/facebookresearch/sam3/blob/main/README.md): richer
  segmentation/tracking options. No additional weights were installed; current
  face-only labeling does not require mask inference.
- [Grounding DINO](https://github.com/IDEA-Research/GroundingDINO): open-set
  text-guided detection, a future alternative requiring local evaluation.
- [Norfair](https://tryolabs.github.io/norfair/dev/reference/): configurable
  online detection association. A tracking library, not an object database.

The registry is detector-independent at its ingestion boundary; additional
detectors can submit source-qualified observations without replacing the
catalogue or conflating their scores.

## Validation and limits

Initial replay: both installed generic models reported no >=0.35 detections on
the current QuickCam reference. The first C615 download was a warm-up placeholder
and is **excluded** as a valid camera benchmark. Subsequent fresh C615 live
observations included a bottle candidate; a saved crop shows the bottle. The
QuickCam also produced intermittent chair candidates. These are logged as
provisional, not treated as proof of reliable general recognition.

The low-resolution camera, changes of viewpoint, low light, occlusion, and
reference aging still limit detection. Enrollment helps a known object; it does
not give the classifier universal recognition. Face templates are not human
facial recognition.

41 unit checks passed across the registry and existing named-object, vision,
music, tracking and dashboard suites. Lifecycle checks cover durable IDs,
duplicate samples, stale/offline sources, detector failure, multiple same-class
objects, camera separation, import idempotency, and reacquisition. Live checks
cover both sources, private evidence, viewer rendering, public rejection, and
restart persistence. Raw research artifacts are private under
`/mnt/sol-data/sol-stack/object-registry/research/`.
