In the July 25th episode of "Call the Doctor" hosted by Gerd Heber, the focus was on using AI tools, specifically Chat GPT, to perform practical tasks related to HDF5 and image processing.
The episode started with a brief introduction, and then Gerd mentioned that he received a directory filled with TIFF image files and wanted to explore ways to combine them into a single HDF5 file. He emphasized that the goal was to let Chat GPT write the code for this task, avoiding manual coding.
Gerd interacted with Chat GPT, presenting different prompts related to the task. Initially, he asked for a Python program to create an HDF5 file, and Chat GPT provided the code using the Python Imaging Library (PIL) module.
Next, Gerd requested the code to compress the images while writing them into the HDF5 file. Chat GPT complied and provided code for compressing the images using GZIP compression.
The third prompt asked for the images to be combined into a 3D dataset instead of individual 2D datasets. Chat GPT produced code to create a 3D dataset and efficiently stack the images into it.
In the subsequent prompt (version 2.1), Gerd suggested that Chat GPT should infer the dimensions of the images from the provided TIFF files instead of explicitly specifying them. Chat GPT accurately determined the image dimensions and generated the code accordingly.
Finally, Gerd introduced version 2.2 and 2.2.1. He explained that when using version 2.2, HDF5's default chunking strategy resulted in poor performance when dealing with compressed 3D datasets. To fix this, he asked Chat GPT to modify the code to manually set the chunk size for each image to achieve better performance. Chat GPT provided the code accordingly.
Throughout the episode, Gerd showcased how Chat GPT effectively wrote Python code to handle various aspects of the task, making the process efficient and practical. He also mentioned that the integration of GitHub Copilot with Visual Studio Code had been helpful in assisting with the code generation process.
In conclusion, the episode demonstrated the power of AI tools like Chat GPT and showcased how they could assist in practical tasks related to HDF5 and image processing, making the development process more efficient and less manual.
(This description was created by ChatGPT, naturally. :) )
This session happened on July 25, 2023. You can also watch the video for this session online.
Call the Doctor is a series of weekly, unscripted, live events! The HDF Group’s staff members will answer attendee questions and, for example, go over the previous week’s HDF Forum posts. The HDF Clinics are free sessions intended to help users tackle real-world HDF problems from a common cold to severe headaches and offer relief where that’s possible. As time permits, we will include how-tos, offer advice on tool usage, review your code samples, teach you survival in the documentation jungle, and discuss what’s new or just around the corner in the land of HDF.
Join us every Tuesday at 12:20 p.m. central (US/Canada.) on Zoom!