NickSwardh / YoloDotNet

YoloDotNet - A C# .NET 8.0 project for Classification, Object Detection, OBB Detection, Segmentation and Pose Estimation in both images and videos.
GNU General Public License v3.0
158 stars 28 forks source link

Dimension Correction in Code #1

Closed hamzakhalil798 closed 9 months ago

hamzakhalil798 commented 9 months ago

Thankyou so much for your work! The code works fine just a small issue in your code in YoloDotNet/Extensions/ImageExtensions.cs line 33 var tensor = new DenseTensor(new[] { inputBatchSize, inputChannels, height, width });

should be replaced with var tensor = new DenseTensor(new[] { inputBatchSize, inputChannels, width, height });

This fixes the dimension error (else dim error will occur for images not having same width and height).

NickSwardh commented 9 months ago

Thank you, awesome find! I've merged your pr. ;)