Detr Partitioner

class sycamore.transforms.detr_partitioner.DeformableDetr(model_name_or_path, device=None, cache: Cache | None = None)[source]

Bases: SycamoreObjectDetection

infer(images: list[Image], threshold: float, use_cache: bool = False) list[list[Element]][source]

Do inference using the wrapped model.

class sycamore.transforms.detr_partitioner.SycamoreObjectDetection[source]

Bases: ABC

Wrapper class for the various object detection models.

abstract infer(image: list[Image], threshold: float) list[list[Element]][source]

Do inference using the wrapped model.

class sycamore.transforms.detr_partitioner.ArynPDFPartitioner(model_name_or_path='Aryn/deformable-detr-DocLayNet', device=None, cache: Cache | None = None)[source]

Bases: object

This class contains the implementation of PDF partitioning using a Deformable DETR model.

This is an implementation class. Callers looking to partition a DocSet should use the ArynPartitioner class.