text: Title: How to solve imbalanced dataset oversampling problem in multi labels-classes instance segmentation task?
  Body: 
  I want to use models like [YOLOv7-seg](https://github.com/WongKinYiu/yolov7/tree/u7/seg) for instance segmentation of tree species in images. There are 26 species of trees, and each image may contain multiple species. There is a distinction between dominant and non-dominant species, with dominant species having more samples than non-dominant ones, leading to imbalanced data and potential overfitting.
  
  To address this issue, I have performed augmentation to oversample images containing non-dominant species, aiming to balance the dataset and avoid overfitting.
  
  However, if an image containing non-dominant species also includes other dominant species, the samples of dominant species will also be oversampled, I have calculate a simple linear equation like Ax = b to solve how many times I need to perform oversampling for each image, but the when I use `scipy.optimize.linprog` function in scipy, and set the parameter `bounds=(0, None)`, the return answer will be `message: The problem is infeasible. (HiGHS Status 8: model_status is Infeasible; primal_status is At lower/fixed bound)`, making it impossible to balance the dataset permanently.
  
  In the Ax = b linear equation:
  
  A is an (26 rows x 101 columns) array like following table, the row attribute "sp1, sp2, ..." means the species classes, and the column attribute "img1, img2, ..." means each image in dataset, the numbers means how many instances of that species are there in the image.
  
  ```
       img0   img1  ...  img99  img100
  sp1   5      5    ...   4        4 
  sp2   1      0    ...   0        0 
  sp3   24     2    ...   1        1 
   :
  sp26  0      0    ...   1        0 
  ```
  
  x is an (101 rows) array means how many times I need to perform oversampling for each image:
  ```
  [x0
   x2
   :
   x100]
  ```
  
  b is an (26 columns) array means the maximum instances numbers I want for each species final, because I need balanced dataset, so they will be the same numbers like this:
  ```
  [500
   500
   :
   500]
  ```
  
  If I train directly using the original imbalanced dataset, the result will obviously over-fitting, the dominant species accuracy show almost 1 in confusion matrix, are there any other solutions to this problem like training model by each classes or augumentation by bounding box not image, and I also tried adjust focal_loss, but that is not enough for this task.
  
  Please accept my deepest gratitude in advance, and I apologize for my poor English skills.
  