CNN: random padding instead of random cropping?

In order to square-ify images, it is common to crop them, rather than use padding, which could be a problem if images have key information at the edge. An argument for cropping seems to be that you can randomize it for training images, which has the nice side effect of some low-cost data augmentation.

Could you not do the same with padding? I.e. for validation pictures add equal amount of padding left and right (top/bottom for landscape), and for training images randomize the amount of padding on either side?
Anyone know if this is done, and if not, why?

Padding is not used as it is just wasted computation. The network is not learning anything from those pixels.

Also, when we have to resize our images. There are 3 different approaches

  1. Squish them:- In real life we do not see squish images, so working with these does not make much sense. As images are distorted in various ways.
  2. Use padding:- usually try to avoid it, as you can do much more by using a small image size
  3. Random Crop:- This is the preferred appraoch. This allows your network to learn and generalize better.

If you have a dog image. With random cropping, you can use different regions of an image to train your neural network, which forces the network to generalize. Also, as you said it is a good data augmentation technique.