LIVE RESEARCH PROTOTYPENOT FOR CLINICAL DIAGNOSIS

06 / Code

Built to be followed.

The project keeps its experimental seams visible: preprocessing, training, evaluation, and inference are separate surfaces.

DOCUMENTATION MODE / FRONTEND EXPLAINERNO MODEL EXECUTION

COPD Detection Lab

Read the model
as a story.

Follow the uploaded Python project from respiratory audio to a documented prediction path. This is an explainer for the system—not a clinical tool and not a live inference runtime.

dataset.pyimplemented
01class RespiratoryDataset(Dataset):02    def __init__(self, root_dir, transform=None):03        self.samples = build_sample_index(root_dir)04        self.transform = transform05 06    def __getitem__(self, index):07        path, label = self.samples[index]08        audio, sr = load_audio(path)09        return audio, label
Python / project artifactExcerpt for explanation
Dataset / what happens here

Maps respiratory recordings and labels into a reproducible dataset interface.

INPUTICBHI audio + annotations
OUTPUTPatient-aware samples

Why this matters Patient-aware indexing is the foundation for trustworthy evaluation.

Architecture notes

The design decisions
behind the code.

01

Patient split

Keep recordings from one patient in one fold to reduce leakage.

02

Spectral view

Mel and MFCC features make breathing texture visible to the encoder.

03

Temporal memory

BiLSTM reads how respiratory events evolve across the clip.

04

Attention readout

The model can weight the most informative moments before classification.

!

Documentation boundaryThis frontend presents the supplied code as an educational research artifact. It does not run the model, validate medical claims, or provide a diagnosis.

Research artifactInteractive figure
Two-stage network trainingClick to inspect · Esc to close
02

Notebook

Explore feature extraction and model behavior.

03

Inference API

A small interface for repeatable predictions.

SHWASA · RESPIRATORY ACOUSTIC INTELLIGENCEOPEN METHODS / INSPECTABLE OUTPUTS