- Introduced new vector drawables for forensic icons: `ic_forensics_pet` and `ic_forensics_vehicle`. - Replaced info icon TextView with an ImageView in `fragment_faditor_mini.xml`. - Updated layout in `fragment_forensic_intelligence.xml` to include an ImageButton for lab menu and adjusted constraints. - Modified padding and layout properties in `fragment_forensics_events.xml` for better UI alignment. - Created new layout `fragment_forensics_export_center.xml` for the export center functionality. - Added `fragment_forensics_gallery.xml` layout for displaying evidence gallery with sorting options. - Implemented `fragment_lab_sidebar.xml` for lab sidebar navigation with new sections. - Enhanced `fragment_settings_digital_forensics.xml` with new UI elements for motion lab dependency and evidence collection settings. - Created item layout `item_forensics_gallery.xml` for individual gallery items. - Updated `strings.xml` with new strings for evidence gallery, export center, and digital forensics features.
7.6 KiB
Digital Forensics Roadmap
Summary
Add a new Advanced subsection named Digital Forensics (separate from Motion Lab) to deliver:
- AI-based event intelligence
- Reliable video-to-data linkage across rename/move/paste-back
- Optional live preview AI overlay
- Future cloud-sync-ready architecture
This roadmap is modular, realtime-oriented, and privacy-first.
Lab Tab Consolidation (Locked 2026-02-14)
- Add 6th bottom-nav item:
Lab - Add dedicated tab-root surface titled Forensic Intelligence
- Move forensic browsing into Lab (Events + Insights sections)
- Remove Events/Insights navigation rows from Digital Forensics settings (settings now control-only)
- Keep single source-of-truth flow: detector -> recorder -> Room DB -> Lab UI
- Bump forensics DB schema and use latest clean destructive reset policy for this refactor
- Keep English-first strings for new UI labels in this phase
Hard-Cut Runtime Stack (Locked 2026-02-15)
- Use EfficientDet-Lite1 as the only detector path in recording analysis
- Remove overlay payload compatibility fallback logic in renderer path (strict
LABEL|CONF|cx|cy|w|h|TYPE) - Shift forensic event persistence to real-time heartbeat writes (no stop-only dependency)
- Add multi-event active aggregation keyed by media+type+class
- Add persistent snapshot evidence table (
ai_event_snapshot) + DAO - Add lifecycle metadata fields to
ai_event(status, seen-range, sample count, peak confidence, alert fields) - Bump forensics DB schema to latest (
version=5, destructive migration policy) - Move Lab root from tabbed pager to events-first single surface with top-right hamburger
- Add Lab sidebar shell with Insights/admin destinations
Architecture Decision (Locked 2026-02-13)
- Single detector source of truth: EfficientDet-Lite1
- Legacy person-only detector removed
- No detector fallback paths to legacy models
- Preview overlay only (never burned into encoded video)
- Detector runtime uses TFLite Task Vision API (metadata-driven labels/output parsing, no manual label file)
Product Positioning
- Keep Advanced section unchanged.
- Add a new feature card: Digital Forensics.
- Keep Motion Lab as separate feature.
- Discord alerts: Coming Soon placeholder for now.
Primary Requirement: Persistent Video Identity Linkage
Goal
A video should retain linked forensic/event data after:
- rename
- folder move
- export/import back into FadCam
Identity Strategy
- Exact Fingerprint
- sampled SHA-256 blocks
- file size
- duration
- codec/container profile
- Visual Fingerprint
- keyframe perceptual hash (pHash/aHash)
- Origin Hints
- first-seen path/name/timestamps
Match Policy
- Exact match -> auto relink
- High-confidence similarity -> Probable relink (auto + badge)
- Low confidence -> create new media record
Metadata Embedding
- Write
media_uidinto video metadata where possible (best-effort) - Never rely only on metadata (it can be stripped)
- DB fingerprints remain source of truth
Data Model (Room SQLite)
media_asset
media_uid(UUID PK)current_uridisplay_namecategory/subtypesize_bytesduration_mscodec_infoexact_fingerprintvisual_fingerprintfirst_seen_atlast_seen_atlink_status(EXACT,PROBABLE,NEW)
ai_event
event_uid(UUID PK)media_uid(FK)event_type(PERSON,VEHICLE,PET,DANGEROUS_OBJECT)start_msend_msconfidencebbox_normtrack_idprioritythumbnail_ref
integrity_link_log
log_uidmedia_uidaction(LINKED_EXACT,LINKED_PROBABLE,UNLINKED,MISMATCH)scoretimestamp
sync_queue (future)
op_uidentity_typeentity_idoperationpayload_jsonstatusretry_count
Feature Toggles (Digital Forensics screen)
- Enable Digital Forensics
- Event classes (Person / Vehicle / Pet)
- Dangerous object tags toggle (opt-in)
- Show AI overlay in live preview
- Daily summary (always-on analytics)
- Heatmap insights (always-on analytics)
- Discord alerts (Coming Soon placeholder)
Phase-by-Phase Execution
Phase 0 - UX Shell + Navigation
- Create Digital Forensics card in Advanced
- Add settings screen skeleton
- Add Coming Soon Discord row
- Add helper texts and safety disclaimers
Deliverable: Navigable Digital Forensics settings UI (no backend inference yet).
Phase 1 - DB & Identity Foundation
- Add Room DB module, entities, DAOs, migrations (baseline v1 schema)
- Implement exact fingerprint generator (sampled SHA-256 blocks)
- Implement visual fingerprint generator (keyframe aHash baseline)
- Build relink engine (exact + probable baseline scoring)
- Integrate with existing Records scan pipeline (async background hook)
- Add link status badges support in data layer (
link_statusstored)
Deliverable: Persistent asset identity with robust relink behavior.
Phase 2 - Event Capture Integration
- Extend existing analysis pipeline to emit structured events (motion START/STOP transitions)
- Persist events to
ai_event - Store representative thumbnails (timeline reference via
thumbnail_ref) - Keep dangerous-object tagging opt-in only
- Ensure motion-trigger path remains stable (async, no control-flow changes)
Deliverable: Event metadata linked to media assets.
Phase 3 - Events UX
- Add Events view in Records context
- Add filters (type, date, confidence)
- Tap event -> seek exact timestamp and open paused (no autoplay)
- Show link quality badge (Exact/Probable)
- Show proof frame thumbnail for each event row
Deliverable: Searchable evidence timeline experience.
Phase 4 - Insights + Overlay
- Add daily summary cards
- Add heatmap from bbox centers
- Add optional live overlay rendering (auto labels baseline)
- Ensure overlay-off mode has minimal overhead
Deliverable: Intelligence layer without manual drawing workflow.
Phase 5 - Hardening
- Rename/move/import stress hardening (multi-signal relink guards + confidence threshold)
- Re-encode similarity baseline validation path (visual hash probable relink)
- Mid-range thermal/performance safeguards (async indexing/event writes, overlay toggle off by default)
- Regression checks for Motion Lab + Records (compile + non-blocking hooks)
- DB migration and recovery tests baseline (migration 1->2 added for new event metadata)
Deliverable: Production-ready reliability baseline.
Acceptance Criteria
- Rename/move keeps data linked automatically
- Paste-back relinks via exact/probable match
- No false hijack of unrelated videos
- Events open correct video timestamps
- Motion Lab remains independent from Digital Forensics toggles
- Mid-range realtime performance remains acceptable
Risks & Mitigations
-
Re-encoded files lose exact match
Mitigation: visual fingerprint + probable-match badge -
False probable relink
Mitigation: confidence thresholds + link log + optional review queue later -
Thermal increase with inference/overlay
Mitigation: adaptive FPS and defaults OFF
Files to Maintain for Context
DIGITAL_FORENSICS_ROADMAP.md(master roadmap)DIGITAL_FORENSICS_PHASE_LOG.md(ongoing decisions/findings)MOTION_LAB_ROADMAP.md(separate, cross-link only)
Defaults
- Digital Forensics: OFF by default
- Dangerous object tags: OFF by default
- Overlay: OFF by default
- Match policy: Exact + Probable (with badge)
- Discord alerts: Coming Soon (no active network flow)