ultralytics / ultralytics

NEW - YOLOv8 🚀 in PyTorch > ONNX > OpenVINO > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
28.09k stars 5.58k forks source link

onnx node name #4992

Closed starsky68 closed 10 months ago

starsky68 commented 11 months ago

Search before asking

Question

The node name of the onnx exported by the new version of YOLO8 is different from before. The current node name is "model. 0/conv/Conv", and the previous name was "Conv_0". How can it be changed to a node name like "Conv_0" as before?

Additional

No response

github-actions[bot] commented 10 months ago

👋 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 ⭐

glenn-jocher commented 9 months ago

@starsky68 hello there,

Thank you for reaching out with your question on ONNX node naming.

The difference in node naming that you've observed is due to changes in how the model's layers are exported in the ONNX format in the YOLOv8 repository. The naming convention is typically determined by the export process used, which can vary depending on the version of the exporting library or changes made to optimize compatibility with different deployment platforms.

If you require a specific naming convention, like "Conv_0" for your application, this would involve modifying the export script or post-processing the ONNX graph—either of which would require manipulating the ONNX model definitions directly. However, as the change you are asking about concerns a deeper level of customization, it is recommended to consider whether the node naming will impact the performance or deployment of your model, as ONNX runtime and other inference engines are generally agnostic to node names.

For further information on custom exports, and an understanding of ONNX model architecture and modification, you can refer to the detailed documentation at https://docs.ultralytics.com.

If needed, for commercial applications and tailored support, including model customization at the code level, you might consider our Enterprise License which provides a higher level of assistance for integrating Ultralytics technology into products and services.

Please let us know if there is anything else the Ultralytics team can help you with! Remember that as a community, we constantly aim to improve, and questions like yours contribute to that collective effort.