<p>I am working on an object detection model and have thought of looking into stratified splits for the dataset.</p>
<p>Now since I am doing object detection I have a variable number of &quot;labels&quot; for every image because in each image there is variable number of occurrences for each object I am looking for (car, truck, motorbike, etc.).</p>
<p>Obviously single-label stratification does not apply.</p>
<p>From what I understand multi-label stratification is only applicable if there are basically label &quot;features&quot; that we know are always present, which does not seem the case here.</p>
<p>My question is... is there a way to perform stratified split in this case so that in each split there is roughly the same number of cars/trucks/bikes/etc.? (Or is it going to actually improve the results at all?)</p>

CC BY-SA 4.0
2020-07-30T14:20:32.460Z
group them on the basis of the feature of the multilabel
Rithik Banerjee
CC BY-SA 4.0
2020-07-31T05:04:06.440Z
@RithikBanerjee can you please explain in more detail? The very definition of multilabel seems to be that there are multiple features which can be considered labels.
Rares Dima
CC BY-SA 4.0
2021-02-18T23:05:59.807Z
@RaresDima Did you find an optimal solution?
Sadra
CC BY-SA 4.0
2021-03-11T16:08:16.070Z
@SadraNaddaf no. There isn't one. The best you can do is consider this as a partitioning problem and approach it in a greedy way because of the massive amount of data.
Rares Dima
CC BY-SA 4.0
2021-03-12T03:21:26.917Z
@sadranaddaf  If you explain and clarify your question I can post my experience/code as an answer here. If you have roughly split each label to train/dev/test with 70%/10%/15% so then you have ended up with a different number of images in each set but they roughly have an equal % of each class label. Is it the same as what you want? I did a similar thing on my OD task.
Sadra
CC BY-SA 4.0
2021-03-15T06:27:40.003Z
@RaresDima I should have mentioned you in previous comment
Sadra
<datasets><data-preprocessing>
Multilabel stratified split for images/object detection
Rares Dima
# Multilabel stratified split for images/object detection

(Asked by: username_0 on 2020-07-30)

I am working on an object detection model and have thought of looking into stratified splits for the dataset.

Now since I am doing object detection I have a variable number of "labels" for every image because in each image there is variable number of occurrences for each object I am looking for (car, truck, motorbike, etc.).

Obviously single-label stratification does not apply.

From what I understand multi-label stratification is only applicable if there are basically label "features" that we know are always present, which does not seem the case here.

My question is... is there a way to perform stratified split in this case so that in each split there is roughly the same number of cars/trucks/bikes/etc.? (Or is it going to actually improve the results at all?)

**Tags:** datasets, data-preprocessing

> **Comments:**
> **username_1**: group them on the basis of the feature of the multilabel  
> **username_0**: @RithikBanerjee can you please explain in more detail? The very definition of multilabel seems to be that there are multiple features which can be considered labels.  
> **username_2**: @RaresDima Did you find an optimal solution?  
> **username_0**: @username_2Naddaf no. There isn't one. The best you can do is consider this as a partitioning problem and approach it in a greedy way because of the massive amount of data.  
> **username_2**: @sadranaddaf  If you explain and clarify your question I can post my experience/code as an answer here. If you have roughly split each label to train/dev/test with 70%/10%/15% so then you have ended up with a different number of images in each set but they roughly have an equal % of each class label. Is it the same as what you want? I did a similar thing on my OD task.  
> **username_2**: @RaresDima I should have mentioned you in previous comment  

---

## 0 answers

