Skip to content

Latest commit

 

History

History
376 lines (342 loc) · 6.79 KB

basic-usage.md

File metadata and controls

376 lines (342 loc) · 6.79 KB
id title
basic-usage
Basic Usage

Prerequisites read

pip install opendbm

In this section, we are gonna show the basic instruction on how to get biomarker variable from OpenDBM API

from opendbm import Movement

# code below is how to access to other dbm groups
# from opendbm import FacialActivity, VerbalAcoustics, Speech
path = "movement_video_test.mp4"
#initiate the model
model = Movement()
#Feed input data to the model
model.fit(path)

After we processed the data with our model, now we can get all biomarker variables related to the Movement category

#Get facial tremor
tremor = model.get_facial_tremor()
tremor.to_dataframe().T
0
fac_features_mean_5 8.594771
fac_tremor_median_5 3.87593
fac_disp_median_5 0.728575
fac_corr_5 0.254649
fac_features_mean_12 3.719481
fac_tremor_median_12 2.806784
fac_disp_median_12 0.723145
fac_corr_12 0.456196
fac_features_mean_8 6.721486
fac_tremor_median_8 3.586131
fac_disp_median_8 0.825251
fac_corr_8 0.391167
fac_features_mean_48 2.860846
fac_tremor_median_48 2.174091
fac_disp_median_48 0.86145
fac_corr_48 0.646405
fac_features_mean_54 3.678142
fac_tremor_median_54 2.669815
fac_disp_median_54 0.886973
fac_corr_54 0.578275
fac_features_mean_28 0.0
fac_tremor_median_28 0.0
fac_disp_median_28 0.677184
fac_corr_28 1.0
fac_features_mean_51 0.765473
fac_tremor_median_51 0.54762
fac_disp_median_51 0.750383
fac_corr_51 0.897752
fac_features_mean_66 1.971278
fac_tremor_median_66 1.49907
fac_disp_median_66 0.938139
fac_corr_66 0.776121
fac_features_mean_57 2.70601
fac_tremor_median_57 2.019033
fac_disp_median_57 0.988482
fac_corr_57 0.713824
error_reason
##Get Eye Blink
eye_blink = model.get_eye_blink()
eye_blink.to_dataframe()
mov_blink_ear vid_dur fps mov_blinkframes mov_blinkdur dbm_master_url
0 0.124566 33.877313 29 19 0.655172 movement_video_test.mp4
1 0.125343 33.877313 29 49 1.034483 movement_video_test.mp4
2 0.108713 33.877313 29 120 2.448276 movement_video_test.mp4
3 0.097553 33.877313 29 169 1.689655 movement_video_test.mp4
4 0.111874 33.877313 29 241 2.482759 movement_video_test.mp4
5 0.077082 33.877313 29 328 3.000000 movement_video_test.mp4
6 0.124804 33.877313 29 387 2.034483 movement_video_test.mp4
7 0.082149 33.877313 29 506 4.103448 movement_video_test.mp4
8 0.083041 33.877313 29 550 1.517241 movement_video_test.mp4
9 0.148836 33.877313 29 687 4.724138 movement_video_test.mp4
10 0.099926 33.877313 29 734 1.620690 movement_video_test.mp4
11 0.083078 33.877313 29 809 2.586207 movement_video_test.mp4
12 0.124501 33.877313 29 847 1.310345 movement_video_test.mp4
13 0.149668 33.877313 29 931 2.896552 movement_video_test.mp4