Comments (4)
π Hello @Himmelsw4nderer, 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):
- Notebooks with free GPU:
- Google Cloud Deep Learning VM. See GCP Quickstart Guide
- Amazon Deep Learning AMI. See AWS Quickstart Guide
- Docker Image. See Docker Quickstart Guide
Status
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.
@Himmelsw4nderer hi there,
Thank you for providing a detailed description of the issue and the relevant code snippets. Let's work through this step by step to understand and resolve the problem you're encountering with the validation of your classification model.
Initial Checks
-
Reproducibility: To ensure we can reproduce the issue, could you please confirm that the provided code snippets are complete and can be run as-is? If there are any additional dependencies or configurations required, please include those details.
-
Package Versions: Ensure you are using the latest versions of
torch
andultralytics
. You can update them using:pip install --upgrade torch ultralytics
Analysis
From your description, it seems like there are inconsistencies between the training and validation results, particularly with the confusion matrix. Here are a few points to consider:
-
Training and Validation Data: Ensure that the training and validation datasets are correctly split and that there is no data leakage between them. This can significantly affect the model's performance.
-
Background Class: You mentioned removing the background class improved the results. This suggests that the background class might be causing confusion during training. Ensure that the background class is correctly labeled and that the model is appropriately configured to handle it.
-
Custom Validation Script: Your custom validation script seems to be working correctly, but the discrepancy between the training and validation confusion matrices suggests there might be an issue with how the data is being processed or evaluated.
Suggested Steps
-
Verify Data Splits: Double-check your data splits to ensure there is no overlap between training and validation datasets.
-
Model Configuration: Ensure that the model configuration is consistent between training and validation. This includes image preprocessing steps, class labels, and any augmentation techniques used.
-
Use Built-in Validation: To isolate the issue, try using the built-in validation method provided by Ultralytics without any custom scripts. This can help determine if the issue lies within the custom validation logic.
Example Code for Built-in Validation
Hereβs an example of how to use the built-in validation method:
from ultralytics import YOLO
# Load your trained model
model = YOLO('runs/classify/train33/weights/best.pt')
# Validate the model on the validation dataset
results = model.val(data='datasets/fold_4/val')
print(results)
Additional Resources
For more detailed information on validation, you can refer to the Ultralytics documentation on model validation.
If the issue persists after these checks, please provide any additional logs or error messages that might help in diagnosing the problem further.
Feel free to reach out with any more questions or updates on your progress. We're here to help! π
from ultralytics.
Hi,
there were some issues in the formatting of markup, so the code was incomplete at the top.
I was already on the newest versions of ultralytics and torch
Using:
from ultralytics import YOLO
# Load your trained model
model = YOLO('runs/classify/train33/weights/best.pt')
# Validate the model on the validation dataset
results = model.val(data='datasets/fold_4')
print(results)
results in the same confusion matrix as my custom script:
So only the ClassificationValidator
class seems to result in a confusing confusion matrix
from ultralytics.
Related Issues (20)
- fReE** MoNoPoLy gO DiCe gEnErAtOr 2024 FrEe uNlImItEd dIcE RoLlS HOT 2
- FrEe@~ cAsH ApP MoNeY GeNeRaToR 2024-2025_GeT FrEe cAsH ApP CoDeS_No sUrVeY [srt+w] HOT 2
- ##(mOnOpOlY Go)** UnLiMiTeD DiCe rOlLs aNd mOnEy gEnErAtOr cHeAtS 2024 (FrEsH StRaTeGy) HOT 2
- nEW.eDITION@!~ mONOPOLY go dICE GENERATOR 2024-2025- nO hUMAN vERIFICATION HOT 2
- GeT@~! mOnOpOlY Go dIcE GeNeRaToR LiNkS WoRkInG (2024-2025) No vErIfIcAtIoN [uD5M] HOT 2
- (MoNoPoLy.gO)!** GeNeRaToR FrEe dIcE RoLlS AnD MoNeY 2024-2025_No vErIfIcAtIoN (aNdRoId iOs mOd) HOT 2
- wOrKiNg@~EdItIoN_$750 cAsH ApP MoNeY - FrEe cAsH ApP MoNeY GeNeRaToR 2024-2025 WiTh pErFeCt rEvIeW [ser5] HOT 2
- (ToDaY'S.UpDaTe)!~ UlTiMaTe fReE CaSh aPp mOnEy gEnErAtOr-2024-2025_[WiThOuT-HuMaN-VeRiFiCaTiOn] [huw] HOT 2
- gEt**[nEw-cOdEs~]~@ fReE CaSh aPp mOnEy gEnErAtOr 2024-2025 cAsH-ApP-CoDeS-GeNeRaToR [d+e4] HOT 2
- fReE.EaRnInG** GeT FrEe $750 CaSh aPp mOnEy gEnErAtOr 2024-2025~ WiThOuT HuMaN VeRiFiCaTiOn [df69] HOT 2
- (nEw.uPdAtEd)@~ FrEe mOnOpOlY Go dIcE GeNeRaToR 2024-2025 GeT FrEe nOw HOT 2
- @![FrEe-uNlImItEd]!~ GeT MoNoPoLy gO DiCe gEnErAtOr 2024-2025_fReE UnLiMiTeD MoNoPoLy gO DiCe [Jr6l] HOT 2
- mOnOpOlY FrEe dIcE GeNeRaToR 2024_uNlImItEd rOlLs oN OuR FrEe dIcE GeNeRaToR HOT 2
- HoW To gEt@!~ FrEe dIcE On mOnOpOlY Go dIcE GeNeRaToR 2024-2025_KeEp rOlLiNg HOT 2
- wOrKiNg@~ mOnOpOlY Go dIcE GeNeRaToR 2024-2025- nO HuMaN VeRiFiCaTiOn HOT 2
- OBB task do not support `save_crop` HOT 6
- Cache is on, but param cache=False (by default) HOT 6
- How to improve and modify the ZH documentation HOT 1
- masks Cropping 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 ultralytics.