Comments (8)
Hello,
Thank you for reaching out with your question regarding the "no detection" results in YOLOv5, especially in the context of defect detection.
To address your concern, it's crucial to differentiate between true negatives (products without defects correctly identified as such) and false negatives (defective products incorrectly identified as non-defective). Here are some steps and considerations to help you distinguish between these scenarios:
-
Minimum Reproducible Example: To better assist you, could you please provide a minimum reproducible code example? This will help us understand your setup and reproduce the issue on our end. You can refer to our guide on creating a minimum reproducible example here: Minimum Reproducible Example.
-
Ensure Latest Versions: Make sure you are using the latest versions of
torch
and YOLOv5 from our repository. You can update your packages with the following commands:pip install --upgrade torch git clone https://github.com/ultralytics/yolov5 cd yolov5 pip install -r requirements.txt
-
Evaluation Metrics: Utilize evaluation metrics such as Precision, Recall, and F1-score to assess your model's performance. These metrics can help you understand the balance between false positives and false negatives. You can calculate these metrics using the validation script provided in YOLOv5:
python val.py --data your_dataset.yaml --weights your_model.pt
-
Confidence Threshold: Adjust the confidence threshold to see if it improves detection. A lower threshold might reduce false negatives but could increase false positives. You can set the confidence threshold in the inference command:
python detect.py --weights your_model.pt --img 640 --conf 0.25 --source your_data
-
Data Quality and Augmentation: Ensure your training data is representative of the defects you aim to detect. Data augmentation techniques can also help improve model robustness.
-
Model Training: If you suspect the issue is due to training, consider retraining your model with more data or fine-tuning hyperparameters. You can use the following command to train your model:
python train.py --data your_dataset.yaml --cfg yolov5s.yaml --weights yolov5s.pt --epochs 100
By following these steps, you should be able to better understand and mitigate the issue of "no detection" results. If you continue to face challenges, please share the requested details, and we'll be happy to assist you further.
from yolov5.
有明显缺陷的产品也会显示no detection
from yolov5.
@2375963934a hello,
Thank you for your question and for providing details about the issue you're encountering with YOLOv5. It sounds like you're experiencing cases where products with obvious defects are still resulting in "no detection." Let's work together to resolve this.
Steps to Diagnose and Resolve the Issue:
-
Minimum Reproducible Example:
To better understand and reproduce the issue, could you please provide a minimum reproducible code example? This will help us investigate the problem more effectively. You can refer to our guide on creating a minimum reproducible example here: Minimum Reproducible Example. -
Ensure Latest Versions:
Please make sure you are using the latest versions oftorch
and YOLOv5. Bugs and issues are often resolved in newer releases, so it's essential to be up-to-date. You can update your packages with the following commands:pip install --upgrade torch git clone https://github.com/ultralytics/yolov5 cd yolov5 pip install -r requirements.txt
-
Confidence Threshold:
Adjusting the confidence threshold might help in detecting defects that are currently being missed. You can set the confidence threshold in the inference command:python detect.py --weights your_model.pt --img 640 --conf 0.25 --source your_data
-
Evaluation Metrics:
Utilize evaluation metrics such as Precision, Recall, and F1-score to assess your model's performance. These metrics can help you understand the balance between false positives and false negatives. You can calculate these metrics using the validation script provided in YOLOv5:python val.py --data your_dataset.yaml --weights your_model.pt
-
Data Quality and Augmentation:
Ensure your training data is representative of the defects you aim to detect. Data augmentation techniques can also help improve model robustness. High-quality and diverse training data are crucial for effective defect detection. -
Model Training:
If you suspect the issue is due to training, consider retraining your model with more data or fine-tuning hyperparameters. You can use the following command to train your model:python train.py --data your_dataset.yaml --cfg yolov5s.yaml --weights yolov5s.pt --epochs 100
By following these steps, you should be able to better understand and mitigate the issue of "no detection" results for defective products. If you continue to face challenges, please share the requested details, and we'll be happy to assist you further.
Thank you for your cooperation and patience. We look forward to helping you resolve this issue! 😊
from yolov5.
这个问题是我标注过的很明显的缺陷但是还经常有漏检的情况显示no detection
from yolov5.
Hello @2375963934a,
Thank you for providing more details about the issue you're facing with YOLOv5. It sounds like you're encountering frequent false negatives, where obvious defects are not being detected. Let's work together to address this.
Steps to Diagnose and Resolve the Issue:
-
Minimum Reproducible Example:
To help us investigate the issue more effectively, could you please provide a minimum reproducible code example? This will allow us to reproduce the problem on our end and identify potential solutions. You can refer to our guide on creating a minimum reproducible example here: Minimum Reproducible Example. This step is crucial for us to understand the exact scenario you're dealing with. -
Ensure Latest Versions:
Please ensure that you are using the latest versions oftorch
and YOLOv5. Bugs and issues are often resolved in newer releases, so it's essential to be up-to-date. You can update your packages with the following commands:pip install --upgrade torch git clone https://github.com/ultralytics/yolov5 cd yolov5 pip install -r requirements.txt
-
Confidence Threshold:
Adjusting the confidence threshold might help in detecting defects that are currently being missed. You can set the confidence threshold in the inference command:python detect.py --weights your_model.pt --img 640 --conf 0.25 --source your_data
-
Evaluation Metrics:
Utilize evaluation metrics such as Precision, Recall, and F1-score to assess your model's performance. These metrics can help you understand the balance between false positives and false negatives. You can calculate these metrics using the validation script provided in YOLOv5:python val.py --data your_dataset.yaml --weights your_model.pt
-
Data Quality and Augmentation:
Ensure your training data is representative of the defects you aim to detect. Data augmentation techniques can also help improve model robustness. High-quality and diverse training data are crucial for effective defect detection. -
Model Training:
If you suspect the issue is due to training, consider retraining your model with more data or fine-tuning hyperparameters. You can use the following command to train your model:python train.py --data your_dataset.yaml --cfg yolov5s.yaml --weights yolov5s.pt --epochs 100
By following these steps, you should be able to better understand and mitigate the issue of "no detection" results for defective products. If you continue to face challenges, please share the requested details, and we'll be happy to assist you further.
Thank you for your cooperation and patience. We look forward to helping you resolve this issue! 😊
from yolov5.
大部分的预测是正常的,
from yolov5.
Hello @2375963934a,
Thank you for your message. It's great to hear that most of your predictions are working well! 😊
To address the issue of occasional missed detections (false negatives) for obvious defects, let's ensure we cover all bases:
Steps to Diagnose and Resolve the Issue:
-
Minimum Reproducible Example:
Could you please provide a minimum reproducible code example? This will help us understand your setup and reproduce the issue on our end. You can refer to our guide on creating a minimum reproducible example here: Minimum Reproducible Example. This step is crucial for us to investigate the problem effectively. -
Ensure Latest Versions:
Please verify that you are using the latest versions oftorch
and YOLOv5. Bugs and issues are often resolved in newer releases, so it's essential to be up-to-date. You can update your packages with the following commands:pip install --upgrade torch git clone https://github.com/ultralytics/yolov5 cd yolov5 pip install -r requirements.txt
-
Confidence Threshold:
Adjusting the confidence threshold might help in detecting defects that are currently being missed. You can set the confidence threshold in the inference command:python detect.py --weights your_model.pt --img 640 --conf 0.25 --source your_data
-
Evaluation Metrics:
Utilize evaluation metrics such as Precision, Recall, and F1-score to assess your model's performance. These metrics can help you understand the balance between false positives and false negatives. You can calculate these metrics using the validation script provided in YOLOv5:python val.py --data your_dataset.yaml --weights your_model.pt
-
Data Quality and Augmentation:
Ensure your training data is representative of the defects you aim to detect. Data augmentation techniques can also help improve model robustness. High-quality and diverse training data are crucial for effective defect detection. -
Model Training:
If you suspect the issue is due to training, consider retraining your model with more data or fine-tuning hyperparameters. You can use the following command to train your model:python train.py --data your_dataset.yaml --cfg yolov5s.yaml --weights yolov5s.pt --epochs 100
By following these steps, you should be able to better understand and mitigate the issue of "no detection" results for defective products. If you continue to face challenges, please share the requested details, and we'll be happy to assist you further.
Thank you for your cooperation and patience. We look forward to helping you resolve this issue! 😊
from yolov5.
👋 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:
- Docs: https://docs.ultralytics.com
- HUB: https://hub.ultralytics.com
- Community: https://community.ultralytics.com
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 yolov5.
Related Issues (20)
- Syntax and understanding questions about reading tensorflow lite results HOT 1
- A Error which blast my mind.... HOT 1
- Yolov5 Int8 export in PyTorch HOT 10
- Video inference with YOLOv5 model in python HOT 3
- How to disable or add new scales of prediction? HOT 5
- Installation on Windows 7 32 bits HOT 3
- Artificial Neural Network - interpreting model.save output HOT 1
- Origin of warmup_bias_lr? HOT 3
- Silicon Mac GPU Support for training HOT 1
- Split features map of data HOT 1
- incorrect detections for cars after fine-tuning yolov5l HOT 1
- tried to run yolov5 "detect.py" with pretrained model yolov8x.pt and xView.yaml HOT 1
- Low disk space causes memory leak HOT 3
- Error with fbgemm.dll file when using Torch! HOT 5
- Yolov5 inventing label on validation set HOT 1
- challenges faced in Xtream1 tool while creating class ID's HOT 1
- Facing issues while changing class ID values HOT 1
- background color of image and other causes? HOT 1
- ModuleNotFoundError: No module named 'models.yolo'. HOT 3
- RuntimeError: The size of tensor a (80) must match the size of tensor b (60) at non-singleton dimension 3 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yolov5.