I trained a YOLO V8 model using a dataset downloaded from here, and I used Ultralytics and Roboflow library.
I used the following command (using the pre-trained model yolov8n.pt
downloadable here):
yolo task=detect mode=train model=C:\Training\yolov8n.pt data=C:\DATASET\DIRECTORY\data.yaml epochs=20 imgsz=640
this command created a file named best.pt
in:
C:\Users\USERNAME\runs\detect\train\weights
which I was able to use for detecting objects. However I'm not completely satisfied with the results, so I'd like to update the training (keeping the previous training) with another dataset. Is there a specific command for doing so?
Thank you!
The easiest way here is to start the training on a new dataset from your best.pt
checkpoint:
yolo task=detect mode=train model=C:\Users\USERNAME\runs\detect\train\weights\best.pt data=C:\DATASET\DIRECTORY\data.yaml epochs=20 imgsz=640
There are some nuances.
In case you need the model to equally consider the information from the different datasets, it is better to unite them into one and train the model on this united data.