Comments (6)
i ask the gpt, it tells me to disable AMP with amp=False. and it will skip the check! i want to know the use of amp check? if i disable it? then what impact will it bring?
from ultralytics.
oh!!!my goad!!! after my training, my best.pt now only can detect the rotor, other classes all miss! and maybe the sample is too less, only 10 .png, the detection effect is very poor, how can i improve my detection?
from ultralytics.
oh!i just use yolov8s.pt and renamed "yolov8s_rotor.pt" as pretrained model, but when i use yolov8n.pt and renamed "yolov8n_rotor.pt", and then "TensorBoard: Start with 'tensorboard --logdir runs/detect/train', view at http://localhost:6006/
Freezing layer 'model.22.dfl.conv.weight'
AMP: running Automatic Mixed Precision (AMP) checks with YOLOv8n...
Downloading https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt to 'yolov8n.pt'...
AMP: checks skipped
train: Scanning /home/zp/rm_ws/src/dual_visual/Yolov8_ros/yolov8_ros/data/train/labels... 10 images, 0 backgrounds, 0 corrupt: 100%|██████████| 10/10 [00:00<00:00, 77.54it/s]"!
then it skip downloading!!! and so whatsi the problem? but when i train the twice,
#!/home/zp/anaconda3/envs/yolov8/bin/python3
-- coding: utf-8 --
from ultralytics import YOLO
import rospkg
rospack = rospkg.RosPack()
yolov8_ros_path = rospack.get_path('yolov8_ros')
model = YOLO(f"{yolov8_ros_path}/weights/yolov8n_rotor.pt") # load a pretrained model (recommended for training)
Train the model with GPU
results = model.train(data=f"{yolov8_ros_path}/data/yolov8.yaml", epochs=100, imgsz=640, workers=16,device=0)
it comes again:
TensorBoard: Start with 'tensorboard --logdir runs/detect/train', view at http://localhost:6006/
Freezing layer 'model.22.dfl.conv.weight'
AMP: running Automatic Mixed Precision (AMP) checks with YOLOv8n...
Downloading https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt to 'yolov8n.pt'...
10%|█████████████▊ | 640k/6.23M [01:32<13:51, 7.07kB/s]
and the downloading speed is so slow!
from ultralytics.
Hello!
It sounds like you're encountering a common issue when adding new classes to a pretrained model. Here are a few steps to improve your model's detection capabilities:
-
Increase Dataset Size: 10 images are quite minimal for training a robust model. Try to increase the number of images for the new class. More diverse and numerous training examples will help improve the model's ability to generalize.
-
Rebalance Dataset: Ensure that your dataset includes a balanced number of images for each class. An imbalance can lead the model to favor the overrepresented classes.
-
Data Augmentation: Implement data augmentation to artificially expand your training dataset. This includes transformations like rotation, scaling, flipping, and color adjustment.
-
Fine-tuning: Instead of training from scratch, continue training (fine-tuning) from a model that has already been trained on other classes. This helps the model retain knowledge learned from the original dataset.
-
Regular Evaluation: Frequently validate your model on a separate validation set to monitor its performance on unseen data. This helps in catching overfitting early.
-
Hyperparameter Tuning: Experiment with different learning rates, batch sizes, and other training parameters. Sometimes minor adjustments can lead to significant improvements.
By expanding your dataset and ensuring a balanced, diverse set of training examples, you should see an improvement in your model's performance. Keep iterating and good luck!
from ultralytics.
Hello!
It sounds like you're encountering a common issue when adding new classes to a pretrained model. Here are a few steps to improve your model's detection capabilities:
- Increase Dataset Size: 10 images are quite minimal for training a robust model. Try to increase the number of images for the new class. More diverse and numerous training examples will help improve the model's ability to generalize.
- Rebalance Dataset: Ensure that your dataset includes a balanced number of images for each class. An imbalance can lead the model to favor the overrepresented classes.
- Data Augmentation: Implement data augmentation to artificially expand your training dataset. This includes transformations like rotation, scaling, flipping, and color adjustment.
- Fine-tuning: Instead of training from scratch, continue training (fine-tuning) from a model that has already been trained on other classes. This helps the model retain knowledge learned from the original dataset.
- Regular Evaluation: Frequently validate your model on a separate validation set to monitor its performance on unseen data. This helps in catching overfitting early.
- Hyperparameter Tuning: Experiment with different learning rates, batch sizes, and other training parameters. Sometimes minor adjustments can lead to significant improvements.
By expanding your dataset and ensuring a balanced, diverse set of training examples, you should see an improvement in your model's performance. Keep iterating and good luck!
nice to receive your reply!
Normally, how many pictures are needed for a class to ensure a good effect? I use the original yolov8n.pt model and add the categories and corresponding images I need to resume training(config: resume: true). Do I need to download the original dataset (which contains a lot of images and takes up a lot of local memory)?
from ultralytics.
@zp2546265641 hello!
Great questions! The number of images required for effective training can vary widely depending on the complexity of the objects and the variability in the images. Generally, a few hundred images per class are recommended for a robust model, but more can be beneficial, especially in complex scenarios.
Regarding your training setup, using the resume: true
configuration with the original yolov8n.pt
and adding your categories is a good approach. You don't necessarily need to download the entire original dataset if you're continuing training with additional classes. Just ensure your added dataset is sufficiently representative of the conditions under which you expect the model to perform.
Keep focusing on gathering quality, varied data for your new classes, and you should see improvements. Good luck! 🚀
from ultralytics.
Related Issues (20)
- In a target detection task, why does class overlap cause map to converge to 1 HOT 4
- precision and recall are very high, but the true positives (TP) in the confusion matrix are very low HOT 4
- cpu ram memory increase from one epoch to another HOT 6
- Bad text detection x coordinate result!! HOT 7
- The outputs of VAL and PREDICT results are different. HOT 3
- YOLOv8 precision and recall all higher than YOLOv7,but YOLOv8 in confusion matrix TP is lower than YOLOv7,how con I solve this problem? HOT 1
- CUSTOM YOLO POSE TRAINING for Human3.6m dataset HOT 2
- add last_hidden_state function get last layer vector HOT 2
- Keeping model ready to detection HOT 2
- How to use text training in a classification model HOT 4
- I still get this : ModuleNotFoundError: No module named 'numpy._core' when I try all 3 ways mentioned above HOT 2
- How to get an output as a timestamp? HOT 6
- Large Output Video Size with Yolov8 Predict Mode HOT 2
- confusion matrix & index HOT 1
- How to reduce to 100 epochs without retraining after 200 epochs of simulation? HOT 3
- UnboundLocalError for 'ckpt_file' while running model.tune() HOT 2
- AttributeError: Can't get attribute 'v10DetectLoss' on <module 'ultralytics.utils.loss' from 'C:\\Users\\JFerreira\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\ultralytics\\utils\\loss.py' HOT 1
- Changing the C2f block fixes the pruning but how can I make it work with its own architecture? HOT 1
- Picking instance segmentation in roboflow for yolov8-obb HOT 5
- Yolo v10 is slower than v8? HOT 9
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.