Git Product home page Git Product logo

Comments (4)

glenn-jocher avatar glenn-jocher commented on August 25, 2024

@FrancoArtale hello! It looks like you've encountered a couple of issues during your validation process after converting to ONNX and OpenVINO formats.

  1. ONNX Model Image Size Mismatch:
    Your trace log indicates an image dimension mismatch during validation. When exporting the model using the export.py script to ONNX, you've defined the image size as 736x1280. However, during validation, you are attempting to use an image size of 1280x1280. Ensure the image dimensions match throughout the conversion and validation processes to resolve this.

  2. OpenVINO Model Validation Issue:
    For the OpenVINO model, the error related to "NoneType object is not subscriptable" typically points towards an issue with loading the class names or other essential data properties. Ensure that the configuration in data.yaml is correctly loaded and accessible by the model during validation. Double-check the paths and formatting within your data.yaml file.

If these tips don't resolve the issues, providing a more detailed error output or further context may help pinpoint the specific cause. Thanks for your detailed inquiry, and good luck with your further YOLOv5 deployments! 😊

from yolov5.

FrancoArtale avatar FrancoArtale commented on August 25, 2024
  1. I'm using images of 1280x736, the images are okey:
    image
    The problem is in the command, I used --imgsz 1280 and i didn't add 736 because it's not possible. There is no --rect parameter in val.py, so it's not possible put --imgsz 736 1280.

If you see the next line from val.py, it's only accept one value:
parser.add_argument("--imgsz", "--img", "--img-size", type=int, default=640, help="inference size (pixels)")

  1. My data.yaml is:

#test: 100KBDD/test/images
train: 100KBDD/train/images
val: 100KBDD/valid/images

names:
0: 0
1: 1
2: 2
3: 3
4: 4
5: 5
6: 6
7: 7
nc: 8
#roboflow:
#license: CC BY 4.0
#project: car_part2
#url: https://universe.roboflow.com/carpart2-gj01d/car_part2/dataset/1
#version: 1
#workspace: carpart2-gj01d

It worked in other cases:
In training of the model.
In the validation of the original model.

from yolov5.

glenn-jocher avatar glenn-jocher commented on August 25, 2024

Hey @FrancoArtale! Thanks for the additional details. 😊

  1. Image Size in Validation: The val.py script indeed only accepts a single integer for --imgsz, which sets both width and height to the same value. If your model was trained or exported with non-square dimensions (like 736x1280), you'll need to modify the validation script to accept two dimensions or adjust your model to work with square input sizes. This limitation in val.py is by design to simplify the input size handling.

  2. Data.yaml Usage: It's great to hear that your data.yaml works well in other scenarios. If it's failing in specific cases (like with OpenVINO), the issue might be related to how the model or the validation script handles the loaded configuration. Ensure that the paths and format are consistently correct across different environments or setups.

For handling different aspect ratios during validation without modifying the script, consider resizing your images to square dimensions before validation as a workaround. Keep up the great work with YOLOv5! 🚀

from yolov5.

github-actions avatar github-actions commented on August 25, 2024

👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.

For additional resources and information, please see the links below:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLO 🚀 and Vision AI ⭐

from yolov5.

Related Issues (20)

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.