I see the information for running multiple files at https://github.com/OxWearables/stepcount?tab=readme-ov-file#processing-multiple-files, but it would be great if you can pass in multiple files directly.
The benefits:
- Downloading the model only once. Ideally people are using an explicit model path or the torch cache path (only available for SSL, not RF), but that may slow things down.
- Loading the model only once - this is the big speedup. Even with a cached model, the model must load every time in stepcount, which is a slowdown. If the lines
are moved then a loop can only add
sample_rate, window_len, wd.device, and wd.sample_rate to the model as needed for the specific file. The process would go: load model, add specific attributes, loop over data to reading/getting info, add to model, then predict_from_frame and summarize.
I see the information for running multiple files at https://github.com/OxWearables/stepcount?tab=readme-ov-file#processing-multiple-files, but it would be great if you can pass in multiple files directly.
The benefits:
stepcount/src/stepcount/stepcount.py
Line 67 in 58797b1
sample_rate,window_len,wd.device, andwd.sample_rateto the model as needed for the specific file. The process would go: load model, add specific attributes, loop over data to reading/getting info, add to model, thenpredict_from_frameand summarize.