Rob174 / detection_nappe_hydrocarbures_IMT_cefrem

0 stars 0 forks source link

Cut the image into patches #11

Closed Rob174 closed 3 years ago

Rob174 commented 3 years ago

Problem to avoid: too much oil discharges are cut due to the patches.

Rob174 commented 3 years ago

Preliminary study: dimensions of the oil discharges polygons: cf #9

⚠️ indicate the images range used to make these statistics to update them later

Rob174 commented 3 years ago

Images have been generated from the test script below Patch_creator0 class. We obtain the following results with a grid with no padding and a fixed pixel size scale:

20190601_S1A_with_patches_size-1500 20190601_S1A_with_patches_size-500 20190601_S1A_with_patches_size-1000

For reference, here are the locations of the oil discharges on this image (taken from #5):

Rob174 commented 3 years ago

500 px or 1000 px can be a good starting point

Rob174 commented 3 years ago
Rob174 commented 3 years ago

Not a good idea : it would add an unnecessary resampling step. Oil discharges create thin filaments oriented in various directions. In the future we will make rotation augmentations to deal with the orientations. Moreover the inverse transformation would not have entirely excluded the margin on the images

A better approach is to exclude patches with margin in them Concretely we know that the margin of the image is set to exactly 0 in float. We can take the assumption that patches will not have more than X pixels set exactly to 0 if there is no margin in them By setting a threshold we can determine if a patch contain margin or not and exclude it to give only full patches to the neural network.