GithubHelp home page GithubHelp logo

models/yolov9/ about ultralytics HOT 8 OPEN

tangweii222 avatar tangweii222 commented on July 19, 2024
models/yolov9/

from ultralytics.

Comments (8)

github-actions avatar github-actions commented on July 19, 2024

πŸ‘‹ Hello @tangweii222, thank you for your interest in Ultralytics YOLOv8 πŸš€! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered.

If this is a πŸ› Bug Report, please provide a minimum reproducible example to help us debug it.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.

Join the vibrant Ultralytics Discord 🎧 community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users.

Install

Pip install the ultralytics package including all requirements in a Python>=3.8 environment with PyTorch>=1.8.

pip install ultralytics

Environments

YOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

Ultralytics CI

If this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.

from ultralytics.

glenn-jocher avatar glenn-jocher commented on July 19, 2024

Hello! It looks like you're trying to use a YOLOv5 model with the YOLOv8 framework, which unfortunately isn't compatible due to differences in the model architectures and training methods.

To resolve this, you have two options:

  1. Train a new model using YOLOv8: You can train a new model directly with the YOLOv8 framework to ensure compatibility.
  2. Use an official YOLOv8 model: If retraining is not feasible, consider using one of the pre-trained official YOLOv8 models for your tasks.

If you choose to train a new model and need guidance on how to set up your training in Colab with YOLOv8, feel free to ask here! 😊

from ultralytics.

tangweii222 avatar tangweii222 commented on July 19, 2024

but my custom model is trained by yolov9-c.pt. i prefer to solve this problem rather then train a new model because google colab have some limitπŸ₯²

from ultralytics.

glenn-jocher avatar glenn-jocher commented on July 19, 2024

Hello! Thanks for clarifying that your model is trained with YOLOv9. To resolve the compatibility issue without retraining, you might consider converting your YOLOv9 model to a format that can be used with YOLOv8, such as ONNX, and then using the converted model in your application.

Here’s a general approach:

  1. Export your YOLOv9 model to ONNX format.
  2. Use the ONNX model with compatible inference libraries that support ONNX models.

This method allows you to bypass the direct compatibility issues between different YOLO versions while leveraging your existing model. If you need detailed steps on how to export to ONNX and use it, I'm here to help! 😊

from ultralytics.

tangweii222 avatar tangweii222 commented on July 19, 2024

tks for reply. Let me take a moment to learn how to how to export ONNX and use it.if i still encounter any problems,i will come back to you for help.Thank you very much.

from ultralytics.

glenn-jocher avatar glenn-jocher commented on July 19, 2024

You're welcome! Take your time with the ONNX export process, and don't hesitate to reach out if you have any questions or run into issues. I'm here to help. Good luck! 😊

from ultralytics.

tangweii222 avatar tangweii222 commented on July 19, 2024

Using the code below i can export yolov9c.pt to ONNX but my custom model is failed.

from ultralytics import YOLO

# Load the YOLOv9 model
model = YOLO("yolov9c.pt") # model = YOLO("custom_model.pt") is failed

# Export the model to ONNX format
model.export(format="onnx")  # creates 'yolov9c.onnx'

# Load the exported ONNX model
onnx_model = YOLO("yolov9c.onnx")

same error code :
ModuleNotFoundError: No module named 'models'
TypeError: ERROR ❌️ /Users/tangwei/NCU/ι£›η›€ζ©Ÿε™¨δΊΊ/Yolov9/in_out_model/bgry_frisbee.pt appears to be an Ultralytics YOLOv5 model originally trained with https://github.com/ultralytics/yolov5.
This model is NOT forwards compatible with YOLOv8 at https://github.com/ultralytics/ultralytics.
Recommend fixes are to train a new model using the latest 'ultralytics' package or to run a command with an official YOLOv8 model, i.e. 'yolo predict model=yolov8n.pt'

from ultralytics.

glenn-jocher avatar glenn-jocher commented on July 19, 2024

@tangweii222 hello! It seems like the model you are trying to export (custom_model.pt) was originally trained with a different version of the Ultralytics software, which is not compatible with the current version you are using for export. This compatibility issue is causing the errors you're seeing.

To resolve this, you have a couple of options:

  1. Re-train your model using the current version of Ultralytics YOLO that you are using for export. This ensures compatibility and might also benefit from any improvements or optimizations in the newer version.
  2. Use the model with the version of Ultralytics YOLO it was originally trained with, if updating the model is not feasible.

If re-training the model is an option for you, I recommend using the latest stable release to ensure the best performance and compatibility moving forward. If you need further assistance or have more questions, feel free to ask. Good luck! 😊

from ultralytics.

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.