osf-rs 0.0.1

OSF Sleep Foundation Model — inference in Rust with Burn ML
Documentation
//! # osf-rs — OSF Sleep Foundation Model inference in Rust
//!
//! Pure-Rust inference for the OSF (Open Sleep Foundation) model,
//! built on [Burn 0.20](https://burn.dev).
//!
//! OSF is a Vision Transformer (ViT) trained with DINO+iBOT self-distillation
//! on 166,500 hours of polysomnography data. It produces general-purpose
//! representations from 12-channel PSG signals (EEG, EOG, EMG, ECG, respiratory).
//!
//! ## Quick start
//!
//! ```rust,ignore
//! use osf_rs::{OsfEncoder, ModelConfig};
//!
//! let (encoder, _ms) = OsfEncoder::<B>::load_with_config(
//!     ModelConfig::default(),
//!     Path::new("osf_backbone.safetensors"),
//!     device,
//! )?;
//!
//! let batch = osf_rs::build_batch::<B>(signal, 12, 1920, &device);
//! let emb = encoder.run_batch(&batch)?;
//! // emb.cls_emb: [768] — global epoch-level representation
//! // emb.patch_embs: [90 * 768] — local patch representations
//! ```

pub mod config;
pub mod data;
pub mod encoder;
pub mod model;
pub mod weights;

// Flat re-exports
pub use encoder::OsfEncoder;
pub use config::{ModelConfig, PSG_CHANNELS, NUM_PSG_CHANNELS, SAMPLE_RATE, EPOCH_SEC, EPOCH_SAMPLES};
pub use data::{InputBatch, EpochEmbedding, EncodingResult, build_batch, channel_wise_normalize};