Skip to content

Conversation

@dnth
Copy link
Owner

@dnth dnth commented Apr 4, 2025

This PR significantly enhances the evaluation metrics logged to TensorBoard, providing more detailed insights into model performance, including Precision-Recall (PR) curves.

Key Changes:

  1. Detailed Metric Logging (src/deimkit/engine/solver/det_engine.py):
    • Logs individual COCO AP (Average Precision) and AR (Average Recall) metrics under structured TensorBoard categories (metrics-AP/, metrics-AR/). Includes breakdowns by IoU threshold and object area size.
    • Calculates and logs F1 scores based on corresponding AP and AR values under metrics-F1/.
    • Introduces a top-level-metrics/ category in TensorBoard for quick access to primary mAP (bbox_stats[0]), mAR (bbox_stats[8]), and the corresponding F1 score.
  2. Precision-Recall Curve Logging (src/deimkit/engine/solver/det_engine.py):
    • Adds functionality to generate and log PR curves to TensorBoard under the metrics-PR/ category.
    • Includes PR curves for different IoU thresholds (0.50, 0.75, and mean 0.50:0.95).
    • Adds PR curves broken down by object area size (all, small, medium, large).
    • Requires matplotlib as a dependency for plotting.

Screenshot
image

dnth added 3 commits April 4, 2025 08:43
- Introduced functions to create and log precision-recall curves to TensorBoard.
- Added methods to extract precision-recall data from COCO evaluation results.
- Implemented F1 score calculation based on precision and recall values.
- Updated the evaluate function to include logging of precision-recall curves and F1 scores for both bounding box and segmentation metrics.
- Enhanced imports to include necessary libraries for plotting and numerical operations.
- Removed redundant comments in the Trainer class for clarity.
- Improved logging structure in the Trainer class for better readability.
- Updated precision-recall curve logging paths in the det_engine to follow a consistent naming convention.
- Enhanced evaluation metrics logging to include top-level metrics for mAP and mAR, along with F1 score calculations.
@dnth dnth merged commit 9f17dc1 into main Apr 4, 2025
3 checks passed
@dnth dnth deleted the metrics-logging branch April 4, 2025 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants