To display the counted object's indexes in order of x (left to right)

Hello everyone, I’m new at roboflow. How to display the counted objects’ indexes in order of x (left to right)

  • Project Type: Detect, Count, and Visualize
  • Operating System & Browser: Windows11, Google Chrome
  • **Project Universe Link or Workspace/Project ID: **

Hi @Damdinsvren_Bayasgalan ,

You can use Property Definition block to sort detections

Below is the workflow definition you can copy-paste to your editor, hope this helps!

{
  "version": "1.0",
  "inputs": [
    {
      "type": "InferenceImage",
      "name": "image"
    }
  ],
  "steps": [
    {
      "type": "roboflow_core/roboflow_object_detection_model@v2",
      "name": "model",
      "images": "$inputs.image",
      "model_id": "yolov8n-640"
    },
    {
      "type": "roboflow_core/property_definition@v1",
      "name": "property_definition",
      "data": "$steps.model.predictions",
      "operations": [
        {
          "type": "SortDetections",
          "mode": "center_x"
        }
      ]
    }
  ],
  "outputs": [
    {
      "type": "JsonField",
      "name": "sorted detections",
      "coordinates_system": "own",
      "selector": "$steps.property_definition.output"
    }
  ]
}