py-faster-rcnn icon indicating copy to clipboard operation
py-faster-rcnn copied to clipboard

Data Augmentation in Faster RCNN

Open arasharchor opened this issue 7 years ago • 7 comments

In Faster-RCNN, if I am not mistaken, only flipping has been applied as data augmentation trick, but there are other forms of data augmentation which can be used.

In my application, I need to rotate the images and also add different illumination and zooming. How can these data augmentation tricks be achievable in Faster-RCNN implementation?

Specifically, I would like to rotate the images.

A small question, Faster RCNN works on center_x, center_y, width, height basis, isn't it? PASCAL VOC is in xmin,ymin,xmax,ymax basis, but in faster RCNN implementation they have been changed to center_x, center_y, width, height in bbox_transform, why?

arasharchor avatar Feb 20 '17 18:02 arasharchor

You could find the file that is doing the horizontal flipping and add in your own rotation, I'm not sure if it's already in the codebase. The annotations / labels are in the format: (x1, y1, x2, y2) if I'm not mistaken, not center_x, center_y, width, height

andrewsilva9 avatar Feb 27 '17 00:02 andrewsilva9

Currently, I rotate the training images before feeding them into Faster R-CNN. I haven't tried hacking the actual Faster R-CNN code.

terriyu avatar Mar 05 '17 01:03 terriyu

@andrewsilva9 I have already noticed that Faster RCNN is flipping image. Therefore I have only rotated images by 90 degrees which by rotating I will cover four degrees (0,90,180,270). The labels in VOC are in (xmin,ymin,xmax,ymax). However, the author have transformed them into (centerx,centery,width,height) claiming better peformance. @terriyu I am also doing the same. I did not manage to rotate them along flipping code in short time.

arasharchor avatar Mar 07 '17 19:03 arasharchor

@smajida I have the same question. Have you managed to do the rotation along flipping code? Which file is the flipping code written in?

hadign20 avatar Jun 18 '17 15:06 hadign20

@smajida I also want to do vertical flipping transformation in source. are you able to put flipping related code, if it is done can you share details

satya2550 avatar Nov 05 '17 03:11 satya2550

I want to implement faster R-CNN using center x, center y, width, height, angle for oriented bounding boxes. Any leads are welcome.

priya55612 avatar Dec 18 '19 05:12 priya55612

https://github.com/ShubhankarRawat/Airplane-Detection-for-Satellites/blob/master/augmentation.py

shrutimary15 avatar Mar 10 '22 05:03 shrutimary15