Skip to content
GitLab
    • Explore Projects Groups Topics Snippets
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • rt_decloud rt_decloud
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

En prévision de l'arrivée de la forge institutionnelle INRAE, nous vous invitons à créer vos nouveaux projets sur la forge MIA.

  • umr-tetisumr-tetis
  • rt_decloudrt_decloud
  • Merge requests
  • !6
An error occurred while fetching the assigned milestone of the selected merge_request.

Checkpoints callbacks fixes

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Cresson Remi requested to merge checkpoints_callbacks_fixes into master 2 years ago
  • Overview 0
  • Commits 11
  • Pipelines 4
  • Changes 17
Compare
  • version 3
    fffc99bf
    2 years ago

  • version 2
    610d3384
    2 years ago

  • version 1
    f141048d
    2 years ago

  • master (base)

and
  • latest version
    d604263c
    11 commits, 2 years ago

  • version 3
    fffc99bf
    9 commits, 2 years ago

  • version 2
    610d3384
    8 commits, 2 years ago

  • version 1
    f141048d
    7 commits, 2 years ago

17 files
+ 68
− 66

    Preferences

    File browser
    Compare changes
decloud/analysis/crga_al_analysis.py
+ 3
− 2
  • View file @ d604263c

  • Edit in single-file editor

  • Open in Web IDE


@@ -26,6 +26,7 @@ This scripts summarizes the number of samples that we can get from an Acquisitio
suited for single optical image reconstruction from date SAR/optical pair, for different
parameters of the AcquisitionsLayout
"""
import os
import argparse
import logging
from decloud.acquisitions.sensing_layout import AcquisitionsLayout, S1Acquisition, S2Acquisition
@@ -139,8 +140,8 @@ for max_s1s2_gap_hours in params.maxgaps1s2_list:
np_counts[pos[0], pos[1]] += nb_samples_in_patch
# Export
out_fn = "count_gap{}_range{}-{}_{}.tif".format(max_s1s2_gap_hours, int_radius, ext_radius, tile_name)
out_fn = system.pathify(params.out_dir) + out_fn
out_fn = f"count_gap{max_s1s2_gap_hours}_range{int_radius}-{ext_radius}_{tile_name}.tif"
out_fn = os.path.join(params.out_dir, out_fn)
logging.info("Saving %s", out_fn)
raster.save_numpy_array_as_raster(ref_fn=ref_fn, np_arr=np_counts, out_fn=out_fn, scale=scale)
decloud/analysis/orbits_analysis.py
+ 2
− 1
  • View file @ d604263c

  • Edit in single-file editor

  • Open in Web IDE


@@ -24,6 +24,7 @@ DEALINGS IN THE SOFTWARE.
"""
Analyze the S1 and S2 orbits
"""
import os
import argparse
import numpy as np
import logging
@@ -80,5 +81,5 @@ for tile_name, tile_handler in th.items():
# Export with pyotb
out = np.add(initialized_raster, histo_array) # this is a pyotb object
out_fn = system.pathify(params.out_dir) + "{}_s1s2gap_hist.tif".format(tile_name)
out_fn = os.path.join(params.out_dir, f"{tile_name}_s1s2gap_hist.tif")
out.write(out_fn)
decloud/analysis/patches_coverage.py
+ 3
− 2
  • View file @ d604263c

  • Edit in single-file editor

  • Open in Web IDE


@@ -24,6 +24,7 @@ DEALINGS IN THE SOFTWARE.
"""
Compute the number of S1 and S2 images used for each patch.
"""
import os
import argparse
import logging
import numpy as np
@@ -59,7 +60,7 @@ scale = float(params.patch_size) / float(constants.PATCHSIZE_REF)
for al_bname, al in als:
for tile_name, tile_handler in th.items():
# Output files prefix
out_prefix = system.pathify(params.out_dir) + tile_name + "_" + al_bname
out_prefix = os.join(params.out_dir, tile_name + "_" + al_bname)
# Reference raster grid
ref_fn = tile_handler.s2_images[0].clouds_stats_fn
@@ -94,6 +95,6 @@ for al_bname, al in als:
# Export
for key in ["s1", "s2"]:
out_fn = "{}_{}_freq.tif".format(out_prefix, key)
out_fn = f"{out_prefix}_{key}_freq.tif"
logging.info("Saving %s", out_fn)
raster.save_numpy_array_as_raster(ref_fn=ref_fn, np_arr=np_counts[key], out_fn=out_fn, scale=scale)
decloud/analysis/tile_coverage.py
+ 2
− 1
  • View file @ d604263c

  • Edit in single-file editor

  • Open in Web IDE


@@ -24,6 +24,7 @@ DEALINGS IN THE SOFTWARE.
"""
Compute cloud coverage and pixel validity from an input set of tiles
"""
import os
import argparse
import logging
import numpy as np
@@ -46,7 +47,7 @@ def compute_stats(tile_name, tile_handler):
:param tile_handler: Tile handler instance
"""
ref_fn = tile_handler.s2_images[0].clouds_stats_fn
out_prefix = system.pathify(params.out_dir) + tile_name
out_prefix = os.path.join(params.out_dir, tile_name)
# Statistics
cloud_cov = np.sum(np.multiply(tile_handler.s2_images_validity, tile_handler.s2_images_cloud_coverage), axis=0)
decloud/core/dataset.py
+ 2
− 2
  • View file @ d604263c

  • Edit in single-file editor

  • Open in Web IDE


@@ -21,6 +21,7 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
"""
"""Dataset classes"""
import os
import abc
import collections.abc
import json
@@ -436,7 +437,6 @@ class RoisLoader(dict):
assert root_dir_key in data
self.rois_root_dir = data[root_dir_key]
assert isinstance(self.rois_root_dir, str)
self.rois_root_dir = system.pathify(self.rois_root_dir)
def get_list(key):
"""
@@ -464,7 +464,7 @@ class RoisLoader(dict):
"""
tiles = {}
for tile in tiles_list:
roi_file = "{}{}_{}.tif".format(self.rois_root_dir, tile, suffix)
roi_file = os.path.join(self.rois_root_dir, f"{tile}_{suffix}.tif")
assert system.file_exists(roi_file)
tiles.update({tile: roi_file})
self.update({"roi_{}".format(suffix): tiles})
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 Participants
Reference:
Source branch: checkpoints_callbacks_fixes

Menu

Explore Projects Groups Topics Snippets