Skip to content

Creating a labelled Dataset for project

Ankit5733 edited this page Apr 15, 2022 · 3 revisions

1.Downloading Images For Annotation:

  1. The very first step will be to download bundle of images for annotations and for downloading large number of images at once ,we need to add an extension to google chrome.

0

as we can see in the above image, the extension we are adding is FATKUN.

so ,just search for the car dent images(or any particular object you want to detect) in the search bar and click on download current tab the images will be downloaded using FATKUN extension. The following picture explains the process,

s2

2.Rename the downloaded images sequentially:

  1. We need to rename all images in sequence because Make-Sense (Annotation Software) requires images to be named sequentially, because naming in sequence helps makesense website arranging the data properly. Ex – 1001.jpg, 1002.png, 1003.jpg etc.

REFER:Renaming Techniques In Deep

  1. Renaming pictures using python code: We can also rename our data pictures using below python code.

s3

3.Annotate the Dataset using Make-Sense Software:

  1. Search for makesense in the search bar and click on get started.

s4

2)Now we have to import all the downloaded images from local directory to makesense.ai server.

A) For importing the images ,first make a folder and move all the renamed images into that folder.

B) Then click on "DRAG AND DROP OR CLICK TO SELECT FILES" as shown in the above picture.

After importing the pictures,

C) Click on object detection tab as we are working on object detection.

D) After choosing object detection we need to add Class/Object names which we want to annotate in Image, for example ,we want to detect dents so we will simply add a class name "dent".

If we have any other thing to detect, we will have to add one more class just like the previous one.

s5

Now, we have our downloaded images into the Makesense.ai and given a class name "dent'.

So now we can start Annotating the images. For more about Annotation watch this Video Playlist - ANNOTATING IMAGES ON MAKESENSE.AI

1.While annotating ,we have to keep in mind that

(A) The annotation box should exactly enclose the object you wish to detect

(B)After enclosing the object, we have to choose class name that we have added initially.

(C) If there more than number of same object in the image, annotate each of them in a different box.

4.Importing the annotated dataset to our PC:

After annotating all the images , Export the Images with their annotations to your PC in YOLO Format as shown in the below figure,

s6

After importing the annotated dataset to your PC ,

(A) Extract the .ZIP file of Annotations we got from Makesense.ai into a folder.

(B) Now we have to move all our renamed images to the folder where we have extracted our .ZIP file so that the annotated file and the corresponding image come next to each other.

(C) Create Labels.txt file into the same Folder where Extracted Annotation files are saved.

And write class names into that Labels.txt file as shown in the below figure ,

1

Augmentation of the dataset according to YOLO 5 Requirement in RoboFlow:

  1. Search for Roboflow in the search bar and sign in using your google account.

  2. Create a new project by filling the essential details ,as shown in the below figure,

s8

  1. Import the Annotated dataset files from makesense.ai into RoboFlow

Make sure the folder you are importing has “Labels.txt” into it.

s9

  1. After Importing Annotated Dataset into RoboFlow Click on “Finish Uploading”.

s10

  1. Then Split dataset into Train, Valid and Test. ,the percentage of these will be determined by your mentor.

s11

  1. Then Click on “Generate New version”

2

  1. Now, Augment the Dataset by using some operations like – Flip & Rotate ,so that the training will get more variations of images and the accuracy will be increased in a significant manner.

s12

  1. Then, Click on Generate button inside Generate Tab to Generate the Dataset.

  2. Now to export the dataset into Google Collab (that we will be using to train model) Click on “export” button.

Select Format as “YOLO v5 PyTorch” and click on continue.

s13

  1. We will get Code Snippet (API key) Like below and we will be using that Key to import our Augmented dataset into google collab for Training.

s14