-
Notifications
You must be signed in to change notification settings - Fork 2
Feat/new snaps producer #252
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
base: main
Are you sure you want to change the base?
Conversation
This reverts commit fb71195.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR replaces the SnapsProducer and SnapsProducerFrameOnly nodes with a new SnapsUploader node that uses a cleaner message-passing architecture. Instead of directly sending snaps via EventsManager, the new design introduces a SnapData message class to encapsulate snap information, which is then processed by the SnapsUploader node.
Key changes:
- Introduced
SnapDatamessage class to represent snap events with frame, detections, tags, and metadata - Replaced
SnapsProducernodes with simplerSnapsUploadernode that receivesSnapDatamessages - Updated depthai dependency version specification from
>=3.0.0rc2,<=3.0.0to>=3.0.0.dev0,<3.1
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| depthai_nodes/message/snap_data.py | New message class for encapsulating snap data including frame, detections, tags, and extras |
| depthai_nodes/message/init.py | Exports the new SnapData message class |
| depthai_nodes/node/snaps_uploader.py | New host node that receives SnapData messages and uploads to DepthAI Hub Events API |
| depthai_nodes/node/init.py | Updated exports to replace SnapsProducer with SnapsUploader |
| depthai_nodes/node/snaps_producer.py | Removed old producer implementation |
| tests/unittests/test_messages/test_snap_data.py | Comprehensive tests for SnapData message class |
| tests/unittests/test_nodes/test_host_nodes/test_snaps_uploader_node.py | Tests for SnapsUploader node functionality |
| tests/unittests/test_nodes/test_host_nodes/test_snaps_producer_node.py | Removed tests for old producer nodes |
| requirements.txt | Updated depthai version range |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| self.link_args(snaps) | ||
| return self | ||
|
|
||
| def process(self, snap: dai.Buffer): |
Copilot
AI
Nov 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method requires 2 positional arguments, whereas overridden BaseHostNode.process requires 1.
| def process(self, snap: dai.Buffer): | |
| def process(self): | |
| snap = self.get_input() # Assumes BaseHostNode provides a method to get the next input |
updated dockstirng Co-authored-by: Copilot <[email protected]>
Purpose
Adds a SnapsUploader Node who handles sending snaps to the hub. Takes as input a buffer of new SnapData message who represents a complete snap. Basically a python wrapper for dai.EventsManager
Specification
Adds new node and message
Dependencies & Potential Impact
Depends on depthai=3.2.0 release
Deployment Plan
None / not applicable
Testing & Validation
Added unit tests for both node and message + tested by using in oak examples data-collection app