Skip to content

Conversation

@tadeas0
Copy link
Contributor

@tadeas0 tadeas0 commented Oct 17, 2025

Purpose

Improve tiling node performance. Reduce the amount of data transfered between host and device. Offload image manipulation operations to ImgManip nodes.

Specification

https://app.clickup.com/t/86c5u3ne1

Dependencies & Potential Impact

None / not applicable

Deployment Plan

None / not applicable

Testing & Validation

Tested on RVC4 host and standalone mode. Does not work on RVC2 due to missing bindings in Script node.

Notes

This PR contains a workaround for a bug in DepthAIv3

@github-actions github-actions bot added the enhancement New feature or request label Oct 17, 2025
@codecov-commenter
Copy link

codecov-commenter commented Oct 17, 2025

❌ 5 Tests Failed:

Tests completed Failed Passed Skipped
326 5 321 4
View the top 3 failed test(s) by shortest run time
tests\unittests\test_nodes\test_host_nodes\test_tiles_patcher_node.py::unittests::test_nodes::test_host_nodes::test_tiles_patcher_node::test_build_valid
Stack Traces | 0.001s run time
@pytest.fixture
    def patcher():
>       return TilesPatcher()

tests\unittests\test_nodes\test_host_nodes\test_tiles_patcher_node.py:21: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\utils\nodes\mocks\node.py:8: in __call__
    cls.__init__(inst, *args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <depthai_nodes.node.tiles_patcher.TilesPatcher object at 0x000001B1A85CD5E0>

    def __init__(self) -> None:
        """Initializes the TilesPatcher node, sets default thresholds for confidence and
        IOU, and initializes buffers for tile processing."""
        super().__init__()
        self._pipeline = self.getParentPipeline()
        self._logger = get_logger(self.__class__.__name__)
        self.name = "TilesPatcher"
        self.tile_manager = None
        self.conf_thresh = 0.3
        self.iou_thresh = 0.4
    
>       self._nn_input = self.createInput()
E       AttributeError: 'TilesPatcher' object has no attribute 'createInput'

depthai_nodes\node\tiles_patcher.py:68: AttributeError
tests\unittests\test_nodes\test_host_nodes\test_tiles_patcher_node.py::unittests::test_nodes::test_host_nodes::test_tiles_patcher_node::test_process_accumulation
Stack Traces | 0.001s run time
@pytest.fixture
    def patcher():
>       return TilesPatcher()

tests\unittests\test_nodes\test_host_nodes\test_tiles_patcher_node.py:21: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\utils\nodes\mocks\node.py:8: in __call__
    cls.__init__(inst, *args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <depthai_nodes.node.tiles_patcher.TilesPatcher object at 0x000001B1A85E1CA0>

    def __init__(self) -> None:
        """Initializes the TilesPatcher node, sets default thresholds for confidence and
        IOU, and initializes buffers for tile processing."""
        super().__init__()
        self._pipeline = self.getParentPipeline()
        self._logger = get_logger(self.__class__.__name__)
        self.name = "TilesPatcher"
        self.tile_manager = None
        self.conf_thresh = 0.3
        self.iou_thresh = 0.4
    
>       self._nn_input = self.createInput()
E       AttributeError: 'TilesPatcher' object has no attribute 'createInput'

depthai_nodes\node\tiles_patcher.py:68: AttributeError
tests\unittests\test_nodes\test_host_nodes\test_tiling_node.py::unittests::test_nodes::test_host_nodes::test_tiling_node::test_build
Stack Traces | 0.001s run time
@pytest.fixture
    def tiling():
>       return Tiling()

tests\unittests\test_nodes\test_host_nodes\test_tiling_node.py:26: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\utils\nodes\mocks\node.py:8: in __call__
    cls.__init__(inst, *args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <depthai_nodes.node.tiling.Tiling object at 0x000001B1A85CA580>

    def __init__(self) -> None:
        """Initializes the Tiling node, setting default attributes like overlap, grid
        size, and tile positions."""
        super().__init__()
        self._logger = get_logger(self.__class__.__name__)
    
        self._pipeline = self.getParentPipeline()
    
        self.name = "Tiling"
    
>       self.cropper_image_manip = self._pipeline.create(dai.node.ImageManip)
E       AttributeError: 'NoneType' object has no attribute 'create'

depthai_nodes\node\tiling.py:63: AttributeError
tests\unittests\test_nodes\test_host_nodes\test_tiling_node.py::unittests::test_nodes::test_host_nodes::test_tiling_node::test_build_global_detection
Stack Traces | 0.001s run time
@pytest.fixture
    def tiling():
>       return Tiling()

tests\unittests\test_nodes\test_host_nodes\test_tiling_node.py:26: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\utils\nodes\mocks\node.py:8: in __call__
    cls.__init__(inst, *args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <depthai_nodes.node.tiling.Tiling object at 0x000001B1A85CCBB0>

    def __init__(self) -> None:
        """Initializes the Tiling node, setting default attributes like overlap, grid
        size, and tile positions."""
        super().__init__()
        self._logger = get_logger(self.__class__.__name__)
    
        self._pipeline = self.getParentPipeline()
    
        self.name = "Tiling"
    
>       self.cropper_image_manip = self._pipeline.create(dai.node.ImageManip)
E       AttributeError: 'NoneType' object has no attribute 'create'

depthai_nodes\node\tiling.py:63: AttributeError
tests\unittests\test_nodes\test_host_nodes\test_tiling_node.py::unittests::test_nodes::test_host_nodes::test_tiling_node::test_process
Stack Traces | 0.001s run time
@pytest.fixture
    def tiling():
>       return Tiling()

tests\unittests\test_nodes\test_host_nodes\test_tiling_node.py:26: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\utils\nodes\mocks\node.py:8: in __call__
    cls.__init__(inst, *args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <depthai_nodes.node.tiling.Tiling object at 0x000001B1A85A1CA0>

    def __init__(self) -> None:
        """Initializes the Tiling node, setting default attributes like overlap, grid
        size, and tile positions."""
        super().__init__()
        self._logger = get_logger(self.__class__.__name__)
    
        self._pipeline = self.getParentPipeline()
    
        self.name = "Tiling"
    
>       self.cropper_image_manip = self._pipeline.create(dai.node.ImageManip)
E       AttributeError: 'NoneType' object has no attribute 'create'

depthai_nodes\node\tiling.py:63: AttributeError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Copy link
Collaborator

@kkeroo kkeroo left a comment

Choose a reason for hiding this comment

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

Lets remove failing tests for Tiling and TilesPatcher, I will add them in the separate PR as they will be running in the E2E pipeline

@tadeas0 tadeas0 merged commit 6a580d8 into main Oct 24, 2025
10 of 12 checks passed
@tadeas0 tadeas0 deleted the feat/tiling-performance-improvement branch October 24, 2025 10:30
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