Skip to main content

A PYthon library for basic and eXtended COntinuous Change Detection algorithms

Project description

PYXCCD

GithubActions Pypi Downloads ReadTheDocs

A PYthon library for basic and eXtended COntinuous Change Detection

Author: Su Ye (remotesensingsuy@gmail.com)

The Continuous Change Detection and Classification (CCDC) algorithm has been popular for processing satellite-based time series datasets, particularly for Landsat-based datasets. As a CCDC user, you may already be familiar with the existing CCDC tools such as pyccd and gee ccdc.

Wait.. so why does the pyxccd package still exist?

We developed pyxccd mainly for the below purposes:

  1. Near real-time monitoring: This package provides the unique S-CCD algorithm to recursively update model coefficients and detect changes;

  2. The latest version of CCDC (COLD): The COLD algorithm has the highest breakpoint detection accuracy than the ever, and has been verified with Zhe’s MATLAB version;

  3. Large-scale time-series processing in the desktop environment: the core of pyxccd was coded in C language with the superior computing efficiency and small memory usage;

  4. Using dataset other than Landsat: pyxccd supports the use of any band combination from any sensor (such as Sentinel-2, modis);

  5. Decomposing time-series signals to unveil inter-annual variation: S-CCD allows continuously outputting trend and seasonal signal components as “states”, allowing detecting inter-segment variations such as yearly phenological shifts

1. Installation

pip install pyxccd

Note: it only supports windows and linux system so far. Please contact the author if you wish to install it in the macOS system.

2. Using pyxccd for pixel-based processing (more see jupyter examples)

COLD:

from pyxccd import cold_detect
cold_result = cold_detect(dates, blues, greens, reds, nirs, swir1s, swir2s, thermals, qas)

COLD algorithm for any combination of band inputs from any sensor:

from pyxccd import cold_detect_flex
# input a user-defined array instead of multiple lists
cold_result = cold_detect_flex(dates, np.stack((band1, band2, band3), axis=1), qas, lambda=20,tmask_b1=1, tmask_b2=2)

S-CCD:

# require offline processing for the first time
from pyxccd import sccd_detect, sccd_update
sccd_pack = sccd_detect(dates, blues, greens, reds, nirs, swir1s, swir2s, qas)

# then use sccd_pack to do recursive and short-memory NRT update
sccd_pack_new = sccd_update(sccd_pack, dates, blues, greens, reds, nirs, swir1s, swir2s, qas)

S-CCD for outputting continuous seasonal and trend states:

# open state output (state_ensemble) by setting state_intervaldays as a non-zero value
sccd_result, state_ensemble = sccd_detect(dates, blues, greens, reds, nirs, swir1s, swir2s, qas, state_intervaldays=1)

3. Documentation

API documents: readthedocs

Tutorial: under development

4. Citations

If you make use of the algorithms in this repo (or to read more about them), please cite (/see) the relevant publications from the following list:

[S-CCD] Ye, S., Rogan, J., Zhu, Z., & Eastman, J. R. (2021). A near-real-time approach for monitoring forest disturbance using Landsat time series: Stochastic continuous change detection. Remote Sensing of Environment, 252, 112167.

[COLD] Zhu, Z., Zhang, J., Yang, Z., Aljaddani, A. H., Cohen, W. B., Qiu, S., & Zhou, C. (2020). Continuous monitoring of land disturbance based on Landsat time series. Remote Sensing of Environment, 238, 111116.

The recent applications of S-CCD could be found in CONUS Land Watcher

Q&A

Q1: Has pyxccd been verified with original Matlab codes?

Re: yes, multiple rounds of verification have been done. Comparison based on two testing tiles shows that pyxccd and Matlab version have smaller than <2% differences for breakpoint detection and <2% differences for harmonic coefficients; the accuracy of pyxccd was also tested against the same reference dataset used in the original COLD paper (Zhu et al., 2020), and pyxccd reached the same accuracy (27% omission and 28% commission) showing that the discrepancy doesn’t hurt accuracy. The primary source for the discrepancy is mainly from the rounding: MATLAB uses float64 precision, while pyxccd chose float32 to save the run-time computing memory and boost efficiency.

Q2: how much time for production of a tile-based disturbance map (5000*5000 pixels) using pyxccd?

Re: I tested it in UCONN HPC environment (200 EPYC7452 cores): for processing a 40-year Landsat ARD tile (1982-2021), the stacking typically takes 15 mins; per-pixel COLD processing costs averagely 1 hour, per-pixel S-CCD processing costs averagely 0.5 hour; exporting maps needs 7 mins.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyxccd-0.0.4.tar.gz (3.8 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyxccd-0.0.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

pyxccd-0.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

pyxccd-0.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pyxccd-0.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pyxccd-0.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pyxccd-0.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file pyxccd-0.0.4.tar.gz.

File metadata

  • Download URL: pyxccd-0.0.4.tar.gz
  • Upload date:
  • Size: 3.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyxccd-0.0.4.tar.gz
Algorithm Hash digest
SHA256 e3e3508424c54a6ebefd8f751f6e02109823d96a8446ccc58deeac39bf381f66
MD5 bb79352e85d815a22b3f5c203a02b9da
BLAKE2b-256 147b6cdd07cd855c614579915fbbb45b5fc5e68e8517ddc975fa6e858137b93a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.4.tar.gz:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0eef20b1d200f35a8088fe31f55a458629d9d2561da64fc1e5e4119efcba07b4
MD5 680ca33ffbb5ae4328102811e1b98e58
BLAKE2b-256 13b29b67095c39418dd95b53da46d33ae35b6aff8c31e10b2ebad7959ce3ee4f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 caf3ed84fd7431d261d2a7b839defc548f2079667e197395efb504b10b836493
MD5 a4691e2c06ef04a1b7eb9d3dfac8dff2
BLAKE2b-256 7be6a5a1b6cb709b59a38e14ce5fb14b68cfcc00d346f89fc1e8e85fc84d850a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2120ae2156aa6040184ba59de2f6abb5a3566dab8bfa1b15fd46a11452e6c354
MD5 5ab65f76efb5eacf7a1ab12f528f079e
BLAKE2b-256 dfee8a16e5671639ee414315c40ec404e1d7d4efd7ea68d5646c15aba642b566

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3379a498c8a0fc1e434de67e98a4d05de64a8139f6e394180c58cd32a1dc8adc
MD5 a7715f90070dcec8c3fb530b6fdb6a90
BLAKE2b-256 907f15db28adfc2adf289f50d6112ea0262b492412d5ce738112d69fb6ee851e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 93791fb43ef29eb3cee0c5318ea871b1d2e73e10c66842050419ac0f0b558447
MD5 468f6bbe945f9a685b10ce1f87644150
BLAKE2b-256 03615811df671184e818b9e928956a16918714a374622f1c4c736bb007966f46

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c5d8a13adf703326370a114d9af9619e939f9921dfb609600c3df6c26e0029ef
MD5 f801ecfdd31f1f6393da93df076a90be
BLAKE2b-256 e376d387e8706173afb61fe585366f5bac1dcafc6af17c420fb524639586431a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page