Skip to content

core.models.picsellia_prediction

picsellia_prediction

Classes:

Name Description
PicselliaLabel

Label associated with a prediction.

PicselliaConfidence

Confidence score for a prediction (typically between 0 and 1).

PicselliaRectangle

Bounding box in [x, y, width, height] format.

PicselliaText

Recognized text from OCR predictions.

PicselliaPolygon

Polygon represented by a list of points.

PicselliaClassificationPrediction

Prediction result for classification tasks.

PicselliaRectanglePrediction

Prediction result for object detection (rectangles).

PicselliaOCRPrediction

Prediction result for OCR tasks.

PicselliaPolygonPrediction

Prediction result for segmentation tasks.

PicselliaLabel(value) dataclass

Label associated with a prediction.

Attributes:

Name Type Description
value Label
name str
id int

value instance-attribute

name property

id property

PicselliaConfidence(value) dataclass

Confidence score for a prediction (typically between 0 and 1).

Attributes:

Name Type Description
value float

value instance-attribute

PicselliaRectangle(x, y, w, h) dataclass

Bounding box in [x, y, width, height] format.

Attributes:

Name Type Description
value list[int]
x int
y int
width int
height int

value = [int(x), int(y), int(w), int(h)] instance-attribute

x property

y property

width property

height property

PicselliaText(value) dataclass

Recognized text from OCR predictions.

Attributes:

Name Type Description
value str

value instance-attribute

PicselliaPolygon(points) dataclass

Polygon represented by a list of points.

Methods:

Name Description
compute_area

Attributes:

Name Type Description
value list[list[int]]
points list[list[int]]

value = points instance-attribute

points property

compute_area()

PicselliaClassificationPrediction(asset, label, confidence) dataclass

Prediction result for classification tasks.

Attributes:

Name Type Description
asset Asset
label PicselliaLabel
confidence PicselliaConfidence

asset instance-attribute

label instance-attribute

confidence instance-attribute

PicselliaRectanglePrediction(asset, boxes, labels, confidences) dataclass

Prediction result for object detection (rectangles).

Attributes:

Name Type Description
asset Asset
boxes list[PicselliaRectangle]
labels list[PicselliaLabel]
confidences list[PicselliaConfidence]

asset instance-attribute

boxes instance-attribute

labels instance-attribute

confidences instance-attribute

PicselliaOCRPrediction(asset, boxes, labels, texts, confidences) dataclass

Prediction result for OCR tasks.

Attributes:

Name Type Description
asset Asset
boxes list[PicselliaRectangle]
labels list[PicselliaLabel]
texts list[PicselliaText]
confidences list[PicselliaConfidence]

asset instance-attribute

boxes instance-attribute

labels instance-attribute

texts instance-attribute

confidences instance-attribute

PicselliaPolygonPrediction(asset, polygons, labels, confidences) dataclass

Prediction result for segmentation tasks.

Attributes:

Name Type Description
asset Asset
polygons list[PicselliaPolygon]
labels list[PicselliaLabel]
confidences list[PicselliaConfidence]

asset instance-attribute

polygons instance-attribute

labels instance-attribute

confidences instance-attribute