Skip to content

Commit 1272a87

Browse files
committed
更新 README.md 和项目文件以支持新版本
添加 1.0.15 版本发布说明,修复 YOLO 模型边界框坐标问题,提升检测精度。引入新的图像预处理方法以保持纵横比。更新 IVilson.AI.Yolov7net.csproj,添加 README.md 打包信息,替换 System.Drawing 为 SkiaSharp,以支持跨平台开发。
1 parent ac1541c commit 1272a87

File tree

3 files changed

+39
-149
lines changed

3 files changed

+39
-149
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,41 @@
88
[![NuGet](https://img.shields.io/nuget/v/IVilson.AI.Yolov7net.svg)](https://www.nuget.org/packages/IVilson.AI.Yolov7net)
99
[![Platform](https://img.shields.io/badge/platform-.NET-blueviolet)](https://dotnet.microsoft.com/)
1010

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.
1146

1247
### 2025/4/18
1348
## 1.0.12 released

src/Yolov7net/IVilson.AI.Yolov7net.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,8 @@ replace system.drawing with skiasharp for cross-platform support.</Description>
2626
<PackageReference Include="SkiaSharp" Version="3.119.0" />
2727
</ItemGroup>
2828

29+
<ItemGroup>
30+
<None Include="..\..\README.md" Pack="true" PackagePath="" />
31+
</ItemGroup>
32+
2933
</Project>

src/Yolov7net/README.md

Lines changed: 0 additions & 149 deletions
This file was deleted.

0 commit comments

Comments
 (0)