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.5.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.5-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.5-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.5-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.5-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.5-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.5-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.5.tar.gz.

File metadata

  • Download URL: pyxccd-0.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 fbbb544926a9caeee679c52c832edb0d0b3a1a9d9ecea824908b95698dabdc9f
MD5 14ac965211dbec9e6a57db7cd69959a7
BLAKE2b-256 5440368013c02f6cde9e00b6d07af43952f2b3f4108896ae935f6c54e4545f7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.5.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.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9d2184374a0d76d4d1986b0ef85082b605aefbf2959392ec3d4b9a78ec512383
MD5 0b4054aa186ba551a4aa404f02eeb412
BLAKE2b-256 3d9b464347fe92ea1980f9c8865d87393ad52ea311d6e3674329b1c97b3b7495

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.5-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.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dee49d6e3dcddeb294fcc0dc9556a99ca5dc130475c8cb891ee0e3785cae605c
MD5 e196af7ad9d565ae1f69225a27e9dfb7
BLAKE2b-256 5599953d23522b6fc45404a08c1f51df628e5b52f23727bfc2de528e4c8419d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.5-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.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a584bfeff13f87eab28a05cbb18e5b7d1e9ef9fb9d1f7417506cc0c4f0e6a11d
MD5 567d6d0acd8ec051d8e636a9016d23ee
BLAKE2b-256 22d5fd4d261e79b9f0386a144c24df48fd6a0adc31787b457bbbbfedba58ba83

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.5-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.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dac3806a895dbfe5b0f0def675b41264ebdc205230e7c5f78a04edc12527cd41
MD5 45ef772266655df2a8bc7dc89e5ef93b
BLAKE2b-256 5f77b4398770e86fb40d1106416fd3cc44f1f08db103c66cafe4e46c485c993b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.5-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.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2486420506376644b10f45110cedb6e7ee1fa86de6a5c56366b1c4cb729eda03
MD5 f6c61d7a55c965fa2b808d903862d846
BLAKE2b-256 4d9279131cc10c3c1ec423f47d08b00c046151bbac03d1241bcd827abed738cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.5-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.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8f8a9a614a5197abc6ea2c14d191d11c33012affd0c89b7f312d07c0b590d5b8
MD5 54c261f0ab3feea06786d769306a61de
BLAKE2b-256 618a21cb959374cac189c974c9e05e70da4c2258e5faeb8eacbb54a6795642b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.5-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