Category: Halovision


Added face rotation to the INSPEC firmware in 1.3.9, so REM detection also works when your head lies sideways in the frame.

The Pixel Range used to set how many changed pixels in a row count as movement. It now counts changed pixels in connected groups in any direction, which detects more subtle eye movements in all directions. It also more sensitive now, so the Pixel Range needs be increased from 6 to 12 to filter out background noise.

A new eye bursts function now counts an eye movement only when another one occurred within the 2.5 seconds before it. This helps to keep the artifact filter from filtering out valid eye movements when too much of the body is in the frame and breathing patterns cause repetitive motion signals.

Added over-the-air firmware updates!

Upgraded the REM Episode Player in Lucid Scribe for the INSPEC. Here I am scrolling really fast through all the frames then moving back and forth between some frames…
This is the session where I recorded my sleep in parallel with the CGX Patch EEG and the sleep stage classification lined up surprisingly well with the INSPEC.

Added a new Capture Frames Without REM option that saves a frame from the INSPEC when no REM has been detected for a configurable interval between 15 and 90 minutes. This is to help new users debug the camera angle and positioning when no clips of REM episodes are captured on the first nights.

INSPEC - Capture Frames without REM

I ran the INSPEC session with the CGX Patch EEG recording through three sleep stage classifiers: two models from ezscore (ez6 and ez6moe), and Dreamento’s DreamentoScorer. All three classifiers are trained on the ZMax, so on the CGX they flipped between stages a little too often.

The REM marks fall at the same times the INSPEC detected REM across all three classifiers. Especially the long REM periods late in the night, around hours three, five, and seven, show up in every one of them. The results are better than I dreamed!

The full session along with the raw files (including EDF) is on LSDBase:

Lucid Scribe INSPEC vs Clinical EEG Sleep Stage Classifier Lucid Scribe INSPEC vs CGX Patch EEG DreamentoScorer Lucid Scribe INSPEC vs CGX Patch EEG ezscore ez6moe Lucid Scribe INSPEC vs CGX Patch EEG ezscore ez6

I recorded an INSPEC session while wearing a clinical-grade EEG device, a CGX Patch on loan from a sleep research lab after I gave presentation on “Contactless REM Detection in Natural Sleep” and the history of the INSPEC.

The INSPEC logged a 20-minute run of eye movements that line up where I can also see spikes in the EEG data. I still need to run the EEG data through a sleep stage classifier, but it looks like they align from what I can see.

The full session along with the raw files (including EDF) is on LSDBase:

REM Sleep - Lucid Scribe INSPEC with CGX Patch EEG

The latest INSPEC update adds BlazeFace, a lightweight convolutional network designed by Google for real-time face detection on mobile devices. It’s small and fast enough to run on the INSPEC’s onboard computer. And it handles the awkward inputs that overnight sleep produces… cropped faces, extreme angles, infrared illumination, and partial occlusion from blankets. The face is now detected through the kinds of angles that confused earlier versions.

The result in nightly use has been clean: detection happens every night and false positives under the current filter set have dropped to zero.

A recent recording from caught 80+ visually-confirmed REM events clustered into a 21-minute window during late-cycle sleep, lining up exactly with a 30-minute lucid dream:

Added a new Progressive Volume option that makes each successive audio cue play slightly louder than the last. You can configure the increase amount from 5% to 50% per cue, with the volume capping at 100%. The volume is relative to the system’s media channel volume.

And some new settings to trigger a “Face Lost” audio cue when your face is no longer visible to the camera. This is useful for maintaining optimal positioning throughout the night.

You can configure:

  • How long your face must be absent before the alert triggers (10 to 120 seconds)
  • A separate volume level for the face lost alert, also relative to the system’s media channel volume
  • A custom audio track for the alert
INSPEC Lucid Dreaming Device Progressive Audio Cues INSPEC Lucid Dreaming Device Face Lost Detection

The latest INSPEC update introduces hypnograms and computed sleep quality metrics. The implementation estimates AWAKE, REM, Light Sleep (NREM1 and NREM2), and Deep Sleep (NREM3 and NREM4) phases using a combination of stillness scoring and detected rapid eye movement patterns from the video stream. Stillness is inferred from frame-to-frame pixel variance, while REM is detected through bursts of eye movement activity from the REM-detection engine.

The hypnogram output aligns well with typical sleep architecture and already offers valuable insight into session dynamics. This lays the groundwork for real-time sleep staging and deeper analysis to optimize cue timing relative to vivid dreams during REM sleep.

There is still lots planed, like adding indicators for when the REM-detection algorithm triggered the audio cues and caching for faster load times, but it is already yielding valuable insights and fun to play with.

The top frame is animated and replays highlights from the session where rapid eye movement patterns were detected. The rest of the frames are stills that can be removed – for when you want to export to an LSD file and share the session, but were caught sleep-talking or at an awkward angle.😅

INSEPC Details | GitHub | Google Play

Added TensorFlow Edge Impulse to the INSPEC device. This improves face detection and REM detection, especially at difficult angles!

INSPEC TensorFlow Edge Impulse