GithubHelp home page GithubHelp logo

Comments (5)

glenn-jocher avatar glenn-jocher commented on June 24, 2024

Hello,

Thank you for reaching out with your query regarding the differences in evaluation metrics between pycocotools and Ultralytics' built-in model.val() method.

The discrepancies you're observing might be due to several factors, including differences in the IoU thresholds, area ranges, and maximum detections (maxDets) settings used during evaluation. Ultralytics' model.val() method and pycocotools might not use identical default settings for these parameters.

To align the evaluation metrics more closely with those provided by pycocotools, you can adjust the IoU thresholds and other relevant parameters in the YOLOv8 validation configuration to match those used by pycocotools. This should help in achieving a fairer comparison between different models.

If you need specific guidance on how to adjust these settings or further assistance, please feel free to ask!

from ultralytics.

aliencaocao avatar aliencaocao commented on June 24, 2024

Yes whats the parameters used by ultralytics and how can i replicate on pycocotools in another repo?

Or, if its easier, how do I replicate pycococools by changing ultralytics implementation?

from ultralytics.

glenn-jocher avatar glenn-jocher commented on June 24, 2024

Hello!

To align the evaluation metrics between Ultralytics and pycocotools, you can adjust the parameters in Ultralytics' validation settings to match those typically used by pycocotools. Here are the key parameters you might consider:

  1. IoU Thresholds: pycocotools often uses a range of IoU thresholds from 0.50 to 0.95 for calculating average precision. Ensure your Ultralytics validation settings use the same range.

  2. Area Ranges: pycocotools categorizes object detections into small, medium, and large based on their area. You can specify similar categorizations in Ultralytics settings if not already set.

  3. Max Detections (maxDets): This parameter is crucial for calculating average recall. Set this to the same values used in pycocotools (e.g., 1, 10, 100).

To adjust these settings in Ultralytics, you can modify the validation configuration file or pass these parameters directly through the CLI or Python API. For example:

model.val(data='dataset.yaml', imgsz=640, conf=0.25, iou_thres=0.6, max_det=100)

This should help you achieve comparable evaluation metrics between the two tools. If you need more specific adjustments or further assistance, please let me know! 🚀

from ultralytics.

aliencaocao avatar aliencaocao commented on June 24, 2024

Thank you.

from ultralytics.

glenn-jocher avatar glenn-jocher commented on June 24, 2024

Hello,

Thank you for reaching out! To help us investigate the issue effectively, could you please provide a minimum reproducible code example? This will allow us to replicate the problem on our end and work towards a solution. You can find guidelines on how to create a minimum reproducible example here.

Additionally, please ensure that you are using the latest versions of torch and ultralytics. If you haven't already, you can upgrade your packages with the following commands:

pip install --upgrade torch
pip install --upgrade ultralytics

Once you've updated your packages and provided the reproducible code, we'll be able to dive deeper into the issue. If you have any other questions or need further assistance, feel free to ask! 😊

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.