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

"ValueError: window must be non-negative" raised during Extract and Embed features part #74

Open
frr665 opened this issue Apr 14, 2023 · 1 comment

Comments

@frr665
Copy link

frr665 commented Apr 14, 2023

Hi,

I'm new on B-SOID and I ran across the following error message while trying to extract and embed features :

ValueError: window must be non-negative
Traceback:
File "c:\users\x\anaconda3\envs\bsoid_v2\lib\site-packages\streamlit\script_runner.py", line 332, in _run_script
    exec(code, module.__dict__)
File "C:\Users\x\B-SOID\bsoid_app.py", line 46, in <module>
    extractor.main()
File "C:\Users\x\B-SOID\bsoid_app\extract_features.py", line 192, in main
    self.compute()
File "C:\Users\x\B-SOID\bsoid_app\extract_features.py", line 84, in compute
    disp_boxcar.append(boxcar_center(disp_r[:, l], window))
File "C:\Users\x\B-SOID\bsoid_app\bsoid_utilities\likelihoodprocessing.py", line 16, in boxcar_center
    moving_avg = np.array(a1.rolling(window=n, min_periods=1, center=True).mean())
File "c:\users\x\anaconda3\envs\bsoid_v2\lib\site-packages\pandas\core\generic.py", line 10551, in rolling
    closed=closed,
File "c:\users\x\anaconda3\envs\bsoid_v2\lib\site-packages\pandas\core\window\rolling.py", line 169, in __init__
    self.validate()
File "c:\users\x\anaconda3\envs\bsoid_v2\lib\site-packages\pandas\core\window\rolling.py", line 1965, in validate
    raise ValueError("window must be non-negative")

I had no issue during the preprocessing part. I used tracking data in .h5 format from SLEAP 1.3.0. pose estimation software. I tried with data from 10fps and 25fps videos and had the same error message.
Does anyone have an idea on what went wrong and how to fix it ?

Thanks a lot,
Hugo

I have attached a package list of the anaconda environment I used if you want to check it :
package-list.txt

@gregvoidman
Copy link

were you able to resolve this? I'm having the same issue

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

2 participants