Git Product home page Git Product logo

yolodotnet's People

Contributors

hamzakhalil798 avatar nickswardh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

yolodotnet's Issues

Exception Encountered

Hi
I am using visual studio 2022 and the project is in .net8. The exception comes when loading the onnx model. I exported the model from .pt to .onnx in pytorch.

I am using nuget.

The exception is : 'The given key 'date' was not present in the dictionary.'

Please help

Classification ?

Hi !

I just asking if this package can do image classification, and how ?

Thanks ^^

Error when there are more than 100 labels in the model

Unhandled exception. System.Exception: There are more labels than available colors.
at YoloDotNet.Extensions.OnnxPropertiesExtension.MapLabelsAndColors(String onnxLabelData, ModelType modelType)
at YoloDotNet.Extensions.OnnxPropertiesExtension.GetOnnxProperties(InferenceSession session)
at YoloDotNet.Data.YoloBase..ctor(String onnxModel, Boolean useCuda, Int32 gpuId)
at YoloDotNet.Yolo..ctor(String onnxModel, Boolean cuda, Int32 gpuId)

YoloNas

Hi,

Do you have a version for Yolo nas?

Thx

Microsoft.ML.OnnxRuntime.OnnxRuntimeException:

Microsoft.ML.OnnxRuntime.OnnxRuntimeException: '[ErrorCode:RuntimeException] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1209 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\Users\cyberpark\Documents\YoloDotNet-master\ConsoleDemo\bin\Debug\net8.0\runtimes\win-x64\native\onnxruntime_providers_cuda.dll"

_session = useCuda
? new InferenceSession(onnxModel, SessionOptions.MakeSessionOptionWithCudaProvider(gpuId))
: new InferenceSession(onnxModel);

OnnxModel = _session.GetOnnxProperties();

_parallelOptions = new ParallelOptions { MaxDegreeOfParallelism = Environment.ProcessorCount };
_useCuda = useCuda;

in this case i got this problem after going to video progress section, can you assist?

IoU parameter for overlapping boxes

There doesn't seem to be any IoU parameter from what I can see when I looked at the source code, I see that RemoveOverlappingBoxes uses a default value of 0.45f I think it would be useful if this was a parameter.

And maybe another IoU threshold parameter specifically if the overlapping boxes are only the same class, but I don't know if this is preferred. But I think at least one is very much needed.

Benchmarking GPU vs. CPU: Unexpected Results

Originally posted by @niclasastrom in #9 (comment)

Performance using the GPU is worse than using the CPU. I have an RTX 4070, running Windows 11 Pro. The latest OS- and NVidia driver updates are installed.

I expected higher throughput when using the GPU, but I could be wrong. What performance can I expect, CPU vs GPU?

For example, the classification test took 130ms on the CPU and 572ms on the GPU. Do you know if this is expected?

I added a couple of lines to measure compute time:

var stopWatch=new Stopwatch();
stopWatch.Start();
List<Classification> results = yolo.RunClassification(image, 3); // Get top 5 classifications. Default = 1
stopWatch.Stop();
Console.WriteLine("Elapsed time: "+stopWatch.ElapsedMilliseconds);

Thanks for your input. If this follow-up question doesn't fit the topic, please forgive me and I will try to file my question somewhere else.

Dimension Correction in Code

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

Add DirectML Onnx EP as alternative GPU setup

Hey great project, I've been tweaking it to use DirectML as the onnx execution provider because I'm one of the poor suckers who doesn't have a Nvidia GPU and it works very well as an abstraction on most GPUs.

If you're interested, I'd be happy to submit my patch thru a PR, although I couldn't seem to come up with a reasonable way to avoid breaking changes to the main Yolo constructor's call signature since it's currently designed for simple disabling of GPU use but let me know if you have any suggestions/preferences in that regard.

Cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.