Upload Model Predictions

šŸ“˜

Click for Python SDK

Dataset.upload_predictions(
    model: Model,
    predictions: List[Prediction],
    update: bool,
    asynchronous: bool
) -> Union[dict, AsyncJob]

After inference is complete, you'll want to pack the model outputs into the format Nucleus requires to begin computation on your model's performance.

This JSON schema is almost exactly the same as that of Annotations, but predictions also take in optional confidence and class_pdf key-value pairs.

Definition: BoxGeometry

KeyTypeDescription
xfloat (required)The distance, in pixels, between the left border of the bounding box and the left border of the image.
yfloat (required)The distance, in pixels, between the top border of the bounding box and the top border of the image.
widthfloat (required)The width in pixels of the annotation.
heightfloat (required)The height in pixels of the annotation.

Definition: Point2D

KeyTypeDescription
xfloat (required)The distance, in pixels, between the left border of the bounding box and the left border of the image.
yfloat (required)The distance, in pixels, between the top border of the bounding box and the top border of the image.

Definition: PolygonGeometry

KeyTypeDescription
verticesarray of Point2DArray of Point objects that represent vertices of the polygon.

Definition: Point3D

KeyTypeDescription
xfloat (required)The x coordinate of the point.
yfloat (required)The y coordinate of the point.
zfloat (required)The z coordinate of the point.

Definition: CuboidGeometry

KeyTypeDescription
positionPoint3D (required)The center of the cuboid.
dimensionsPoint3D (required)The length, width, and height of the cuboid.
yawfloat (required)The rotation, in radians, about the z axis of the cuboid.
Query Params
string

The Scale-generated ID of the Dataset.

string

The Scale-generated ID of the Model.

Body Params
annotations
array of objects

Array of GeometricPrediction objects to upload. One or both of annotations or segmentations must be supplied.

annotations
segmentations
array of objects

Array of SegmentationPrediction objects to upload. One or both of annotations or segmentations must be supplied.

segmentations
boolean
Defaults to false

Whether to overwrite existing predictions upon reference_id and annotation_id collision. For category predictions, determines whether to overwrite upon taxonomy_name and reference_id collision.

Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json