Conversation
- Add base classes: MetricArgs, TaskMetricArgs, TaskMetric - Add multiclass metrics: Accuracy, F1, Precision, Recall - Add multilabel metrics: Accuracy, F1, Precision, Recall, AUROC, Average Precision, Hamming Distance - Add ClassificationTaskMetricArgs and ClassificationTaskMetric - TaskMetric inherits from nn.Module for automatic device handling - Support for classwise metrics with ClasswiseWrapper - Comprehensive documentation on structure and adding new metrics
- Add object detection metrics with MeanAveragePrecision - Add instance segmentation metrics with MeanAveragePrecision (iou_type="segm") - Add semantic segmentation metrics with JaccardIndex (mIoU) - Add panoptic segmentation metrics with PanopticQuality (PQ/SQ/RQ) - Include classwise metrics for detection, instance segmentation, and semantic segmentation - Add minimal tests following classification pattern (18 tests total, all passing) - Handle per-class metric expansion from torchmetrics outputs
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 16dc8ea2b7
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0891fc2f20
ℹ️ 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".
|
/review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Pull request overview
Adds DINOv2-backed EoMT panoptic segmentation support to LightlyTrain, extending the existing EoMT segmentation task family (previously DINOv3-focused) with DINOv2 inference + fine-tuning, plus docs/changelog updates.
Changes:
- Introduce a new DINOv2 EoMT panoptic segmentation task model, training loop, transforms, scheduler, and loss.
- Register the new training implementation so
train_panoptic_segmentation(...)can select DINOv2 EoMT models. - Update docs/README/changelog and add a training + reload + predict smoke test for DINOv2 panoptic segmentation.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/_commands/test_train_task.py | Adds a smoke test for DINOv2 EoMT panoptic segmentation training + reload + inference. |
| src/lightly_train/_task_models/dinov2_eomt_panoptic_segmentation/transforms.py | Defines default train/val transform args and resolution/normalization auto-resolution for DINOv2 panoptic segmentation. |
| src/lightly_train/_task_models/dinov2_eomt_panoptic_segmentation/train_model.py | Implements the TrainModel wrapper: optimizer/scheduler setup, training/validation steps, metrics wiring, and mask annealing. |
| src/lightly_train/_task_models/dinov2_eomt_panoptic_segmentation/task_model.py | Implements the DINOv2 EoMT panoptic TaskModel (predict/forward/export_onnx/export_tensorrt, mask postprocessing, resize/pad). |
| src/lightly_train/_task_models/dinov2_eomt_panoptic_segmentation/scheduler.py | Adds the EoMT two-stage warmup + poly LR schedule implementation. |
| src/lightly_train/_task_models/dinov2_eomt_panoptic_segmentation/scale_block.py | Adds the upscaling block used by the mask head. |
| src/lightly_train/_task_models/dinov2_eomt_panoptic_segmentation/mask_loss.py | Adds Mask2Former-based matching/loss wrapper used during training. |
| src/lightly_train/_task_models/dinov2_eomt_panoptic_segmentation/init.py | Introduces the new task-model package. |
| src/lightly_train/_commands/train_task_helpers.py | Registers the new DINOv2 panoptic TrainModel class in TASK_TRAIN_MODEL_CLASSES. |
| docs/source/panoptic_segmentation.md | Documents DINOv2 panoptic EoMT models and includes generated default transform args. |
| docs/source/index.md | Updates task overview to mention DINOv2 support for panoptic segmentation. |
| README.md | Updates the capability matrix to mark DINOv2 panoptic segmentation as supported. |
| Makefile | Extends license-header tooling configuration for the new derived EoMT files. |
| CHANGELOG.md | Adds an entry announcing DINOv2 panoptic segmentation inference + fine-tuning support. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
What has changed and why?
Panoptic Segmentation - LightlyTrain documentation_dinov2.pdf
How has it been tested?
Did you update CHANGELOG.md?
Did you update the documentation?