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
A PyTorch version of You Only Look at One-level Feature object detector

PyTorch_YOLOF A PyTorch version of You Only Look at One-level Feature object detector. The input image must be resized to have their shorter side bein

Jianhua Yang 25 Dec 30, 2022
Finetune alexnet with tensorflow - Code for finetuning AlexNet in TensorFlow >= 1.2rc0

Finetune AlexNet with Tensorflow Update 15.06.2016 I revised the entire code base to work with the new input pipeline coming with TensorFlow = versio

Frederik Kratzert 766 Jan 04, 2023
Anchor-free Oriented Proposal Generator for Object Detection

Anchor-free Oriented Proposal Generator for Object Detection Gong Cheng, Jiabao Wang, Ke Li, Xingxing Xie, Chunbo Lang, Yanqing Yao, Junwei Han, Intro

jbwang1997 56 Nov 15, 2022
NVIDIA container runtime

nvidia-container-runtime A modified version of runc adding a custom pre-start hook to all containers. If environment variable NVIDIA_VISIBLE_DEVICES i

NVIDIA Corporation 938 Jan 06, 2023
Self-Supervised Image Denoising via Iterative Data Refinement

Self-Supervised Image Denoising via Iterative Data Refinement Yi Zhang1, Dasong Li1, Ka Lung Law2, Xiaogang Wang1, Hongwei Qin2, Hongsheng Li1 1CUHK-S

Zhang Yi 72 Jan 01, 2023
WRENCH: Weak supeRvision bENCHmark

🔧 What is it? Wrench is a benchmark platform containing diverse weak supervision tasks. It also provides a common and easy framework for development

Jieyu Zhang 176 Dec 28, 2022
Large Scale Fine-Grained Categorization and Domain-Specific Transfer Learning. CVPR 2018

Large Scale Fine-Grained Categorization and Domain-Specific Transfer Learning Tensorflow code and models for the paper: Large Scale Fine-Grained Categ

Yin Cui 187 Oct 01, 2022
Code and models for ICCV2021 paper "Robust Object Detection via Instance-Level Temporal Cycle Confusion".

Robust Object Detection via Instance-Level Temporal Cycle Confusion This repo contains the implementation of the ICCV 2021 paper, Robust Object Detect

Xin Wang 69 Oct 13, 2022
Official PyTorch implementation of PICCOLO: Point-Cloud Centric Omnidirectional Localization (ICCV 2021)

Official PyTorch implementation of PICCOLO: Point-Cloud Centric Omnidirectional Localization (ICCV 2021)

16 Nov 19, 2022
Generative Adversarial Text to Image Synthesis

Text To Image Synthesis This is a tensorflow implementation of synthesizing images. The images are synthesized using the GAN-CLS Algorithm from the pa

Hao 575 Jan 08, 2023
Dilated Convolution for Semantic Image Segmentation

Multi-Scale Context Aggregation by Dilated Convolutions Introduction Properties of dilated convolution are discussed in our ICLR 2016 conference paper

Fisher Yu 764 Dec 26, 2022
Towards Calibrated Model for Long-Tailed Visual Recognition from Prior Perspective

Towards Calibrated Model for Long-Tailed Visual Recognition from Prior Perspective Zhengzhuo Xu, Zenghao Chai, Chun Yuan This is the PyTorch implement

Sincere 16 Dec 15, 2022
Official PyTorch code for CVPR 2020 paper "Deep Active Learning for Biased Datasets via Fisher Kernel Self-Supervision"

Deep Active Learning for Biased Datasets via Fisher Kernel Self-Supervision https://arxiv.org/abs/2003.00393 Abstract Active learning (AL) aims to min

Denis 29 Nov 21, 2022
A scikit-learn-compatible module for estimating prediction intervals.

MAPIE - Model Agnostic Prediction Interval Estimator MAPIE allows you to easily estimate prediction intervals (or prediction sets) using your favourit

588 Jan 04, 2023
Fibonacci Method Gradient Descent

An implementation of the Fibonacci method for gradient descent, featuring a TKinter GUI for inputting the function / parameters to be examined and a matplotlib plot of the function and results.

Emma 1 Jan 28, 2022
A simple software for capturing human body movements using the Kinect camera.

KinectMotionCapture A simple software for capturing human body movements using the Kinect camera. The software can seamlessly save joints and bones po

Aleksander Palkowski 5 Aug 13, 2022
Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow

Mask R-CNN for Object Detection and Segmentation This is an implementation of Mask R-CNN on Python 3, Keras, and TensorFlow. The model generates bound

Matterport, Inc 22.5k Jan 04, 2023
Prototype-based Incremental Few-Shot Semantic Segmentation

Prototype-based Incremental Few-Shot Semantic Segmentation Fabio Cermelli, Massimiliano Mancini, Yongqin Xian, Zeynep Akata, Barbara Caputo -- BMVC 20

Fabio Cermelli 21 Dec 29, 2022
This repository is an official implementation of the paper MOTR: End-to-End Multiple-Object Tracking with TRansformer.

MOTR: End-to-End Multiple-Object Tracking with TRansformer This repository is an official implementation of the paper MOTR: End-to-End Multiple-Object

348 Jan 07, 2023
SAMO: Streaming Architecture Mapping Optimisation

SAMO: Streaming Architecture Mapping Optimiser The SAMO framework provides a method of optimising the mapping of a Convolutional Neural Network model

Alexander Montgomerie-Corcoran 20 Dec 10, 2022