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

yolo-world export onnx #12640

Open
1 task done
Egrt opened this issue May 13, 2024 · 1 comment
Open
1 task done

yolo-world export onnx #12640

Egrt opened this issue May 13, 2024 · 1 comment
Labels
question Further information is requested

Comments

@Egrt
Copy link

Egrt commented May 13, 2024

Search before asking

Question

I used yolo-worldv2 to train the custom model with only one category, when he exported the onnx, the onnx has only one output head which is inconsistent with the structure of the official yolo-worldv2.onnx, how should I modify it in order to get the same structure as the official yolo-worldv2.onnx?
The onnx model I exported:
The onnx model I exported

The official onnx mode:
The official onnx mode

Additional

No response

@Egrt Egrt added the question Further information is requested label May 13, 2024
@glenn-jocher
Copy link
Member

Hello! It looks like your custom-trained YOLO-World model has a different output structure possibly due to the implementation differences aimed for a single class as opposed to multiple classes as in the official model.

A quick suggestion would be to check if any output layer specifications set during your training process are causing this variation. You may want to match the output layers' configuration to that of the official model. Ensure that the number of filters in the last convolutional layers matches num_classes * (5 + num_output_channels), where num_classes in the official model might be greater than 1 (for multiple classes).

For example, in your model training configuration (likely a YAML file), ensure settings similar to the following:

# For a single class, assuming 3 output heads
nc: 1  # number of classes
nl: 3  # number of detection layers (if applicable)
anchors: [...]

Adjust your YAML file to align with that of the official settings if you have access to them, especially the anchor setups and the number of output channels and classes.

If this doesn't resolve it, consider revisiting the modifications you made for your single class adaptation and how they differ from the official version, particularly around the output layers in your model's architecture file. If you can share more detailed snippets of your configuration or any custom modifications to the model architecture, I could provide more targeted advice. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants