-
Notifications
You must be signed in to change notification settings - Fork 102
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
YoloModel - Custom Model #11
Comments
@alijundi please provide a screenshot from Netron (like this https://i.imgur.com/2X2H2Co.png) and your custom model class (code) with parameters. |
Thank you for your prompt answer. Below is the code: `using System.Collections.Generic; namespace Yolov5Net.Scorer.Models
} |
|
my recommendation - clone and use the latest ultralytics/yolov5 version in collab, it exports Detect layer by default, I'm not sure you've exported your model right. so, your model class should look like this:
|
@kkarahainko Thank you for your feedback: I updated the code to the below: |
|
@kkarahainko I am getting the above exception now. Am I doings something wrong here? |
I used the below code in colab to export .pt trained model to .onnx
Any thoughts? |
@alijundi pls, change Shapes order "public override int[] Shapes { get; set; } = new int[] { 52, 26, 13 };" |
@alijundi can you provide a test image? |
@kkarahainko lemme try it now... |
@kkarahainko result is being outputed with no predictions.. INPUT == OUTPUT |
above is test input |
@alijundi is yolov5/detect.py detects something? did you try? |
The output is from Roboflow-Custom-YOLOv5 that is what I used to train my model |
@alijundi I mean did you try detect.py on the test image you've sent to me? |
@alijundi I suppose it doesn't detect too? |
@kkarahainko I am sorry I took sometime to respond to you. I was actually on the way home. and YES! I tried all images that make up the model with no success. It is not detecting anything! Do you know why? |
@alijundi it's all about pixels, the test image is b/w no labels etc, training image is colored with labels, you should train on the similar images you will use further (to predict), or not enough epochs, low mAP etc. |
Hi @kkarahainko @keesschollaart81
I added my custom model and exported my .onnx from colab I ran the project after making my custom model.
I get System.IndexOutOfRangeException: 'Index was outside the bounds of the array.'
in function ParseDetect. I am not sure what to change in my custom model class to avoid this!
By the way. The code works well on the models and test image provided.
The text was updated successfully, but these errors were encountered: