recommended_min_similarity#
- rapidtools.processing.reid.recommended_min_similarity(model_id: str) float[source]#
Cosine-similarity threshold that suits a backbone.
Backbones place their scores on different scales: CLIP packs both matching and non-matching vehicles into a narrow band near 1, DINOv2 spreads them out. The values are the 99th percentile of the similarity between neighbouring, different, parked vehicles in a street survey.
- Parameters:
model_id – Hugging Face model identifier.
- Returns:
float – Threshold at or above which two crops count as one object.
Example
>>> recommended_min_similarity('facebook/dinov2-small') 0.83 >>> recommended_min_similarity('some/other-backbone') 0.89