py-faster-rcnn
py-faster-rcnn copied to clipboard
Data Augmentation in Faster RCNN
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?
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
Currently, I rotate the training images before feeding them into Faster R-CNN. I haven't tried hacking the actual Faster R-CNN code.
@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.
@smajida I have the same question. Have you managed to do the rotation along flipping code? Which file is the flipping code written in?
@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
I want to implement faster R-CNN using center x, center y, width, height, angle for oriented bounding boxes. Any leads are welcome.
https://github.com/ShubhankarRawat/Airplane-Detection-for-Satellites/blob/master/augmentation.py