|
8 | 8 | [](https://www.nuget.org/packages/IVilson.AI.Yolov7net) |
9 | 9 | [](https://dotnet.microsoft.com/) |
10 | 10 |
|
| 11 | +## Release Notes |
| 12 | + |
| 13 | +### 2025/8/8 |
| 14 | +## 1.0.15 released |
| 15 | + |
| 16 | +**Major Bug Fix: Improved Detection Accuracy** 🎯 |
| 17 | + |
| 18 | +Fixed a critical issue with bounding box coordinate accuracy that was affecting all YOLO model versions: |
| 19 | + |
| 20 | +**🔧 What was fixed:** |
| 21 | +- **Image preprocessing issue**: The original `ResizeImage` method was directly stretching images to target dimensions, causing image distortion and inaccurate detection results |
| 22 | +- **Missing letterbox processing**: YOLO models require proper letterbox preprocessing to maintain aspect ratio |
| 23 | + |
| 24 | +**✨ Improvements:** |
| 25 | +- **New letterbox implementation**: Images are now resized while maintaining aspect ratio with proper padding |
| 26 | +- **Consistent preprocessing**: All YOLO versions (v5, v7, v8, v9, v10, v11, v12) now use the same improved preprocessing |
| 27 | +- **Better coordinate accuracy**: Bounding boxes now align correctly with detected objects |
| 28 | +- **Standard YOLO preprocessing**: Uses gray padding (RGB: 128,128,128) as per YOLO standards |
| 29 | + |
| 30 | +**🧪 Technical Details:** |
| 31 | +```csharp |
| 32 | +// New letterbox processing maintains aspect ratio |
| 33 | +var scale = Math.Min(scaleWidth, scaleHeight); |
| 34 | +var newWidth = (int)(sourceWidth * scale); |
| 35 | +var newHeight = (int)(sourceHeight * scale); |
| 36 | +var padX = (targetWidth - newWidth) / 2; |
| 37 | +var padY = (targetHeight - newHeight) / 2; |
| 38 | +``` |
| 39 | + |
| 40 | +**📊 Impact:** |
| 41 | +- Significantly improved detection accuracy across all model versions |
| 42 | +- More precise bounding box positioning |
| 43 | +- Better consistency between different YOLO model predictions |
| 44 | + |
| 45 | +This fix addresses the coordinate transformation issues that were causing detection boxes to appear in incorrect positions relative to the actual objects in the image. |
11 | 46 |
|
12 | 47 | ### 2025/4/18 |
13 | 48 | ## 1.0.12 released |
|
0 commit comments