Skip to content

Conversation

@FSAFTik
Copy link
Contributor

@FSAFTik FSAFTik commented Nov 10, 2025

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

@github-actions github-actions bot added the enhancement New feature or request label Nov 10, 2025
Copy link
Contributor

Copilot AI left a 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 SnapData message class to represent snap events with frame, detections, tags, and metadata
  • Replaced SnapsProducer nodes with simpler SnapsUploader node that receives SnapData messages
  • Updated depthai dependency version specification from >=3.0.0rc2,<=3.0.0 to >=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):
Copy link

Copilot AI Nov 10, 2025

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.

Suggested change
def process(self, snap: dai.Buffer):
def process(self):
snap = self.get_input() # Assumes BaseHostNode provides a method to get the next input

Copilot uses AI. Check for mistakes.
updated dockstirng

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants