Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArgumentException on Line 68 of Program.cs #7

Closed
dstampher opened this issue Apr 5, 2021 · 2 comments
Closed

ArgumentException on Line 68 of Program.cs #7

dstampher opened this issue Apr 5, 2021 · 2 comments

Comments

@dstampher
Copy link

dstampher commented Apr 5, 2021

Cloned this repo, downloaded the yolov4.onnx model, changed the modelPath field to the location of the onnx file, ran the project and encountered an ArgumentException on Line 68 of Program.cs when processing kite_416.jpg. If I remove that file name from Line 63, execution works just fine. Strange.

@BobLd

Here is the Stack Trace:

at System.Drawing.Image.get_Height()
at Microsoft.ML.Transforms.Image.ImageResizingTransformer.Mapper.<>c__DisplayClass3_0.b__1(Bitmap& dst)
at Microsoft.ML.Transforms.Image.ImagePixelExtractingTransformer.Mapper.<>c__DisplayClass5_01.<GetGetterCore>b__1(VBuffer1& dst)
at Microsoft.ML.Transforms.Onnx.OnnxTransformer.Mapper.NamedOnnxValueGetterVec1.GetNamedOnnxValue() at Microsoft.ML.Transforms.Onnx.OnnxTransformer.Mapper.UpdateCacheIfNeeded(Int64 position, INamedOnnxValueGetter[] srcNamedOnnxValueGetters, String[] activeOutputColNames, OnnxRuntimeOutputCacher outputCache) at Microsoft.ML.Transforms.Onnx.OnnxTransformer.Mapper.<>c__DisplayClass12_01.b__0(VBuffer1& dst) at Microsoft.ML.Data.TypedCursorable1.TypedRowBase.<>c__DisplayClass8_01.<CreateDirectVBufferSetter>b__0(TRow row) at Microsoft.ML.Data.TypedCursorable1.TypedRowBase.FillValues(TRow row)
at Microsoft.ML.Data.TypedCursorable1.RowImplementation.FillValues(TRow row) at Microsoft.ML.PredictionEngineBase2.FillValues(TDst prediction)
at Microsoft.ML.PredictionEngine2.Predict(TSrc example, TDst& prediction) at Microsoft.ML.PredictionEngineBase2.Predict(TSrc example)
at YOLOv4MLNet.Program.Main() in C:\Users\david\Projects\YOLOv4MLNet-master\YOLOv4MLNet\Program.cs:line 68

@dstampher
Copy link
Author

This seems to only be occurring on the iteration of the foreach loop (Line 63) for kite_416.jpg, when I remove that from being processed, execution works fine. Strange.

@BobLd
Copy link
Owner

BobLd commented Apr 5, 2021

Hi @dstampher, thanks for your message. This is indeed a known issue and I have created dotnet/machinelearning#5469 to report it. I used this repos to demonstrate the error, and unfortunately it seems the bug is still therr

@BobLd BobLd closed this as completed May 30, 2021
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

No branches or pull requests

2 participants