DAM TFLite Dynamic-Range Quantized Weights

This repository publishes a dynamic-range quantized TensorFlow Lite version of the Kintsugi Health Depression-Anxiety Model (DAM): KintsugiHealth/dam.

Only the converted TFLite weights and conversion/evaluation metadata are published here. The original PyTorch checkpoint, original training data, and DAIC-WOZ audio are not included.

Relationship to the Original Model

This is a derivative conversion of KintsugiHealth/dam for smaller on-device runtime deployment. For the original model card, intended use, limitations, clinical context, and references, see:

This model card intentionally separates the converted-weight details from the original DAM model card. The original clinical and safety limitations still apply.

Files

File Description
dam_features_scores_dynamic_range.tflite Dynamic-range quantized TFLite model
dam_features_scores_dynamic_range.metadata.json Input/output metadata and thresholds
evaluation_results.json Machine-readable size/accuracy summary
EVALUATION.md Human-readable evaluation summary
NOTICE Derivative-work and original-model attribution
LICENSE Apache License 2.0

Input / Output

The model expects precomputed DAM/Whisper log-mel features, not raw audio.

Input:

dtype: float32
shape: [1, 80, 3000]

Output:

dtype: float32
shape: [2]
order: [depression_score, anxiety_score]

The app/runtime should perform the same preprocessing as DAM's featex.py:

  1. Load mono audio and resample to 16 kHz.
  2. Remove DC offset and normalize amplitude to [-1, 1].
  3. Pad/split audio into 30-second chunks.
  4. Run Whisper log-mel feature extraction.
  5. Apply DAM log-mel energy rescaling.
  6. Run this TFLite model per chunk and aggregate scores as needed.

Quantization Type

This is dynamic-range quantization:

  • input remains float32
  • output remains float32
  • weights are quantized/compressed internally by TensorFlow Lite

No preprocessing or postprocessing dtype changes are required relative to the fp32 TFLite model.

Size and Accuracy

Model Size Relative
Legacy fp32 TFLite rebuild 695.64 MiB 1.00x
Dynamic-range TFLite 184.98 MiB 0.266x

The dynamic-range model is approximately 73.4% smaller / 3.76x smaller.

Evaluation on 20 DAIC-WOZ participant-only audio files showed:

Task MAE vs official PyTorch chunk mean Max AE Severity agreement
Depression 0.01580 0.04136 20/20
Anxiety 0.01580 0.03887 20/20

See EVALUATION.md and evaluation_results.json for details.

Runtime Download Example

from huggingface_hub import hf_hub_download

model_path = hf_hub_download(
    repo_id="pat229988/dam-tflite-dynamic-range",
    filename="dam_features_scores_dynamic_range.tflite",
)
print(model_path)

Loading with TensorFlow Lite / LiteRT

import numpy as np

try:
    from ai_edge_litert.interpreter import Interpreter
except Exception:
    import tensorflow as tf
    Interpreter = tf.lite.Interpreter

interpreter = Interpreter(model_path="dam_features_scores_dynamic_range.tflite")
interpreter.allocate_tensors()

input_details = interpreter.get_input_details()[0]
output_details = interpreter.get_output_details()[0]

# features shape: [1, 80, 3000], dtype float32
features = np.zeros((1, 80, 3000), dtype=np.float32)

interpreter.set_tensor(input_details["index"], features)
interpreter.invoke()
scores = interpreter.get_tensor(output_details["index"]).reshape(-1)

depression_score, anxiety_score = scores.tolist()

Thresholds

The metadata file includes the original DAM thresholds:

{
  "depression": [-0.6699, -0.2908],
  "anxiety": [-0.7939, -0.2173, 0.1521]
}

Safety / Clinical Limitations

  • This model is not intended for diagnosis or self-diagnosis without clinical oversight.
  • Performance may degrade with noisy audio, multiple speakers, non-English speech, or recordings outside intended conditions.
  • This repository provides a conversion-fidelity evaluation, not an independent clinical validation of the quantized model.

Attribution

Original DAM model by Kintsugi Health:

Downloads last month
16
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for pat229988/dam-tflite-dynamic-range

Finetuned
(1)
this model