incremental training yolov8

Hello friend, I am resorting to this means because I am about to give up. I am trying to do an incremental training with yolov8 and ultralitycs in google colab, the first training I did with the people class, the annotations at 0 in yaml perfectly configured with a single class and the pretrained model used yolov8m, I trained it with 50 epochs and used a data ser of just over 5000 images:! yolo train data = ‘/content/dataset/persona.v1/data.yaml’ model = ‘yolov8m,pt’ epochs = 50 batch = 64 imgsz = 640 lr0 = 0.0005 name = ‘primer_train_incremental’ and so far so good, then the second training! yolo train data = ‘/content/dataset/carro.v1/data.yaml’ model = ‘/content/runs/detect/primer_train_incremental2/weights/best.pt’ epochs=50 batch=64 imgsz=640 lr0=0.0005 freeze=10 name=‘segundo_train_incremental’ and use as pre-trained model the best.pt result of the first training with a car dataset of just over 5000 images and the annotations in 1 the yaml: nc: 2
names: [‘persona’,‘car’], but whatever I do I lose the previous training, that is, it stops detecting the person, I tried to freeze 5, 10, 15 and 20 layers, it is the maximum that my equipment allows me, but I always lose what was trained previously. What am I doing wrong?

@Gianfranco_Tonti what you’re attempting to do “incremental training” is not feasible. ALL classes you wish to have the model detecting must be present during training. Models don’t have “memory” and if you remove data for an additional training session, the model will not be able to detect these.

If you want to use the classes [‘persona’,‘car’] then you must train with all the annotated data for these classes. You can’t train only for persona and then for car and expect the model to “remember” persona as the weights will be updated to only work with the annotated data it the model was trained on.