py123d_detection.torch.models.petr.detector

PETR: 3D detection from multi-view images, with position-aware queries.

The idea the paper is named for lives in the head. Image features get a positional embedding that encodes where in 3D space each pixel could be looking, derived from the camera’s own calibration, and learned queries then attend across all cameras with ordinary attention. No view transformation, no bird’s-eye grid, no depth prediction.

Classes

PETR([position_range])

PETR as published, trained with Lightning.

class py123d_detection.torch.models.petr.detector.PETR(position_range=None, **kwargs)[source]

Bases: MultiViewDetector

PETR as published, trained with Lightning.

Parameters:

position_range (Optional[List[float]]) – The volume the 3D positional embedding spans. Deliberately wider than pc_range, so an object at the edge of the detection range still gets a meaningful embedding rather than a saturated one.

build_head(**kwargs)[source]

The detector’s head. This is the one thing a subclass has to provide.

Return type:

PETRHead