Coder Social home page Coder Social logo

cgi-estonia-space / alus Goto Github PK

View Code? Open in Web Editor NEW
23.0 3.0 3.0 173.97 MB

GPU accelerated earth observation data processors

Home Page: https://twitter.com/spacest372

License: GNU General Public License v3.0

Shell 0.42% CMake 0.49% C++ 96.35% Cuda 2.01% Python 0.71% Jupyter Notebook 0.02% C 0.01%
earth-observation eo gpu gpu-computing nvidia nvidia-gpu sentinel-1 sentinel-2

alus's Introduction

ALUS

Collection of processing operators/routines defined by software - plural of ALU(Arithmetic Logic Unit)
or
ALU for Space/Surveillance etc.

A software project that targets to utilize Nvidia GPUs for processing earth observation data (faster).
Kickstart of this project was funded through ESA's EOEP programme
Current development is funded through ESA's GSTP programme

Developed by CGI Estonia.

For further comprehensive evaluation see Wiki

Out of the box usage

Verified releases can be downloaded from - https://github.com/cgi-estonia-space/ALUs/releases/ One can download docker image with all of the needed dependencies from dockerhub or simply docker pull cgialus/alus-devel

Executing

Each algorithm is a separate executable. Currently available ones are (more info and usage in parenthesis):

  • Sentinel 1 coherence estimation routine - alus-coh (README)
  • Sentinel 1 coherence estimation timeline generation - alus-coht (README)
  • Sentinel 1 calibration routine - alus-cal (README)
  • Sentinel 2 and other raster resample and tiling - alus-resa (README)
  • Gabor feature extraction - alus-gfe (README)
  • PALSAR level 0 focuser - alus-palsar-focus (README)

When building separately, these are located at <build_dir>/alus_package

Update PATH environment variable in order to execute everywhere:
export PATH=$PATH:/path/to/<alus_package>

See --help for specific arguments/parameters how to invoke processing. For more information see detailed explanation of Sentinel 1 processors' processing arguments.

Docker example

NVIDIA driver and NVIDIA Container Toolkit must be installed together with docker.

docker pull cgialus/alus-devel:latest
docker run -t -d --gpus all --name alus_container cgialus/alus-devel
docker exec -t alus_container mkdir /root/alus
docker cp <latest build tar archive> alus_container:/root/alus/
docker exec -t alus_container bash -c "tar -xzf /root/alus/*.tar.gz -C /root/alus/"
# Use docker cp to transfer all the input datasets, auxiliary data, then either
docker exec -t alus_container bash -c "cd /root/alus; ./alus-<alg> ...."
# Or connect to shell
docker exec -it alus_container /bin/bash
# Running coherence estimation routine example
./alus-coh -r S1A_IW_SLC__1SDV_20200724T034334_20200724T034401_033591_03E49D_96AA.SAFE \
-s S1A_IW_SLC__1SDV_20200805T034334_20200805T034401_033766_03E9F9_52F6.SAFE \
-o /tmp/ -p VV --orbit_dir <orbit files location> --sw IW1 --dem srtm_43_06.tif --dem srtm_44_06.tif
# Running calibration routine example
./alus-cal -i S1A_IW_SLC__1SDV_20180815T154813_20180815T154840_023259_028747_4563.SAFE \
-o /tmp/alus_S1A_IW_SLC__1SDV_20180815T154813_20180815T154840_023259_028747_4563_Calib_tc.tif \
--sw IW1 -p VV --type beta --dem srtm_42_01.tif

Dependencies

Setup of dependencies

Building

cmake . -Bbuild
cd build
make -j8

Jupyter Notebook

There is a Jupyter Notebook located at jupyter-notebook folder with a user-friendly interface and automated auxiliary file downloads. It can be used in conjunction with binaries to easily execute code. Read the instructions.

Minimum/Recommended requirements

For specific, check each processor's README.

Below are rough figures:

  • NVIDIA GPU device compute capability 6.0 (Pascal) or higher
  • 2(minimum)/4(recommended) GB of available device memory (some ALUs can manage with less)
  • High speed (NVMe) SSD to benefit from the computation speedups
  • 4 GB of extra RAM to enable better caching/input-output (GDAL raster IO)

Contributing

Contribution guidelines

License

GNU GPLv3

Binary downloads

alus's People

Contributors

achaad avatar eriksoekov avatar kautlenbachs avatar mrlow avatar pr2718 avatar svenkautlenbach avatar tonissook avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

alus's Issues

Github actions

Duplicate the bitbucket pipeline procedures in Github actions.
Use a CGI corporation allocated AWS account for that.
Add Priit's access too.

License change

  • Processor specific
  • Make sure that no SNAP ports are not included or linked
  • Currently change would be introduced for alus-palsar, alus-gabor and alus-resa
  • Apache will be the choice (MIT like but lawyers and big organizatons like it more)

Create version 1.6 release

  • Basic S1 metadata
  • Jupyter notebook updates (also do not forget to update the docker image)
  • polynomial fit for each burst
  • GRD support ?!

alus-sar-segment "no matching noise values from noise vectors for azimuth range"

Following error statement is printed:
There were no matching noise values from noise vectors for azimuth range [8535.158366, 8535.158376]. Tile properties x:8192 y:0 w:2048 h:2048

When trying to process the following dataset - S1A_IW_GRDH_1SDV_20230515T034801_20230515T034830_048539_05D6A6_D84E

It could be too strict implementation or a bad dataset. Compare with SNAP behavior.

