View a Version

You can retrieve information about a Roboflow version using the Python SDK, REST API, and CLI.

Version ID

Each version generated in Roboflow has a sequential, numerical ID associated with it. You can see that through the app on your versions page or by listing your project versions in the API.

The version highlighted in the screenshot below would have a version ID of 10.

To retrieve information about a project, use this command:

import roboflow

rf = roboflow.Roboflow(api_key=YOUR_API_KEY_HERE)

# get a project
project = rf.workspace().project("PROJECT_ID")

model = project.version("1").model

The model variable contains the following JSON values:

{
  "id": "mug-detector-eocwp/12",
  "name": "Mug Detector",
  "version": "12",
  "classes": null,
  "overlap": 30,
  "confidence": 40,
  "stroke": 1,
  "labels": false,
  "format": "json",
  "base_url": "https://detect.roboflow.com/"
}

Keypoint Detection Skeletons

Keypoint Detection project versions will contain a skeletons field which contains your version skeletons for each class. For example, a project with a class person might have the following skeleton:

{
...
"skeletons": {
    "person": {
        "vertices": [
            {
                "color": "#FF8000",
                "id": 0,
                "name": "nose",
                "x": 0.4546,
                "y": 0.18859999999999996
            },
            {
                "color": "#FF00FF",
                "id": 1,
                "name": "left_eye"
                "x": 0.478,
                "y": 0.1606
            },
            ...
        ],
        "edges": [
            {
                "color": "#00FFCE",
                "from": 13,
                "to": 15
            },
            ...
        ],
        "symmetries": [
            {
                "direction": "horizontal",
                "points": [1, 2]
            },
            ...
        ]
    }
}

Note, vertices should be accessed by index with inference predictions class_id. Then, vertex id can be used to reference edge (from/to) and symmetries (points).

Was this helpful?