PDFs support annotation using bounding box, polygon, and bitmask object labels and classifications. Using the Encord SDK you can import labels and classifications directly to PDFs that already exist in an Annotate Project. You can also use the SDK to view labels and classifications that exist on a PDF.

Bounding Boxes and PDFs

The following screenshot provides the Ontology used with the code example.

Polygons and PDFs

Polygons offer a number of options when labeling PDFs.

Polygons can have simple and complex shapes, including being enclosed in one another, and encompassing separate regions. In each case the polygon’s coordinates are arranged in a different way.

To specify coordinates for polygons use the following format:


PolygonCoordinates(polygons=[[[PointCoordinate(x1, y1), PointCoordinate(x2, y2),...]]]

For more information on polygon labels go here

This example uses multiple polygons to label the PDF.

The following screenshot provides the Ontology used with the code example.

Classifications with PDFs

The following screenshot provides the Ontology used with the code example.