Coherence processing without orbit files (JRC-5)

Tested, when commenting out ApplyOrbitFileOp::Initialize() contents. Need to add argument handling and logical handling of this situation though. No coordinate and/or raster size differences. Only the band data.
Need to communicate to the users (in documentation) if this is implemented.

  • Add an E2E test

Copernicus DEM 30 support (JRC-1)

Check BaseElevationModel.java from SNAP project. Everyhting should start to unwind there.
So for example based on SNAP structure:

  • ElevationModel.java interface (there are APIs that are needed during processing)

  • Base class for inheritance is BaseElevationModel.java

  • Then comes CopernicusElevationModel.java for example that inherits from previous

  • Then there are BaseElevationTile and ElevationTile

  • First lets refactor the current SRTM3 support and then test if the results remain the same, then lets implement support for others.

Bonus:
Would be nice if we'd get rid of continous resampling as done in GetElevation(), if this would be done once on GPU, things would be much faster.
Following stuff:

  • snapengine::bilinearinterpolation::ComputeIndex()
  • snapengine::bilinearinterpolation::Resample()

Event logging for CREODIAS (CF-9)

From CF-REQ-PGAAS Requirements_for_new_processor.pdf chapter 2.6 Event logging

The processor shall be equipped with event and error logging. Preferably the logging system should allow changing
the type of logged events (DEBUG, INFO, ERROR). [REQ-LOG-1]
Logs should be generated in structured logging format. [REQ-LOG-2]
Example message:

{ "time": "2010-01-01 12:34:56.0000", "level": "ERROR", "message": "hello, world", "elapsed": 10,
"unit": "s" }

Messages should be generated in the proposed format due to external systems receiving, parsing and indexing logs.
If the supplied processor includes an error logging system then the documentation for this processor must include
additional information regarding the details of the system. The documentation must include additional information:
where log files are created, a description of the format of created logs, a description of typical logged messages, how
to control the level of logged events, whether a log archiving mechanism is included, and whether a mechanism for
limiting the space available for logging is included. [REQ-DOC-6]

  • Create a secret argument that switches the log format output to match the requirement. Argument name: '--log_format'. It should be called with a value 'creodias'
  • Create boost::log formatter accordingly (see branch creodias_log)
  • Add argument to alus::log::Initialize to specify format with enum. Currently then DEFAULT, CREODIAS
  • Also tune the SetLevel() based on format. CREODIAS requires 3 levels - INFO, DEBUG, ERROR

Requirement CF9
image

S1 GRD thermal noise removal error

Hi,
I've tested your S1 GRD calibration routine which in general works well. But in some cases, I've got an error during the thermal noise removal procedure:

[2023-06-11 14:02:20.028403] [0x00007f96c7ab0000] [info]    Processing parameters:
Input product - 
/tmp/S1B_IW_GRDH_1SDV_20190405T230644_20190405T230711_015678_01D696_7102.SAFE
Subswath -
Polarisation - VV
Calibration type - sigma
First burst index - 0
Last burst index - 0
AOI -
Write intermediate files - NO

[2023-06-11 14:02:20.805075] [0x00007f96c7ab0000] [info]    Using 'NVIDIA GeForce GTX 1080 Ti' device nr 0 for calculations
[2023-06-11 14:02:20.828726] [0x00007f96c7ab0000] [info]    Target bands count: 1
[2023-06-11 14:02:20.828740] [0x00007f96c7ab0000] [info]    Processing band Amplitude_VV_VV

[2023-06-11 14:02:34.663293] [0x00007f96c7ab0000] [error]   Caught an exception
There were no matching noise values from noise vectors for azimuth range [7034.963325, 7034.963331]. Tile properties x:16384 y:16384 w:2048 h:1756
[2023-06-11 14:02:34.663311] [0x00007f96c7ab0000] [error]   Exiting.

Thank you!
Bjoern

Error with S1 IPF < 2.9

Hi,
it seems that ALUs is not working with S1 imagery before 2018-03-13 12:00:00 (IPF < 2.9).

Found 6 crossing COP-DEM tiles
[2023-06-11 14:44:05.101830] [0x00007f9a5bb9d000] [info]    Processing parameters:
Input product - 
/tmp/S1A_IW_GRDH_1SDV_20180304T231511_20180304T231540_020872_023CD1_3037.SAFE
Subswath -
Polarisation - VV
Calibration type - sigma
First burst index - 0
Last burst index - 0
AOI -
Write intermediate files - NO

[2023-06-11 14:44:05.463604] [0x00007f9a5bb9d000] [info]    Using 'NVIDIA GeForce GTX 1080 Ti' device nr 0 for calculations
Segmentation fault (core dumped)

Are you aware of that issue?

Best
Bjoern

Local UTM projection for SAR products (JRC-8 GEN-1)

  • Currently ALUs only supports WGS84 projection by default. At least UTM projection (by zone) is needed. This concerns SAR processors only.
  • Currently resampling supports it, need to refactor and create a separate unit that is used for this. Terrain correction by default uses degrees. TiePointGeocoding might need enhanced or simply converting from WGS84 to whatever projection then. Also meters are calculated, sophistication may be introduced when target geocoding system uses meters instead. Also for sure needs confirmation against SNAP. Special nightly added.

Image

Image

Enhance validation scripts

  • One that runs SNAP GPT (arguments for which DEM to use and output file location/name)
  • The one that runs SNAP GPT and ALUs AND runs rastcomp to compare

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.