josebeo2016 / biosegment

The supporting project for BTS-E
0 stars 0 forks source link

Is it possible to map each encoding value back to time? #4

Closed HildaNya closed 1 month ago

HildaNya commented 1 month ago

Hi, I'm trying to use the encoding values back in the time domain, but am having trouble finding a mathematical relationship. For example, if I have vector that looks like [0 1 2 2 2....], how many seconds does each of the 0/1/2's represent? In other words, if I'm interested in the duration of a breath (1), how would I be able to calculate that? I looked through hop sizes and window sizes in hparams.py, but can't seem to find a parameter that's suitable for the conversion.

josebeo2016 commented 1 month ago

Hello, Since we use windowing with window size, and hop size (the overlap), it can be calculated the total time for a frame or couple of frame. Please check the “ indices_to_time” function in the notebook for your reference.