Create time-series datacubes for supervised machine learning with ICEYE SAR images.

Related tags

Deep Learningicecube
Overview

ICEcube is a Python library intended to help organize SAR images and annotations for supervised machine learning applications. The library generates multidimensional SAR image and labeled data arrays.

The datacubes stack SAR time-series images in range and azimuth and can preserve the geospatial content, intensity, and complex SAR signal from the ICEYE SAR images. You can use the datacubes with ICEYE Ground Range Detected (GRD) geotifs and ICEYE Single Look Complex (SLC) .hdf5 product formats.

alt text

This work is sponsored by ESA Φ-lab as part of the AI4SAR initiative.


Getting Started

You need Python 3.8 or later to use the ICEcube library.

The installation options depend on whether you want to use the library in your Python scripts or you want to contribute to it. For more information, see Installation.


ICEcube Examples

To test the Jupyter notebooks and for information on how to use the library, see the ICEcube Documentation.


AI4SAR Project Updates

For the latest project updates, see SAR for AI Development.

Comments
  • 'RPC' does not exist

    'RPC' does not exist

    Trying to read an SLC .h5 downloaded from ICEYE archive (id 10499) and get 'RPC does not exist':

    cube_config = CubeConfig()
    slc_datacube = SLCDatacube.build(cube_config, '/Users/sstrong/bin/test_data_icecube/slcs')
    
    ---------------------------------------------------------------------------
    KeyError                                  Traceback (most recent call last)
    /var/folders/7r/fyfh8zx51ls6yt8t_jppnz3c0000gq/T/ipykernel_11546/2087236712.py in <module>
          1 cube_config = CubeConfig()
    ----> 2 slc_datacube = SLCDatacube.build(cube_config, '/Users/sstrong/bin/test_data_icecube/slcs')
    
    ~/Documents/github/icecube/icecube/bin/sar_cube/slc_datacube.py in build(cls, cube_config, raster_dir)
         52     def build(cls, cube_config: CubeConfig, raster_dir: str) -> SARDatacube:
         53         slc_datacube = SLCDatacube(cube_config, RASTER_DTYPE)
    ---> 54         ds = slc_datacube.create(cls.PRODUCT_TYPE, raster_dir)
         55         slc_datacube.xrdataset = ds
         56         return slc_datacube
    
    ~/Documents/github/icecube/icecube/utils/common_utils.py in time_it(*args, **kwargs)
        111     def time_it(*args, **kwargs):
        112         time_started = time.time()
    --> 113         return_value = func(*args, **kwargs)
        114         time_elapsed = time.time()
        115         logger.info(
    
    ~/Documents/github/icecube/icecube/bin/sar_cube/sar_datacube.py in create(self, product_type, raster_dir)
         43         """
         44         metadata_object = SARDatacubeMetadata(self.cube_config)
    ---> 45         metadata_object = metadata_object.compute_metdatadf_from_folder(
         46             raster_dir, product_type
         47         )
    
    ~/Documents/github/icecube/icecube/bin/sar_cube/sar_datacube_metadata.py in compute_metdatadf_from_folder(self, raster_dir, product_type)
        116         )
        117 
    --> 118         self.metadata_df = self._crawl_metadata(raster_dir, product_type)
        119         logger.debug(f"length metadata from the directory {len(self.metadata_df)}")
        120 
    
    ~/Documents/github/icecube/icecube/bin/sar_cube/sar_datacube_metadata.py in _crawl_metadata(self, raster_dir, product_type)
         68 
         69     def _crawl_metadata(self, raster_dir, product_type):
    ---> 70         return metadata_crawler(
         71             raster_dir,
         72             product_type,
    
    ~/Documents/github/icecube/icecube/utils/metadata_crawler.py in metadata_crawler(raster_dir, product_type, variables, recursive)
         36     _, raster_paths = DirUtils.get_dir_files(raster_dir, fext=fext)
         37 
    ---> 38     return metadata_crawler_list(raster_paths, variables)
         39 
         40 
    
    ~/Documents/github/icecube/icecube/utils/metadata_crawler.py in metadata_crawler_list(raster_paths, variables)
         43 
         44     for indx, raster_path in enumerate(raster_paths):
    ---> 45         metadata = IO.load_ICEYE_metadata(raster_path)
         46         parsed_metadata = _parse_data_row(metadata, variables)
         47         parsed_metadata["product_fpath"] = raster_path
    
    ~/Documents/github/icecube/icecube/utils/analytics_IO.py in load_ICEYE_metadata(path)
        432         are converted from bytedata and read into the dict for compatability reasons.
        433         """
    --> 434         return read_SLC_metadata(h5py.File(path, "r"))
        435 
        436     elif path.endswith(".tif") or path.endswith(".tiff"):
    
    ~/Documents/github/icecube/icecube/utils/analytics_IO.py in read_SLC_metadata(h5_io)
        329 
        330     # RPCs are nested under "RPC/" in the h5 thus need to be parsed in a specific manner
    --> 331     RPC_source = h5_io["RPC"]
        332     meta_dict["RPC"] = parse_slc_rpc_to_meta_dict(
        333         RPC_source=RPC_source, meta_dict=meta_dict
    
    h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
    
    h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
    
    /opt/homebrew/anaconda3/envs/icecube_env/lib/python3.8/site-packages/h5py/_hl/group.py in __getitem__(self, name)
        303                 raise ValueError("Invalid HDF5 object reference")
        304         elif isinstance(name, (bytes, str)):
    --> 305             oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
        306         else:
        307             raise TypeError("Accessing a group is done with bytes or str, "
    
    h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
    
    h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
    
    h5py/h5o.pyx in h5py.h5o.open()
    
    KeyError: "Unable to open object (object 'RPC' doesn't exist)"
    
    opened by shaystrong 3
  • scikit-image dependency  fails on OSX M1 chip

    scikit-image dependency fails on OSX M1 chip

    Can't install all requirements for icecube on an M1 chip. This may present a future problem, just documenting for awareness. scikit-image cannot seem to be compiled/installed/etc on the M1. I have not tested the conda installation, as perhaps that does work. But i use brew/pip (and conda can create conflicts with those)

    opened by shaystrong 2
  • Fix/labels coords

    Fix/labels coords

    Summary includes:

    • Making xr.dataset structure coherent for labels and SAR (added time coords for labels)
    • For labels datacube, product_fpath are used compared to previously
    • small typo fixed
    • tests added for merging sar cubes with labels cube
    • instructions/cell added to install ml requirements for notebook#5
    • release notes added to mkdocs
    • steup.py updated with ml requirements and version
    opened by muaali 1
  • Update/docs/notebooks

    Update/docs/notebooks

    Changes involve:

    • Introduced a new markdown file called "overview.md" that talks about the structure of examples under docs/
    • Added a new notebook : CreatingDatacube that walks a user how to create datacubes with different methods
    • Other notebooks updated and improved.
    opened by muaali 1
  • missing RPC metadata set to None

    missing RPC metadata set to None

    related to issue: https://github.com/iceye-ltd/icecube/issues/11 Some of old ICEYE images can have RPC information missing. If that happens RPC key will be missing and pipeline does not work. RPC is now set to None if it's missing with a user warning generated.

    opened by muaali 0
  • feat/general metadata

    feat/general metadata

    Following changes introduced:

    • metadata constraints loosen up to allow merging general SAR data (rasterio/HDF5 compatible). But this means that cube configuration is not available for such rasters
    • .tiff support added for GRDs
    • code refactoring in SARDatacubeMetadata to avoid repetitive code
    opened by muaali 0
  • Labels/subset support

    Labels/subset support

    Changes include:

    • Updating SLC metadata reader to avoid key values stored as HDF5 dataset
    • Enabling cube generation from labels.json that have masks/labels for subset rasters (i.e., number of masks ingested into labels cube don't necessarily have to be same as number of rasters)
    • CHUNK_SIZE have been reduced to provide more optimized performance for creating massive datacubes
    opened by muaali 0
  • bin module not found

    bin module not found

    After installing from github using !pip install git+https://github.com/iceye-ltd/icecube.git it imports well icecube, but it throws this error for module bin ModuleNotFoundError: No module named 'icecube.bin'

    Any advice, thanks

    opened by jaimebayes 0
  • dummy_mask_labels.json

    dummy_mask_labels.json

    FileNotFoundError: [Errno 2] No such file or directory: './resources/labels/dummy_mask_labels.json'

    Could you upload it? is it available? Thanks in advance,

    opened by jaimebayes 0
Releases(1.1.0)
Owner
ICEYE Ltd
ICEYE Ltd
ICEYE Ltd
Simultaneous Demand Prediction and Planning

Simultaneous Demand Prediction and Planning Dependencies Python packages: Pytorch, scikit-learn, Pandas, Numpy, PyYAML Data POI: data/poi Road network

Yizong Wang 1 Sep 01, 2022
Annotated, understandable, and visually interpretable PyTorch implementations of: VAE, BIRVAE, NSGAN, MMGAN, WGAN, WGANGP, LSGAN, DRAGAN, BEGAN, RaGAN, InfoGAN, fGAN, FisherGAN

Overview PyTorch 0.4.1 | Python 3.6.5 Annotated implementations with comparative introductions for minimax, non-saturating, wasserstein, wasserstein g

Shayne O'Brien 471 Dec 16, 2022
This is the pytorch re-implementation of the IterNorm

IterNorm-pytorch Pytorch reimplementation of the IterNorm methods, which is described in the following paper: Iterative Normalization: Beyond Standard

Lei Huang 32 Dec 27, 2022
TensorFlow implementation of Elastic Weight Consolidation

Elastic weight consolidation Introduction A TensorFlow implementation of elastic weight consolidation as presented in Overcoming catastrophic forgetti

James Stokes 67 Oct 11, 2022
PyTorch implementation of Masked Autoencoders Are Scalable Vision Learners for self-supervised ViT.

MAE for Self-supervised ViT Introduction This is an unofficial PyTorch implementation of Masked Autoencoders Are Scalable Vision Learners for self-sup

36 Oct 30, 2022
this is a lite easy to use virtual keyboard project for anyone to use

virtual_Keyboard this is a lite easy to use virtual keyboard project for anyone to use motivation I made this for this year's recruitment for RobEn AA

Mohamed Emad 3 Oct 23, 2021
Attention over nodes in Graph Neural Networks using PyTorch (NeurIPS 2019)

Intro This repository contains code to generate data and reproduce experiments from our NeurIPS 2019 paper: Boris Knyazev, Graham W. Taylor, Mohamed R

Boris Knyazev 242 Jan 06, 2023
Cross-modal Deep Face Normals with Deactivable Skip Connections

Cross-modal Deep Face Normals with Deactivable Skip Connections Victoria Fernández Abrevaya*, Adnane Boukhayma*, Philip H. S. Torr, Edmond Boyer (*Equ

72 Nov 27, 2022
HMLET (Hybrid-Method-of-Linear-and-non-linEar-collaborative-filTering-method)

Methods HMLET (Hybrid-Method-of-Linear-and-non-linEar-collaborative-filTering-method) Dynamically selecting the best propagation method for each node

Yong 7 Dec 18, 2022
Neural-PIL: Neural Pre-Integrated Lighting for Reflectance Decomposition - NeurIPS2021

Neural-PIL: Neural Pre-Integrated Lighting for Reflectance Decomposition Project Page | Video | Paper Implementation for Neural-PIL. A novel method wh

Computergraphics (University of Tübingen) 64 Dec 29, 2022
This code is for our paper "VTGAN: Semi-supervised Retinal Image Synthesis and Disease Prediction using Vision Transformers"

ICCV Workshop 2021 VTGAN This code is for our paper "VTGAN: Semi-supervised Retinal Image Synthesis and Disease Prediction using Vision Transformers"

Sharif Amit Kamran 25 Dec 08, 2022
Joint Learning of 3D Shape Retrieval and Deformation, CVPR 2021

Joint Learning of 3D Shape Retrieval and Deformation Joint Learning of 3D Shape Retrieval and Deformation Mikaela Angelina Uy, Vladimir G. Kim, Minhyu

Mikaela Uy 38 Oct 18, 2022
This repository contains a pytorch implementation of "StereoPIFu: Depth Aware Clothed Human Digitization via Stereo Vision".

StereoPIFu: Depth Aware Clothed Human Digitization via Stereo Vision | Project Page | Paper | This repository contains a pytorch implementation of "St

87 Dec 09, 2022
Source code of AAAI 2022 paper "Towards End-to-End Image Compression and Analysis with Transformers".

Towards End-to-End Image Compression and Analysis with Transformers Source code of our AAAI 2022 paper "Towards End-to-End Image Compression and Analy

37 Dec 21, 2022
Replication Code for "Self-Supervised Bug Detection and Repair" NeurIPS 2021

Self-Supervised Bug Detection and Repair This is the reference code to replicate the research in Self-Supervised Bug Detection and Repair in NeurIPS 2

Microsoft 85 Dec 24, 2022
Code and data for ImageCoDe, a contextual vison-and-language benchmark

ImageCoDe This repository contains code and data for ImageCoDe: Image Retrieval from Contextual Descriptions. Data All collected descriptions for the

McGill NLP 27 Dec 02, 2022
The code for SAG-DTA: Prediction of Drug–Target Affinity Using Self-Attention Graph Network.

SAG-DTA The code is the implementation for the paper 'SAG-DTA: Prediction of Drug–Target Affinity Using Self-Attention Graph Network'. Requirements py

Shugang Zhang 7 Aug 02, 2022
Code for the paper "Controllable Video Captioning with an Exemplar Sentence"

SMCG Code for the paper "Controllable Video Captioning with an Exemplar Sentence" Introduction We investigate a novel and challenging task, namely con

10 Dec 04, 2022
A collection of educational notebooks on multi-view geometry and computer vision.

Multiview notebooks This is a collection of educational notebooks on multi-view geometry and computer vision. Subjects covered in these notebooks incl

Max 65 Dec 09, 2022