Unify DINOv3 fine-tuning backbone loading#642
Conversation
|
/review |
There was a problem hiding this comment.
Pull request overview
This PR unifies DINOv3 fine-tuning backbone loading across LTDETR object detection and EoMT segmentation task models, and fixes an issue where certain LTDETR backbones/checkpoints would not load the intended weights.
Changes:
- Route backbone weight handling through
DINOV3_PACKAGE.get_model(...)consistently (instead of per-task special casing). - Adjust DINOv3 package logic to set
pretrained=Truewhen explicit weights are provided. - Add logging around checkpoint loading and document the fix in
CHANGELOG.md.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/lightly_train/_task_models/dinov3_ltdetr_object_detection/task_model.py |
Uses unified DINOV3_PACKAGE.get_model backbone loading and removes local path existence branching. |
src/lightly_train/_task_models/dinov3_eomt_semantic_segmentation/task_model.py |
Switches backbone loading to the package API and removes custom weight-loading helper. |
src/lightly_train/_task_models/dinov3_eomt_panoptic_segmentation/task_model.py |
Same unification as semantic segmentation; removes custom weight-loading helper. |
src/lightly_train/_task_models/dinov3_eomt_instance_segmentation/task_model.py |
Same unification as semantic segmentation; removes custom weight-loading helper. |
src/lightly_train/_models/dinov3/dinov3_src/hub/backbones.py |
Logs the resolved checkpoint URL used for weight loading. |
src/lightly_train/_models/dinov3/dinov3_package.py |
Ensures pretrained is enabled when explicit weights are provided and load_weights=True. |
CHANGELOG.md |
Adds a “Fixed” entry describing the LTDETR backbone-loading bug fix. |
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 26362b5698
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…/lightly-ai/lightly-train into unify-dinov3-ft-backbone-loading
yutong-xiang-97
left a comment
There was a problem hiding this comment.
Left one comment
What has changed and why?
dinov3/vitt16-ltdetrwhich loadeddinov3/vitt16-notpretrained-ltdetrinsteadHow has it been tested?
Did you update CHANGELOG.md?
Did you update the documentation?