Giter VIP home page Giter VIP logo

Comments (5)

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

👋 Hello @Youssef-100, 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.

Youssef-100 avatar Youssef-100 commented on July 22, 2024

Hello! Thank you very much for your fast reply. Unfortunately the issue has not been resolved ,It shows the same error in both cases

from ultralytics.

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

Hi there! Sorry to hear the issue persists. Let's try a couple more things:

  1. For TFLite, try using the dynamic=True option:

    model.export(format='tflite', dynamic=True)
  2. For NCNN, ensure all dependencies are up-to-date and try reducing the input size further:

    model.export(format='ncnn', half=True, imgsz=224)

If these don't work, please share more details or logs. We're here to help! 😊

from ultralytics.

Youssef-100 avatar Youssef-100 commented on July 22, 2024

Hi Glenn! I am really sorry to bother you!
The NCNN shows the error below:
(force batch axis 233 for operand 241
force batch axis 233 for operand 242
binaryop tensor0 with rank 6 is not supported yet!
binaryop tensor1 with rank 6 is not supported yet!
binaryop tensor0 with rank 6 is not supported yet!
munmap_chunk(): invalid pointer
NCNN: export failure ❌ 62.9s
subprocess.CalledProcessError: Command '['/home/youssef/project/project/lib/python3.11/site-packages/ultralytics/pnnx', 'best.torchscript', 'ncnnparam=best_ncnn_model/model.ncnn.param', 'ncnnbin=best_ncnn_model/model.ncnn.bin', 'ncnnpy=best_ncnn_model/model_ncnn.py', 'pnnxparam=best_ncnn_model/model.pnnx.param', 'pnnxbin=best_ncnn_model/model.pnnx.bin', 'pnnxpy=best_ncnn_model/model_pnnx.py', 'pnnxonnx=best_ncnn_model/model.pnnx.onnx', 'fp16=1', 'device=cpu', 'inputshape="[1, 3, 224, 224]"']' died with <Signals.SIGABRT: 6>.)

While for the TFLITE ERROR:
ValueError: A KerasTensor cannot be used as input to a TensorFlow function. A KerasTensor is a symbolic placeholder for a shape and dtype, used when constructing Keras Functional models or Keras Functions. You can only use it as input to a Keras layer or a Keras operation (from the namespaces keras.layers and keras.operations). You are likely doing something like:
input_onnx_file_path: best.onnx
ERROR: onnx_op_name: /model.0/stem1/conv/Conv
ERROR: Read this and deal with it. https://github.com/PINTO0309/onnx2tf#parameter-replacement
ERROR: Alternatively, if the input OP has a dynamic dimension, use the -b or -ois option to rewrite it to a static shape and try again.
ERROR: If the input OP of ONNX before conversion is NHWC or an irregular channel arrangement other than NCHW, use the -kt or -kat option.
ERROR: Also, for models that include NonMaxSuppression in the post-processing, try the -onwdt option.

Thank You so much for your help!

from ultralytics.

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

Hi there!

No bother at all! 😊 Thank you for providing the detailed error messages.

For the NCNN export issue, it seems like the model's tensor rank is causing problems. This might be due to the complexity of the RTDETR model. Unfortunately, NCNN might not fully support all operations used in this model.

For the TFLite export, the error suggests a problem with the ONNX to TensorFlow conversion. You might want to try the suggested parameter replacements or static shape rewrites as mentioned in the error message. Additionally, using the -kt or -kat options could help if the input OP has an irregular channel arrangement.

If these solutions don't work, consider simplifying the model or using a different model architecture that is known to be compatible with TFLite and NCNN.

Feel free to reach out if you need further assistance!

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.