Rob174 / detection_nappe_hydrocarbures_IMT_cefrem

0 stars 0 forks source link

Choose an order to process patches of the same image #16

Closed Rob174 closed 3 years ago

Rob174 commented 3 years ago

Problem: 1 image = x patches. How to reduce memory and computations consumption ?

Note: patches are generated on the fly at commit cadd357109a685a31ee9c1b37b5f026c48f546b4

Rob174 commented 3 years ago

2 choices:

  1. add parameters to the __call__method of Patch_creator0 to return only one of the patches of the image --> necessity to have ids specifying which patch to pick. Does not avoid multiple read of the same image
  2. give all patches at once to the model --> not the goal here: in a first attempt we does not want that the model knows the relation between patches

=> solution 1

Rob174 commented 3 years ago

Problem: The code can not know how many patches are available per images at commit cadd357109a685a31ee9c1b37b5f026c48f546b4

Rob174 commented 3 years ago

Solved by calculating the number thanks to grid_size and shape of the original image. Ok at commit 32f63f0fa66f722d4550c3807ac8d398cbbe6e92