Skip to content

Add setup script and JSON pose output for CSI pipeline#46

Open
nbschultz97 wants to merge 4 commits intomainfrom
codex/add-auto-check-script-and-integrate-outputs
Open

Add setup script and JSON pose output for CSI pipeline#46
nbschultz97 wants to merge 4 commits intomainfrom
codex/add-auto-check-script-and-integrate-outputs

Conversation

@nbschultz97
Copy link
Owner

Summary

  • add setup_and_run.sh to bootstrap environment, install FeitCSI, verify hardware, and launch app
  • integrate optional WiPose estimator and standardize JSON output in pipeline
  • document hardware requirements and one-step usage in README

Testing

  • pytest

https://chatgpt.com/codex/tasks/task_e_68c32b4944b4832890eb6f2df9c20b45

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines +43 to +47
try:
tensor = np.asarray(amps, dtype="float32")
tensor = tensor.reshape(1, *tensor.shape)
pose, conf = self.model.predict(tensor)
return str(pose), float(conf)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Convert amplitude window to torch tensor before calling WiPose

The new PoseEstimator.predict forwards the flattened NumPy amplitudes directly into self.model.predict. WiPose is a PyTorch model and its predict helper expects a torch.Tensor (or something it can call .to() on) wrapped in a no_grad context. Passing a plain NumPy array will typically raise inside WiPose and trigger the broad except, so the method always falls back to ("unknown", 0.0) even when WiPose is installed. This means the advertised pose output never materialises. Convert the array with torch.from_numpy(...).unsqueeze(0) and call the model under torch.no_grad() so real predictions are returned.

Useful? React with 👍 / 👎.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codex fix comments

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

  • Flattened the input amplitude array and wrapped WiPose inference in a torch.no_grad() block, converting the array to a tensor so predictions return correctly when WiPose is available csi_node/pose.pyL46-L49

Testing

  • pytest

View task →

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant