Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The test checks only feature shape, leaving incorrect patch averaging or reversed feature concatenation undetected; it should assert the exact returned values.
1 open issue
What changed in this PR
This PR addresses #655 by initializing the converter’s DINOv2 classifier with the official ImageNet linear head, enabling meaningful predictions from exported models.
Changes:
- Loads the pretrained reg4 head and adapts backbone features to its expected input.
- Replaces placeholder label metadata with resolved class names and adds unit tests.
- Adds Ruff as a pinned lint dependency.
| File | Description |
|---|---|
model_converter/uv.lock |
Locks Ruff and the lint dependency group. |
model_converter/tests/unit/test_getitune.py |
Tests head initialization, validation, routing, and label metadata. |
model_converter/src/model_converter/converters/getitune.py |
Integrates the official DINOv2 head and updates exported label metadata. |
model_converter/pyproject.toml |
Adds the Ruff lint dependency group. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Export DINOv2 classifiers with the official facebookresearch/dinov2 ImageNet linear head (reg4 variants).
Resolves #655