Skip to main content

PyThermoNDT

PyThermoNDT is a Python package for manipulating thermographic data in Non-Destructive Testing (NDT) applications. It provides various methods to load, transform, visualize, and write thermographic data, making it easier and more efficient to work with thermal imaging in NDT contexts.

Features

  • Multi-source Data Loading: Read thermographic data seamlessly from local files and S3 storage
  • Hierarchical Data Structure: Store and access thermographic data, metadata, and ground truth in a common format
  • Remote Data Caching: Optionally cache data from remote sources for improved performance
  • Composable Transforms: Build custom processing pipelines with reusable transform components
  • PyTorch Integration: Datasets compatible with PyTorch DataLoader for training deep learning models

Quick Example

from torch.utils.data import DataLoader

from pythermondt import LocalReader, S3Reader
from pythermondt import transforms as T
from pythermondt.dataset import ThermoDataset, container_collate, derive

# Load data from different sources
local_reader = LocalReader("./examples/example_data/**/*.hdf5", recursive=True)
s3_reader = S3Reader("ffg-bp", "example2_writing_data", download_files=True)

# Create optimized transform pipeline (deterministic transforms first for better caching)
transform = T.Compose([
    T.ApplyLUT(),                  # Convert raw data to temperatures
    T.RemoveFlash(),               # Remove flash frames
    T.NonUniformSampling(64),      # Resample data to 64 frames
    T.CropFrames(96, 96),          # Center crop the frames to 96x96
    T.MinMaxNormalize()            # Normalize data
])

# 1.) Access individual files using readers
container = local_reader[0]
processed = transform(container)

# 2.) Analyse processed data
processed.show_frame(frame_number=10)
processed.analyse_interactive()

# 3.) Combine sources in a dataset for training workflows
dataset = ThermoDataset([local_reader, s3_reader], transform=transform)

# 4.) Build cache for faster training (splits pipeline at first random transform)
dataset.build_cache("immediate")

# 5.) Use with PyTorch DataLoader for model training to be used in your training loop
collate_fn = container_collate(
    '/Data/Tdata',
    derive('tdata_cnn', lambda c: c.get_dataset('/Data/Tdata').permute(2, 0, 1)),
    derive('has_defect', lambda c: '/GroundTruth/DefectMask' in c.nodes),
)
dataloader = DataLoader(dataset, batch_size=4, shuffle=True, collate_fn=collate_fn)

for epoch in range(50):
    print(f"Epoch {epoch + 1}")
    for thermal_data, tdata_cnn, has_defect in dataloader:
        print(f"Thermal data shape: {thermal_data.shape}")    # [4, 96, 96, 64]
        print(f"CNN input shape: {tdata_cnn.shape}")          # [4, 64, 96, 96]
        print(f"Has defect: {has_defect}")                    # tensor([ True, False,  True, False])

From here?

PyThermoNDT is yours to use! You can start by exploring the examples directory for more detailed usage scenarios. The package is designed to be flexible and extensible, so feel free to modify and adapt it to your specific needs.

Installation

Install the latest stable release from PyPI:

pip install pythermondt

From GitHub

Install the latest development version from the main branch:

pip install git+https://github.com/voidsy-gmbh/pyThermoNDT.git

From Source

Clone the repository and install locally:

git clone https://github.com/voidsy-gmbh/pyThermoNDT.git
cd pyThermoNDT
pip install .

Documentation

For detailed usage examples, check out the Jupyter Notebooks in the examples directory.

Contributing

Contributions are welcome! Please see the Contributing Guidelines for details on setting up a development environment, coding standards, and the pull request process.

Funding

This project was partially funded by

  • the Austrian Research Promotion Agency (FFG) under grant numbers 920062 and 901177 as part of the project 'Thermal tomography'
  • the Austrian Research Promotion Agency (FFG) under grant numbers 921380 as part of the project 'FLARE'

Metadata

Release files for pythermondt 0.3.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pythermondt 0.3.9
File Size Uploaded Provenance Actions
pythermondt-0.3.9.tar.gz 95.1 kB With provenance Details for pythermondt-0.3.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pythermondt 0.3.9
File Interpreter ABI Platform Actions
pythermondt-0.3.9-py3-none-any.whl Python 3 none any Details for pythermondt-0.3.9-py3-none-any.whl

Total release size: 202.7 kB

Release files / pythermondt-0.3.9.tar.gz

Download URL pythermondt-0.3.9.tar.gz
Size 95.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5e85124601d3be18f5e043380e95e925842ac2b05c18adf82a1425184d511219
BLAKE2b-256 checksum
How to use checksums
3413ceeed1e055f34b605e40fe669ea6307020b39f9c48da7a3802a02862b2d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / pythermondt-0.3.9-py3-none-any.whl

Download URL pythermondt-0.3.9-py3-none-any.whl
Size 107.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d64e4bff8947743295a8f694a8c4f82b8a15e9de77b53c0bbf6eb8e1375860d4
BLAKE2b-256 checksum
How to use checksums
662aac757f67c2c7b269e071d780d0a253ba7091fab30657bf54bc7a929c67f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for pythermondt 0.3.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pythermondt-0.3.9.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page