Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi I want to know why you multiply "TrueLabel_bin[iidx:iidx + wsize - 1]" by 10 in func Truelabel2Trueframe #36

Open
Zyazz opened this issue Jul 1, 2020 · 0 comments

Comments

@Zyazz
Copy link

Zyazz commented Jul 1, 2020

`def Truelabel2Trueframe(TrueLabel_bin, wsize, wstep):
iidx = 0
Frame_iidx = 0
Frame_len = Frame_Length(TrueLabel_bin, wstep, wsize)
Detect = np.zeros([Frame_len, 1])
while 1:
if iidx + wsize <= len(TrueLabel_bin):
TrueLabel_frame = TrueLabel_bin[iidx:iidx + wsize - 1] * 10
else:
TrueLabel_frame = TrueLabel_bin[iidx:] * 10

    if (np.sum(TrueLabel_frame) >= wsize / 2):
        TrueLabel_frame = 1
    else:
        TrueLabel_frame = 0

    if (Frame_iidx >= len(Detect)):
        break

    Detect[Frame_iidx] = TrueLabel_frame
    iidx = iidx + wstep
    Frame_iidx = Frame_iidx + 1
    if (iidx > len(TrueLabel_bin)):
        break

return Detect`

I want to know why you multiply "TrueLabel_bin[iidx:iidx + wsize - 1]" by 10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant