Skip to main content

Points Editor

KJNodes/experimental
PointsEditor

# WORK IN PROGRESS Do not count on this as part of your workflow yet, probably contains lots of bugs and stability is not guaranteed!! ## Graphical editor to create coordinates **Shift + click** to add a positive (green) point. **Shift + right click** to add a negative (red) point. **Ctrl + click** to draw a box. **Right click on a point** to delete it. Note that you can't delete from start/end of the points array. To add an image select the node and copy/paste or drag in the image. Or from the bg_image input on queue (first frame of the batch). **THE IMAGE IS SAVED TO THE NODE AND WORKFLOW METADATA** you can clear the image from the context menu by right clicking on the canvas

Example

JSON Example
{
  "class_type": "PointsEditor",
  "inputs": {
    "points_store": "",
    "coordinates": "",
    "neg_coordinates": "",
    "bbox_store": "",
    "bboxes": "",
    "bbox_format": "xyxy",
    "width": 512,
    "height": 512,
    "normalize": false
  }
}

This example shows required inputs only. Connection values like ["node_id", 0] should reference actual node IDs from your workflow.

Inputs

NameTypeStatusConstraintsDefault
points_storeSTRINGrequired--
coordinatesSTRINGrequired--
neg_coordinatesSTRINGrequired--
bbox_storeSTRINGrequired--
bboxesSTRINGrequired--
bbox_formatENUM
2 options
  • xyxy
  • xywh
required--
widthINTrequiredmin: 8, max: 4096, step: 8512
heightINTrequiredmin: 8, max: 4096, step: 8512
normalizeBOOLEANrequired-false
bg_imageIMAGEoptional--

Outputs

IndexNameTypeIs ListConnection Reference
0positive_coordsSTRINGNo["{node_id}", 0]
1negative_coordsSTRINGNo["{node_id}", 1]
2bboxBBOXNo["{node_id}", 2]
3bbox_maskMASKNo["{node_id}", 3]
4cropped_imageIMAGENo["{node_id}", 4]
How to connect to these outputs

To connect another node's input to an output from this node, use the connection reference format:

["node_id", output_index]

Where node_id is the ID of this PointsEditor node in your workflow, and output_index is the index from the table above.

Example

If this node has ID "5" in your workflow:

  • positive_coords (STRING): ["5", 0]
  • negative_coords (STRING): ["5", 1]
  • bbox (BBOX): ["5", 2]
Was this page helpful?