Tools for reading, processing, and writing CUWB data
Project description
process_cuwb_data
Tools for reading, processing, and writing CUWB data
Steps
-
Copy
.env.template
to.env
and update variables -
Install packages
just build
You may need to install pybind11
brew install pybind11
And you may need to manually install cython and numpypip install numpy cython pythran
-
Download/create ground_truth_tray_carry.csv to
./downloads/ground_truth_tray_carry.csv
-
Generate pickled groundtruth features dataframe from ground_truth_tray_carry.csv
process_cuwb_data \
generate-tray-carry-groundtruth \
--groundtruth-csv ./downloads/ground_truth_tray_carry.csv
- Train and pickle Tray Carry Detection Model using pickled groundtruth features
process_cuwb_data \
train-tray-carry-model \
--groundtruth-features ./output/groundtruth/2021-05-13T12:53:26_tray_carry_groundtruth_features.pkl
- Infer Tray Interactions using pickled Tray Carry Detection Model
process_cuwb_data \
infer-tray-interactions \
--environment greenbrier \
--start 2021-04-20T9:00:00-0500 \
--end 2021-04-20T9:05:00-0500 \
--tray-carry-model ./output/models/2021-05-13T14:49:32_tray_carry_model.pkl
Other CLI Commands/Options
Export pickled UWB data
Working with Honeycomb's UWB endpoint can be painfully slow. For that reason there is an option to export pickled UWB data and provide that to subsequent inference commands.
process_cuwb_data \
fetch-cuwb-data \
--environment greenbrier \
--start 2021-04-20T9:00:00-0500 \
--end 2021-04-20T9:05:00-0500
Use UWB export to run Tray Interaction Inference
process_cuwb_data \
infer-tray-interactions \
--environment greenbrier \
--start 2021-04-20T9:00:00-0500 \
--end 2021-04-20T9:05:00-0500 \
--tray-carry-model ./output/models/2021-05-13T14:49:32_tray_carry_model.pkl \
--cuwb-data ./output/uwb_data/uwb-greenbrier-20210420-140000-20210420-140500.pkl
Supply Pose Track Inference to Tray Interaction Inference
Use Pose Tracks when determining nearest person to tray carry events.
Pose Inferences need to be sourced in a local directory. The pose directory can be supplied via CLI options.
process_cuwb_data \
infer-tray-interactions \
--environment greenbrier \
--start 2021-04-20T9:00:00-0500 \
--end 2021-04-20T9:05:00-0500 \
--tray-carry-model ./output/models/2021-05-13T14:49:32_tray_carry_model.pkl \
--cuwb-data ./output/uwb_data/uwb-greenbrier-20210420-140000-20210420-140500.pkl \
--pose-inference-id 3c2cca86ceac4ab1b13f9f7bfed7834e
Development
MacOS (Monterey)
-
Install pyenv:
brew install pyenv
-
Create a 3.x venv:
pyenv virtualenv 3.x.x wf-process-cuwb-data
-
Set ENV
This was helpful after the transition from macOS X to macOS 11. As packages evolve, this may not be needed depending on exact Mac version and python version. e.g. macOS 12 with Python 3.10 doesn't require the env var
export SYSTEM_VERSION_COMPAT=1
-
Install scipy dependencies:
brew install openblas lapack pythran pybind11
export OPENBLAS=$(brew --prefix openblas) export CFLAGS="-falign-functions=8 ${CFLAGS}"
-
Install python libraries
pip install numpy cython pythran
-
Install add'l packages:
just install-dev
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for wf-process-cuwb-data-1.5.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 050a7d3d5925dff81e1c5d7ec831788528e86b7aa90da9c3395b3661b331a5f2 |
|
MD5 | 1626a00611e5f91a6a1635e27cada27a |
|
BLAKE2b-256 | fac848c30a27d21aa2b49ac04e2f88b46d9e5f3f0b560359fb652b7705e37c46 |
Hashes for wf_process_cuwb_data-1.5.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95aed5f625583d01dc16ef479388353172501eef5c2fc8e3c9b88ca25b14f365 |
|
MD5 | 8b01d919ab8fb392bdb9e04c341e83d7 |
|
BLAKE2b-256 | 3e96c62faa37babfdf0c4cfb090957677cb57f3f019b535b79312f57762131b5 |