StimVision: smartphone video kinematics to optimize DBS programming in Parkinson's disease.
The 2 matches
- [1] § Methods › Per‑patient ranking via dynamic weighting ↔ StimVision/dbs_analysis_library/analysis.py, lines 39–110 · score 0.56 · Dynamically Weighted Improvement, Responsiveness scores, workflow, shrinkage, Raw, ranked
- [2] § Methods › Per‑patient ranking via dynamic weighting ↔ StimVision/dbs_analysis_library/analysis.py, lines 39–110 · score 0.54 · uniform weights, blends, shrinkage, Rankings, dynamic
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 110 lines · 4.8 KB · no license · 2 matches
- #!/usr/bin/env python3
- # -*- coding: utf-8 -*-
- """
- Core analysis functions for calculating improvement, dynamic weights, and
- ranking of DBS settings based on kinematic data.
- """
- import pandas as pd
- import numpy as np
- from .processing import sort_condition_key
- from .utils import parameter_directions
- def aggregate_task_data_by_hand(data_for_task, hand):
- """
- Aggregates kinematic data from multiple CSVs for a specific hand,
- averaging values across trials for each condition.
- """
- aggregated_data = {}
- if not isinstance(data_for_task, dict):
- return pd.DataFrame()
- for condition, hand_dict in data_for_task.items():
- if isinstance(hand_dict, dict) and hand in hand_dict:
- series_list = []
- for df in hand_dict[hand]:
- if isinstance(df, pd.DataFrame) and 'Attribute' in df.columns and 'Value' in df.columns:
- s = pd.to_numeric(df['Value'], errors='coerce')
- s.index = df['Attribute']
- series_list.append(s)
- if series_list:
- aggregated_data[condition] = pd.concat(series_list, axis=1).mean(axis=1)
- if not aggregated_data:
- return pd.DataFrame()
- summary_df = pd.DataFrame(aggregated_data).T
- summary_df = summary_df.reindex(sorted(summary_df.index, key=sort_condition_key)).dropna(axis=0, how='all')
- return summary_df
- def perform_full_hand_analysis(data_by_condition, hand, baseline, shrinkage_lambda=0.1):
- """
- Performs the complete analysis pipeline for a single hand using a robust,
- integrated workflow with regularized dynamic weighting.
- Args:
- data_by_condition (dict): Nested dict of data: {condition: {hand: [DataFrames]}}.
- hand (str): 'Left' or 'Right'.
- baseline (str): The name of the baseline condition (e.g., "Med Off - DBS Off").
- shrinkage_lambda (float): Regularization parameter (0 to 1). A small value
- like 0.1 (default) blends data-driven weights with
- uniform weights to prevent over-fitting to noise.
- Returns:
- dict: A dictionary containing all intermediate and final analysis results.
- """
- summary_df = aggregate_task_data_by_hand(data_by_condition, hand)
- results = {
- 'summary_df': summary_df, 'improvement_df': pd.DataFrame(),
- 'responsiveness_scores': pd.Series(dtype=float), 'final_dynamic_weights': pd.Series(dtype=float),
- 'dynamic_scores': pd.Series(dtype=float),
- 'dynamic_ranking_results': {'ranked_names': [], 'ranked_scores': []}
- }
- if summary_df.empty or baseline not in summary_df.index:
- print(f"Warning: No summary data for hand '{hand}' or baseline '{baseline}' not found. Aborting analysis for this hand.")
- return results
- on_conditions = summary_df.index.drop(baseline, errors='ignore')
- if on_conditions.empty:
- print(f"Warning: No 'ON' conditions found to compare against baseline for hand '{hand}'.")
- return results
- baseline_series = summary_df.loc[baseline]
- raw_change_df = summary_df.loc[on_conditions].subtract(baseline_series, axis=1)
- improvement_df = raw_change_df.copy()
- for param, direction in parameter_directions.items():
- if param in improvement_df.columns and direction == 'lower':
- improvement_df[param] *= -1
- results['improvement_df'] = improvement_df
- responsiveness_scores = improvement_df.std().fillna(0)
- responsiveness_scores = responsiveness_scores[responsiveness_scores > 1e-9] # Filter non-variable parameters.
- results['responsiveness_scores'] = responsiveness_scores
- if responsiveness_scores.empty or responsiveness_scores.sum() == 0:
- print(f"Warning: No responsive parameters found for hand '{hand}'. Cannot calculate dynamic scores.")
- return results
- # Apply regularized dynamic weighting.
- data_driven_weights = responsiveness_scores / responsiveness_scores.sum()
- n_responsive_params = len(data_driven_weights)
- uniform_weights = pd.Series(1.0 / n_responsive_params, index=data_driven_weights.index)
- final_dynamic_weights = (1 - shrinkage_lambda) * data_driven_weights + shrinkage_lambda * uniform_weights
- results['final_dynamic_weights'] = final_dynamic_weights
- # Compute the final Dynamically Weighted Improvement Score (DWIS).
- common_params = improvement_df.columns.intersection(final_dynamic_weights.index)
- dynamic_scores = improvement_df[common_params].dot(final_dynamic_weights[common_params])
- results['dynamic_scores'] = dynamic_scores
- # Rank conditions by DWIS.
- ranked_scores = dynamic_scores.sort_values(ascending=False)
- results['dynamic_ranking_results'] = {
- 'ranked_names': ranked_scores.index.tolist(),
- 'ranked_scores': ranked_scores.values.tolist(),
- }
- return results
analysis.py at commit 376f189, no license · at the source
Overview
- Department of Neurology, University of Würzburg,Würzburg, Germany
- Movement Estimation and Analysis Laboratory, Department of Applied Physiology and Kinesiology, University of Florida,Gainesville, FL USA
Abstract
Deep brain stimulation (DBS) improves motor function in Parkinson’s disease, yet programming remains labor-intensive and largely subjective. We evaluated a smartphone video-based kinematic framework (StimVision) for objective, within-session optimization of DBS settings and characterization of therapeutic motor signatures. Fifteen patients with subthalamic DBS performed repetitive hand opening–closing while multiple stimulation programs were tested in the medication-off state. Markerless pose estimation from 60 fps smartphone video generated 23 quantitative kinematic features. A patient-specific Dynamically Weighted Improvement Score (DWIS) ranked programs by composite improvement relative to DBS-off. The framework identified a unique optimal program for each patient, with robust ranking stability. Group-level improvements at the optimal setting were dominated by gains in speed and rhythm metrics, including mean velocity, closing speed, and movement frequency, alongside reduced intra-sequence decay. Sparse principal component analysis revealed three kinematic domains—Movement Speed, Movement Consistency, and Rhythm & Timing. Structural comparison with a levodopa cohort demonstrated substantial overlap in speed and consistency domains but divergence in timing-related features. Smartphone-based kinematics enable objective DBS optimization and provide a shared quantitative framework for comparing electrical and pharmacological therapies.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.
Flolan2/StimVision_data
376f189775f0657d5a9edcf4a3d2c42dcd633d62, 24 February 2026Availability: 1 check, the latest on 29 September 2026: the link answers
- 29 September 2026: the link answers
5 files
- StimVision/
dbs_analysis_library/ , Python, 110 lines, 2 matchesanalysis.py - StimVision/
dbs_analysis_library/ , Python, 102 linesprocessing.py - StimVision/
dbs_analysis_library/ , Python, 46 linesutils.py - StimVision/
dbs_analysis_library/ , Python, 137 linesvisualization.py - StimVision/
ismr_analyzer.py , Python, 241 lines
Code availability
The core VisionMD computer vision pipeline used for feature extraction is open-source and available at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 5 scripts, each with its path and the digest of its content;
- 2 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data availability
The derived kinematic datasets and analysis matrices generated during the current study are publicly available at: https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 29 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 3 keywords, 2 funders, 11 references.
Cite
This paper
Lange, F., Köberle, P., Adaçay, G., Guarin, D. L., Volkmann, J., Peach, R., & Reich, M. M. (2026). StimVision: smartphone video kinematics to optimize DBS programming in Parkinson's disease. NPJ Parkinson's disease, 12(1), 100. https://
BibTeX
@article{lange2026stimvi
author = {Lange, Florian and Köberle, Philipp and Adaçay, Gamze and Guarin, Diego L. and Volkmann, Jens and Peach, Robert and Reich, Martin M.},
title = {{StimVision: smartphone video kinematics to optimize DBS programming in Parkinson's disease}},
journal = {NPJ Parkinson's disease},
year = {2026},
month = apr,
volume = {12},
number = {1},
pages = {100},
publisher = {Nature Publishing Group},
issn = {2373-8057},
doi = {10.1038/
url = {https://
pmid = {42009683},
pmcid = {PMC13096112}
}
RIS
TY - JOUR
AU - Lange, Florian
AU - Köberle, Philipp
AU - Adaçay, Gamze
AU - Guarin, Diego L.
AU - Volkmann, Jens
AU - Peach, Robert
AU - Reich, Martin M.
TI - StimVision: smartphone video kinematics to optimize DBS programming in Parkinson's disease
T2 - NPJ Parkinson's disease
J2 - NPJ Parkinsons Dis
PY - 2026
DA - 2026/
VL - 12
IS - 1
SP - 100
SN - 2373-8057
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "StimVision: smartphone video kinematics to optimize DBS programming in Parkinson's disease",
"container-title": "NPJ Parkinson's disease",
"author": [
{
"family": "Lange",
"given": "Florian"
},
{
"family": "Köberle",
"given": "Philipp"
},
{
"family": "Adaçay",
"given": "Gamze"
},
{
"family": "Guarin",
"given": "Diego L."
},
{
"family": "Volkmann",
"given": "Jens"
},
{
"family": "Peach",
"given": "Robert"
},
{
"family": "Reich",
"given": "Martin M."
}
],
"container-title-short":
"volume": "12",
"issue": "1",
"page": "100",
"DOI": "10.1038/
"PMID": "42009683",
"PMCID": "PMC13096112",
"ISSN": "2373-8057",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
20
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1016/j.ebiom.2026.106293 [code]
- Dynamic neural states underpin motor symptom severity in Parkinson's disease: a longitudinal analysis of chronic cortico-subthalamic nucleus recordings.Journal: EBioMedicineIn common: seaborn, pandas, Matplotlib, 1 other tool, Parkinson's, 1 reference
- [2] doi:10.1038/s41591-026-04432-4 [code]
- Activity-dependent adaptive deep brain stimulation improves gait in Parkinson's disease.Journal: Nature medicineIn common: Matplotlib, NumPy, Parkinson's, clinical / translational, 1 reference
- [3] doi:10.1038/s43856-026-01606-6 [code]
- Validation of remote multimodal AI screening for Parkinson disease across diverse settings.Journal: Communications medicineIn common: seaborn, pandas, Matplotlib, 1 other tool, Parkinson's, clinical / translational
- [4] doi:10.1002/ana.78206 [code]
- Multimodal Image Guidance in Subthalamic Deep Brain Stimulation for Parkinson's Disease.Journal: Annals of neurologyIn common: seaborn, pandas, Matplotlib, 1 other tool, Parkinson's, clinical / translational
- [5] doi:10.1038/s41531-026-01380-1 [code]
- Identifying maximal beta power from directional subthalamic local field potentials in Parkinson's disease.Journal: NPJ Parkinson's diseaseIn common: seaborn, pandas, Matplotlib, 1 other tool, Parkinson's, clinical / translational
- [6] doi:10.1038/s41598-026-61801-2 [code]
- Detection of early-stage Parkinson's disease using wearable sensors at multiple body locations and convolutional neural networks.Journal: Scientific reportsIn common: pandas, Matplotlib, NumPy, Parkinson's, other, clinical / translational
- [7] doi:10.3390/bioengineering13070773 [code]
- From API to Action: A Multi-Model Comparison of OpenAI, Anthropic, Google, and Meta LLMs for Clinical Trial Data Extraction.Journal: Bioengineering (Basel, Switzerland)In common: pandas, Matplotlib, NumPy, Parkinson's, other, clinical / translational
- [8] doi:10.1126/sciadv.aed2952 [code]
- Activation of transposable elements is linked to a region- and cell type-specific interferon response in Parkinson's disease.Journal: Science advancesIn common: seaborn, pandas, Matplotlib, 1 other tool, Parkinson's
- [9] doi:10.1002/cns.71147 [code]
- Unveiling the Distinctive Brain Functional Dynamics Between Parkinson's Disease and Progressive Supranuclear Palsy.Journal: CNS neuroscience & therapeuticsIn common: seaborn, pandas, Matplotlib, 1 other tool, Parkinson's
- [10] doi:10.1093/braincomms/fcag328 [code]
- Subthalamic stimulation modulates working memory-related cortical dynamics in Parkinson's disease.Journal: Brain communicationsIn common: seaborn, pandas, Matplotlib, 1 other tool, Parkinson's
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 5 scripts, and 2 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:0e27941e4c29247b…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
