Giter VIP home page Giter VIP logo

Comments (6)

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

Great to hear that increasing imgsz improved accuracy! πŸŽ‰

The choice of 832 isn't magic but rather a balance between resolution and performance. Larger sizes help detect smaller objects better. Feel free to experiment with different sizes to find the optimal one for your use case.

Good luck, and happy detecting! πŸš€

from ultralytics.

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

πŸ‘‹ Hello @nithrous, 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.

nithrous avatar nithrous commented on July 22, 2024

Here is the target image:
image

So i'm detecting small items. Tried another one pic, had some results, but precision is few times lower.
Also tried to use yolov8m instead yolov8n. Have some progress, but it cannot detect all objects, the precision is 40 percent vs 90 using regular yolo

Also noticed this output line:
deepsparse.pipeline WARNING Could not create v2 'yolov8' pipeline, trying legacy

from ultralytics.

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

@nithrous it looks like you're dealing with a few issues related to model performance and pipeline creation warnings when using DeepSparse with your YOLOv8 models.

  1. Model Precision: The drop in precision when switching from YOLOv8n to YOLOv8m and using DeepSparse might be due to the differences in model architecture and how well each model handles the sparsity. YOLOv8m is generally more complex than YOLOv8n, which could affect its performance under sparsity.

  2. Detection of Small Objects: If your target objects are small, you might need to adjust the model's anchor sizes or the input resolution to better capture the details of smaller objects. Increasing the input resolution can help the model detect smaller objects more accurately.

  3. Pipeline Warning: The warning about the pipeline could indicate an issue with the compatibility of the model or the specific configuration of DeepSparse. Ensure that your ONNX model is exported correctly with the appropriate opset version and that it's compatible with the DeepSparse version you're using.

Here's a quick check you can do to ensure your ONNX model is set up correctly for DeepSparse:

from deepsparse import compile_model
model = compile_model(model_path="path_to_your_model.onnx", batch_size=1)
print(model)

This will give you an idea if the model is loaded correctly without initiating the full pipeline.

For improving detection on small objects, consider experimenting with different image sizes during the export:

yolo export model=yolov8n.pt format=onnx imgsz=832,832 opset=13

Using a larger imgsz might help improve the detection of smaller objects.

If these adjustments don't help, I recommend revisiting the training phase to ensure your model is well-tuned for the specifics of your dataset, especially regarding small object detection.

from ultralytics.

nithrous avatar nithrous commented on July 22, 2024

@nithrous it looks like you're dealing with a few issues related to model performance and pipeline creation warnings when using DeepSparse with your YOLOv8 models.

  1. Model Precision: The drop in precision when switching from YOLOv8n to YOLOv8m and using DeepSparse might be due to the differences in model architecture and how well each model handles the sparsity. YOLOv8m is generally more complex than YOLOv8n, which could affect its performance under sparsity.
  2. Detection of Small Objects: If your target objects are small, you might need to adjust the model's anchor sizes or the input resolution to better capture the details of smaller objects. Increasing the input resolution can help the model detect smaller objects more accurately.
  3. Pipeline Warning: The warning about the pipeline could indicate an issue with the compatibility of the model or the specific configuration of DeepSparse. Ensure that your ONNX model is exported correctly with the appropriate opset version and that it's compatible with the DeepSparse version you're using.

Here's a quick check you can do to ensure your ONNX model is set up correctly for DeepSparse:

from deepsparse import compile_model
model = compile_model(model_path="path_to_your_model.onnx", batch_size=1)
print(model)

This will give you an idea if the model is loaded correctly without initiating the full pipeline.

For improving detection on small objects, consider experimenting with different image sizes during the export:

yolo export model=yolov8n.pt format=onnx imgsz=832,832 opset=13

Using a larger imgsz might help improve the detection of smaller objects.

If these adjustments don't help, I recommend revisiting the training phase to ensure your model is well-tuned for the specifics of your dataset, especially regarding small object detection.

Your advice to increase imgsz helped, accuracy increased dramatically, without significant performance loss
compile_model from deepsparse loaded the model successfully, will ask about "legacy warning" deepsparse guys
Thanks a lot!

Why did you adviced to try 832 img size? Is there some magic number set?

from ultralytics.

github-actions avatar github-actions commented on July 22, 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 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.