ultralytics / yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
50.1k stars 16.18k forks source link

Reduce false positive #12467

Closed adarshksudarsan closed 8 months ago

adarshksudarsan commented 10 months ago

Search before asking

Question

@glenn-jocher I trained a yolov5n model for 2 class person and vehicle the dataset used was coco > extracted person class from coco and gave it as class 0 then took car, bus, and truck from coco dataset and gave it as class 1(used every image that contains person or vehicle or both from the dataset, so the class balance is not good majority contains person, to be exact person >262465 and vehicle >59909) The problem I am facing is water bottles chairs etc are detected as a person with more than 50% confidence. but I can't increase the threshold by more than 50% because it affects the detection of smaller people who are far from the camera. Is there any solution to overcome this?

Additional

No response

github-actions[bot] commented 10 months ago

👋 Hello @adarshksudarsan, thank you for your interest in YOLOv5 🚀! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.

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.

Requirements

Python>=3.8.0 with all requirements.txt installed including PyTorch>=1.8. To get started:

git clone https://github.com/ultralytics/yolov5  # clone
cd yolov5
pip install -r requirements.txt  # install

Environments

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

Status

YOLOv5 CI

If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training, validation, inference, export and benchmarks on macOS, Windows, and Ubuntu every 24 hours and on every commit.

Introducing YOLOv8 🚀

We're excited to announce the launch of our latest state-of-the-art (SOTA) object detection model for 2023 - YOLOv8 🚀!

Designed to be fast, accurate, and easy to use, YOLOv8 is an ideal choice for a wide range of object detection, image segmentation and image classification tasks. With YOLOv8, you'll be able to quickly and accurately detect objects in real-time, streamline your workflows, and achieve new levels of accuracy in your projects.

Check out our YOLOv8 Docs for details and get started with:

pip install ultralytics
glenn-jocher commented 10 months ago

@adarshksudarsan hi there! 👋 To reduce false positives, you could try augmenting your dataset to include more diverse examples of the person and vehicle classes. Additionally, experimenting with different training strategies like focal loss or class balancing may also help. Check out the Ultralytics Docs for more tips on optimizing your model's performance. Good luck!

github-actions[bot] commented 9 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 ⭐