paralleldomain.model.annotation.point_2d

class Point2D(x, y, class_id, instance_id=-1, attributes=<factory>)

Represents a 2D Point.

Parameters:
x

coordinate along x-axis in image pixels

y

coordinate along y-axis in image pixels

class_id

Class ID of the point. Can be used to lookup more details in ClassMap.

instance_id

Instance ID of annotated object. Can be used to cross-reference with other instance annotation types, e.g., InstanceSegmentation2D or InstanceSegmentation3D. If unknown defaults to -1.

attributes

Dictionary of arbitrary object attributes.

to_numpy()

Returns the coordinates as a numpy array with shape (1 x 2).

class Points2D(points)

Collection of 2D Points

Parameters:

points (List[Point2D]) – Points2D.points

points

Unordered list of Point2D instances