SeungjunNah / DeepDeblur-PyTorch

Deep Multi-scale CNN for Dynamic Scene Deblurring
MIT License
262 stars 42 forks source link

About patch_size #36

Closed Brightlcz closed 2 years ago

Brightlcz commented 2 years ago

Hi, Thanks for sharing your code! I have a question and hope to get your answer.

I found that the image crop into patch_size to training, the initial value of px and py is randomly determined by random.randrange. In this random case, how to ensure that the entire picture can be fully trained? https://github.com/SeungjunNah/DeepDeblur-PyTorch/blob/e92dc7c3337127887da617ffe819b49cb022fd81/src/data/common.py#L32

Looking forward to your reply!

SeungjunNah commented 2 years ago

Hi @Brightlcz,

There is no guarantee that every pixel is accessed during training and the model is optimized perfectly. However, by training for enough epochs, we expect the network could generalize to diverse inputs in training data. In many ways deep learning utilizes/relies on randomness.

Brightlcz commented 2 years ago

@SeungjunNah Thanks. The answer really helped.