I'm trying to build a simple hand estimation graph. Input is an image, and it consists of 2 nodes, 1 that estimates the hand bounding boxes from the image, and another that takes the bounding box JSON and the same input image to estimate the hand keypoints.
I'm having the following problem when using the output JSON from the hand detection node: the input image doesn't get correctly routed to the keypoint estimation node, as if it's not connected
here is what the code looks like
"""Daggr workflow connecting hand detection and keypoint estimation.
This requires running both apps on separate ports:
- Detection app: pixi run -e dev python tools/app_detection.py (defaults to 7860)
- Keypoint app: pixi run -e dev python tools/app_keypoint.py (port 7861)
Then run this script to launch the daggr graph:
- pixi run -e dev python tools/daggr_wilor.py
"""
from daggr import GradioNode, Graph
import gradio as gr
from gradio_rerun import Rerun
# Shared image input - both detection and keypoint nodes use this
shared_image = gr.Image(label="Input Image")
# Detection node - connects to hand detection app at port 7860
detection_node = GradioNode(
"http://localhost:7860",
api_name="/pred_fn",
name="Hand Detection Node",
inputs={"rgb_hw3": shared_image},
outputs={
"rrd": Rerun(streaming=True, visible=False),
"detection_json": gr.JSON(visible=True),
},
)
# Keypoint node - connects to keypoint estimation app at port 7861
# Uses same shared_image input + detection_json from upstream
keypoint_node = GradioNode(
"http://localhost:7861",
api_name="/pred_fn",
name="Keypoint Estimation Node",
inputs={
"rgb_hw3": shared_image, # Same shared input as detection
"detection_json": detection_node.detection_json, # Detection results
},
outputs={
"rrd": Rerun(streaming=True, visible=False),
"keypoint_json": gr.JSON(visible=True),
},
)
graph = Graph(
name="WiLor Hand Pose Pipeline",
nodes=[detection_node, keypoint_node],
)
if __name__ == "__main__":
graph.launch()
The strange bit is, if I instead of passing detection_node.detection_json to the keypoint estimation node, I just set a fixed value, such as
inputs={
"rgb_hw3": shared_image, # Same shared input as detection
"detection_json": "fixed value", # Detection results
},
Then things correctly get routed.

I'm trying to build a simple hand estimation graph. Input is an image, and it consists of 2 nodes, 1 that estimates the hand bounding boxes from the image, and another that takes the bounding box JSON and the same input image to estimate the hand keypoints.
I'm having the following problem when using the output JSON from the hand detection node: the input image doesn't get correctly routed to the keypoint estimation node, as if it's not connected
here is what the code looks like
The strange bit is, if I instead of passing
detection_node.detection_jsonto the keypoint estimation node, I just set a fixed value, such asThen things correctly get routed.