Prepare imagenet for training

I downloaded the imagenet ILSVRC2012 dataset, but I can’t understand how to prepare it for training.
I have:

  1. train folder with 1000 folders (folder per class) with arbitrary name (n01440764, n01443537, …)
  2. val folder with 50,000 JPEG images with arbitrary name (ILSVRC2012_val_00000001.JPEG, ILSVRC2012_val_00000002.JPEG, …)
  3. val labels file - ILSVRC2012_validation_ground_truth.txt

Is there any common/easy way to do it with Pytorch?