is it possible to affect on class weights due to the imbalance of my dataset (6 classes all, 3 classes have small size and 3 balanced), I would change them accordingly so that the model learns better, or does it automatically in the loss function in YOLOv7?
thanks a lot
and have also next problem – when training the yolov7 model (a dataset of 10k images with 90k instances) – training on 16 batch sizes with 8 dataloaders goes well and one epoch is about 1-2 minutes, when I try to increase the batch size to 32 with 8 or 6 dataloaders – two epochs of 2-3 minutes each pass, and on the 3rd epoch learning simply gets stuck, and one epoch lasts about 20 minutes, and then it can expand and the epoch will take 2-3 waves, and it can continue to freeze and learn for 20 minutes each epoch.
when I teach Yolo 8 or Yolo 9 for 32 epochs, there is no such problem.
hardware – intel i9, cpu 64 gb, gpu – nvidia gforce 4090rtx 24gb
i don`t know what happend
and when i run same on 30 batch – all goes well
maybe someone has met a similar situation 🙂
I tried to find where to replace the class weights in the Yolov7 code – I couldn’t find it, everything is quite complex, in Yolov8 it’s somehow easier to replace the weights and replace the loss function.
and for problem with batch size – have no idea what to do/
Artem N is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.