---
description: >-
  Here, we will learn how to create a new Dataset version with less labels in
  order to specify a model
---

# Create a new Dataset Version with merged labels

## Let's do it with an example !

### Objectives&#x20;

We want to build a Dataset in order to train a model to differentiate people from vehicles in an aerial view, but unfortunately we do not have a custom Dataset for this precise task.&#x20;

**Hopefully we do have a Dataset that could be a great fit with some modifications.**

We have a Dataset called  VizDrone Dataset (available on our Dataset Hub), that contains 6470 pictures, and more thant 30k + objects annotated with the given repartition.&#x20;

![](https://2100239547-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M78aoA9Gcxf25O1fNjm%2F-Me-F-X4T0EFl4oQ_NQN%2F-Me-GF3AhfN6_fRQTayX%2Fimage.png?alt=media\&token=4a6b2ba8-5a83-4f2e-b588-8cf39fdea3be)

{% hint style="danger" %}
As you can see, the Dataset repartition is quite unbalanced, but don't worry, we'll find a solution&#x20;
{% endhint %}

### Creation the right version of this Dataset

Ok, so let's create a new version of this Dataset in order to perform operations on it. &#x20;

![](https://2100239547-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M78aoA9Gcxf25O1fNjm%2F-Me-F-X4T0EFl4oQ_NQN%2F-Me-G_DZ11WntQE-KfVA%2Fimage.png?alt=media\&token=5a5396d0-c3fc-4113-b15e-60d5f4ce792d)

First let's go the VizDrone Dataset overview and select all assets&#x20;

![](https://2100239547-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M78aoA9Gcxf25O1fNjm%2F-Me-F-X4T0EFl4oQ_NQN%2F-Me-GiQDxO8eFttR_do9%2Fimage.png?alt=media\&token=16a9d566-f18a-4e6b-9c58-7fcf172026c6)

Then click on `create new version :)`

![](https://2100239547-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M78aoA9Gcxf25O1fNjm%2F-MT6h7KYY0xjbSI4rk2W%2F-MTA33J_-UzMgK4FxO2R%2Fimage.png?alt=media\&token=18a30d5b-8032-4961-ad2e-41ad2fabf901)

We will call it `tutorial`  , now click on "Create blank" in order to create a dataset with all the images but no configured labels and annotations.

The version creation can be quite long, but don't worry you can change page of grab a cup of tea !

![](https://2100239547-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M78aoA9Gcxf25O1fNjm%2F-Me-F-X4T0EFl4oQ_NQN%2F-Me-HMlB2pfxOmxbYTIt%2Fimage.png?alt=media\&token=27983d8f-2d34-4f00-bbcc-228a39c25608)

We can see that our 'tutorial' version of our Vizdrone dataset has been correctly created, now click on the 'Settings' button to go configure your labels.

### Configure your new labels

We can go to the 'Labels' tab in our settings just like below to start the configuration.

![](https://2100239547-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M78aoA9Gcxf25O1fNjm%2F-Me-F-X4T0EFl4oQ_NQN%2F-Me-Hsttlent752kqC3o%2Fimage.png?alt=media\&token=360b1c06-aadf-4a69-bbcd-60f0779d2a2b)

Click on 'New Labels', you should see a list of available tasks appear below

![](https://2100239547-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M78aoA9Gcxf25O1fNjm%2F-Me-F-X4T0EFl4oQ_NQN%2F-Me-J8G0o0KBGrWP1KaC%2Fimage.png?alt=media\&token=55a50af3-9fe8-4b34-a6f1-6713a739ab91)

Our original dataset is annotated with bounding-boxes so we will select 'Object Detection' as our task.

![](https://2100239547-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M78aoA9Gcxf25O1fNjm%2F-Me-F-X4T0EFl4oQ_NQN%2F-Me-g_bMsKhyokqYNfdG%2Fimage.png?alt=media\&token=b7e556d3-525a-44dc-9659-1fef81fea506)

Now you can enter new labels, we have only created the label 'people' and 'vehicle' as our final goal is to merge the classes from the original dataset in those two classes of our new dataset.

You can now click on 'Create labels'

### Merge your annotations

Let's now go back to the settings but to the 'Annotations' tab.

![](https://2100239547-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M78aoA9Gcxf25O1fNjm%2F-Me-F-X4T0EFl4oQ_NQN%2F-Me-gloWyVeeNk4SYZOQ%2Fimage.png?alt=media\&token=e0def0a0-917e-410b-ab62-cc16b265565f)

We first select the label 'people' as the target label.

![](https://2100239547-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M78aoA9Gcxf25O1fNjm%2F-Me-F-X4T0EFl4oQ_NQN%2F-Me-h1d91wgIWkpaYJls%2Fimage.png?alt=media\&token=3bcca1c0-0b8c-4302-8cc9-9608c61a80af)

We can then select the original labels 'people' and 'pedestrian' in the list, then we select 'vehicle' as target label

![](https://2100239547-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M78aoA9Gcxf25O1fNjm%2F-Me-F-X4T0EFl4oQ_NQN%2F-Me-hkM2_4Llz3aaXM-9%2Fimage.png?alt=media\&token=d0a5e9d6-ff6e-47c9-b5e6-305c5fe0859e)

We select all the vehicles in the original label list, as you can see in the instructions, 'people' and 'pedestrian' are going to be merged into 'people' and 'car, van, truck, motor and bus' are going to be merged into 'vehicle', it looks great so far !

Now we can click on 'Execute Instructions' to perform the merge operation, and we just have to wait !

{% hint style="info" %}
This operation can take a few minutes so don't worry if you don't see them appear correctly in seconds.
{% endhint %}

![](https://2100239547-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M78aoA9Gcxf25O1fNjm%2F-Me-iAtFoi1BKb33jQaV%2F-Me-qerPd5ImdHA7VjXN%2Fimage.png?alt=media\&token=c67f21a4-49a0-4a60-9ce9-ef994bef3042)

And here we are, after a few minutes, we can now work with a dataset that has only two classes, with a lot of objects in each of them !
