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
Bravia core script for python

Bravia-Core-Script You need to have a mandatory account If this L3 does not work, try another L3. enjoy

5 Dec 26, 2021
Official implementation for CVPR 2021 paper: Adaptive Class Suppression Loss for Long-Tail Object Detection

Adaptive Class Suppression Loss for Long-Tail Object Detection This repo is the official implementation for CVPR 2021 paper: Adaptive Class Suppressio

CASIA-IVA-Lab 67 Dec 04, 2022
This repo provides a demo for the CVPR 2021 paper "A Fourier-based Framework for Domain Generalization" on the PACS dataset.

FACT This repo provides a demo for the CVPR 2021 paper "A Fourier-based Framework for Domain Generalization" on the PACS dataset. To cite, please use:

105 Dec 17, 2022
[NeurIPS-2021] Slow Learning and Fast Inference: Efficient Graph Similarity Computation via Knowledge Distillation

Efficient Graph Similarity Computation - (EGSC) This repo contains the source code and dataset for our paper: Slow Learning and Fast Inference: Effici

23 Nov 11, 2022
Repository for Traffic Accident Benchmark for Causality Recognition (ECCV 2020)

Causality In Traffic Accident (Under Construction) Repository for Traffic Accident Benchmark for Causality Recognition (ECCV 2020) Overview Data Prepa

Tackgeun 21 Nov 20, 2022
Supplementary code for the paper "Meta-Solver for Neural Ordinary Differential Equations" https://arxiv.org/abs/2103.08561

Meta-Solver for Neural Ordinary Differential Equations Towards robust neural ODEs using parametrized solvers. Main idea Each Runge-Kutta (RK) solver w

Julia Gusak 25 Aug 12, 2021
Tackling Obstacle Tower Challenge using PPO & A2C combined with ICM.

Obstacle Tower Challenge using Deep Reinforcement Learning Unity Obstacle Tower is a challenging realistic 3D, third person perspective and procedural

Zhuoyu Feng 5 Feb 10, 2022
A graph adversarial learning toolbox based on PyTorch and DGL.

GraphWar: Arms Race in Graph Adversarial Learning NOTE: GraphWar is still in the early stages and the API will likely continue to change. 🚀 Installat

Jintang Li 54 Jan 05, 2023
GeneralOCR is open source Optical Character Recognition based on PyTorch.

Introduction GeneralOCR is open source Optical Character Recognition based on PyTorch. It makes a fidelity and useful tool to implement SOTA models on

57 Dec 29, 2022
PyTorch 1.5 implementation for paper DECOR-GAN: 3D Shape Detailization by Conditional Refinement.

DECOR-GAN PyTorch 1.5 implementation for paper DECOR-GAN: 3D Shape Detailization by Conditional Refinement, Zhiqin Chen, Vladimir G. Kim, Matthew Fish

Zhiqin Chen 72 Dec 31, 2022
GAT - Graph Attention Network (PyTorch) 💻 + graphs + 📣 = ❤️

GAT - Graph Attention Network (PyTorch) 💻 + graphs + 📣 = ❤️ This repo contains a PyTorch implementation of the original GAT paper ( 🔗 Veličković et

Aleksa Gordić 1.9k Jan 09, 2023
[NeurIPS 2021] Code for Unsupervised Learning of Compositional Energy Concepts

Unsupervised Learning of Compositional Energy Concepts This is the pytorch code for the paper Unsupervised Learning of Compositional Energy Concepts.

45 Nov 30, 2022
Improving Generalization Bounds for VC Classes Using the Hypergeometric Tail Inversion

Improving Generalization Bounds for VC Classes Using the Hypergeometric Tail Inversion Preface This directory provides an implementation of the algori

Jean-Samuel Leboeuf 0 Nov 03, 2021
The implementation for the SportsCap (IJCV 2021)

SportsCap: Monocular 3D Human Motion Capture and Fine-grained Understanding in Challenging Sports Videos ProjectPage | Paper | Video | Dataset (Part01

Chen Xin 79 Dec 16, 2022
Tutorials, assignments, and competitions for MIT Deep Learning related courses.

MIT Deep Learning This repository is a collection of tutorials for MIT Deep Learning courses. More added as courses progress. Tutorial: Deep Learning

Lex Fridman 9.5k Jan 07, 2023
Pytorch Implementation of Adversarial Deep Network Embedding for Cross-Network Node Classification

Pytorch Implementation of Adversarial Deep Network Embedding for Cross-Network Node Classification (ACDNE) This is a pytorch implementation of the Adv

陈志豪 8 Oct 13, 2022
This is a collection of our NAS and Vision Transformer work.

AutoML - Neural Architecture Search This is a collection of our AutoML-NAS work iRPE (NEW): Rethinking and Improving Relative Position Encoding for Vi

Microsoft 832 Jan 08, 2023
This is a Machine Learning Based Hand Detector Project, It Uses Machine Learning Models and Modules Like Mediapipe, Developed By Google!

Machine Learning Hand Detector This is a Machine Learning Based Hand Detector Project, It Uses Machine Learning Models and Modules Like Mediapipe, Dev

Popstar Idhant 3 Feb 25, 2022
CasualHealthcare's Pneumonia detection with Artificial Intelligence (Convolutional Neural Network)

CasualHealthcare's Pneumonia detection with Artificial Intelligence (Convolutional Neural Network) This is PneumoniaDiagnose, an artificially intellig

Azhaan 2 Jan 03, 2022
Understanding and Improving Encoder Layer Fusion in Sequence-to-Sequence Learning (ICLR 2021)

Understanding and Improving Encoder Layer Fusion in Sequence-to-Sequence Learning (ICLR 2021) Citation Please cite as: @inproceedings{liu2020understan

Sunbow Liu 22 Nov 25, 2022