DetectionEngine.export_weights

DetectionEngine.export_weights(model_name, path, **extra)

Write one detector’s weights, with the anchors in the sidecar.

The anchors are not optional metadata. The same weights read with different anchors decode every box scaled by a fixed factor, and nothing about the output says so - the boxes are plausible, the scores are plausible, and they are in the wrong places.

Parameters

Name Type Description Default
model_name str Which detector’s weights to write. required
path str | Path Where to write. The sidecar goes beside it. required
**extra Anything else to record. {}

Returns

Name Type Description
Path The path written.