How to augment classification dataset?

I have learnt various data augmentation techniques for object detection in the documentation but I wonder if such augmentation is also applicable for classification datasets as well ?

tlt-augment [-h] -d /path/to/the/dataset/root
                 -a /path/to/augmentation/spec/file
                 -o /path/to/the/augmented/output

Because the tool takes label parameters as input, I don’t need label params for classification dataset. Please help

Actually it can. But you need to generate dummy label txt file. It contains dummy bbox info,etc.
For example,
If there is an image(001.jpg) under class dog, you generate 001.txt file.

      -- image 
              |--- 001.jpg  
      -- label   
              |--- 001.txt   

$ cat 001.txt
dog 0.00 0 0.0 100.0 100.0 100.0 100.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0

$ cat augment_spec.txt
angle: 10.0
units: “degrees”
hue_rotation_angle: 5.0
saturation_shift: 1.0
output_image_width: 300
output_image_height: 300
output_image_channel: 3
image_extension: “.jpg”


$ tao augment -d /workspace/classification/dog -a /workspace/classification/augment_spec.txt -o /workspace/classification/output_augment -v

Then find the augmented images in the output_augment folder.

Thats what I’ve thought. Should add runtime augmentation feature in classifiers as like in detector model training.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.