Energy
Started on Jan. 8, 2025
SLB is a global technology company that drives energy innovation for a balanced planet. With a global footprint in more than 100 countries and employees representing almost twice as many nationalities, we work each day on innovating oil and gas, delivering digital at scale, decarbonizing industries, and developing and scaling new energy systems that accelerate the energy transition.
A well consists of several casings to withstand pressure, with cement layers inserted between them to ensure stability. To assess the stability of the cement, SLB uses an isolation scanner, which is part of the ultrasonic imaging tool. This tool acquires downhole data using flexural waves, which produce peaks from various reflective surfaces. In the figure below, the first peak represents the interface between the cement and casing, while the second peak represents the interface between the cement (Third Interface Echo, TIE) and the formation. Detecting both of these surfaces is crucial for evaluating the cement’s quality and identifying any collapse in the cement. Signals are acquired at different depths, and these acquisitions are stacked to form an image, which is the focus of this challenge. Accurately detecting these components is essential for monitoring the well’s health during the drilling process. Failure to detect and assess the condition of the casing and TIE can lead to issues such as wellbore instability, casing failure, or environmental hazards due to potential leaks or blowouts. Early identification allows drilling teams to address abnormalities promptly, minimizing risks of operational delays, equipment failure, or costly repairs. In this challenge, our goal is to accurately detect the casing and TIE elements.
Well Casing: Well casing is a steel or cement lining installed inside a drilled well to stabilize the borehole, prevent contamination, and ensure safe extraction of fluids like oil, gas, or water. It reinforces the well structure and isolates different underground formations.
Flexural waves: Flexural waves are mechanical waves that travel along thin structures like pipes causing them to bend or flex. These waves play a key role in ultrasonic testing for material characterization.
Drilling Process: Drilling is the process of creating a borehole in the ground using a rotating drill bit to access resources like oil, gas, or groundwater.
The goal of the hackathon is to produce a model that gives the highest possible score for the casing and TIE segmentation.
This competition is evaluated on the intersection over union (IoU). The IoU can be used to compare the pixel-wise agreement between a predicted segmentation and its corresponding ground truth. The formula is given by:
\frac{X \cap Y}{X \cup Y}
where X is the predicted set of pixels and Y is the ground truth. The IoU is defined to be 1 when both X and Y are empty. The leaderboard score is the mean of the IoU coefficients for each image in the test set.
As mentioned in the description of the problem, the images are ultrasonic images of wells. The database will consist of 11 wells and their respective labels – a segmentation mask (multi-class mask) of the same shape as the input image.
For each well, we have multiple acquisitions, each corresponding to one cross-section for an azimuth. We call these “sections” in this challenge. Each well is divided into a certain number of sections (36 or 18). For the 36 sections, each acquisition is separated from the next by 10 degrees, and for the 18 sections, each acquisition is separated by 20 degrees.
The wells consist of long images. To simplify the task, we divide the well into patches. These patches vary in size depending on the well. You will find patches of size (160x160) and (160x272). For standardization, we use a size of 160X160 to ensure square inputs. However, we could consider using different sizes to capture more vertical information. This could help extract additional details from the well data in the vertical dimension.
To calculate the number of patches, we divide the total size of the well by 160 and multiply this by the number of sections each well has. In the following, we have divided the wells into training and testing sets and summarized the information for each well accordingly.
1.Train and validation data:
2.Test data:
The different sets of data were created to have a similar distribution while avoiding data leakage by sharing the same well in different sets. We also provide you with unlabeled data, these images are provided in the unlabeled_data folder in the case that the participant decides to test techniques on self-supervised.
The masks are images with dimensions of either 160x272 or 160x160, and they are stored in a CSV file. Since the images in the training partition have varying sizes, we have added padding with a value of -1 in the CSV file. To load the data, you need to read the CSV file and reshape the masks into the appropriate format.
y_train = pd.read_csv(Path('y_train.csv'), index_col=0) # Table with index being the name of the patch
np.array([v for v in y_train.loc['well_2_section_22_patch_1'] if v!=-1]).reshape(160,-1)
labels_patches = {}
for index_, values in y_train.iterrows():
labels_patches[index_] = np.array([v for v in values if v!=-1]).reshape(160,-1)
The output format is a CSV file where each row corresponds to a flattened patch.
Below is an example of how to create a CSV file from saved predictions:
size_labels = 272
predictions = {'test':{}}
for phase in predictions.keys():
img_save_dir = Path(path_data/phase/'predictions')
for img_path in img_save_dir.glob('*.npy'):
name = img_path.stem
if name in predictions[phase]:
continue
prediction = np.load(img_path)
if prediction.shape[1]!=size_labels:
prediction_aux = -1+np.zeros(160*size_labels) # Adding padding to ensure all masks have the same size
prediction_aux[0:160*160] = prediction.flatten()
else:
prediction_aux = prediction.flatten()
predictions[phase].update({name:prediction_aux})
pd.DataFrame(predictions['test'], dtype='int').T.to_csv(Path(f'../data/y_test_csv_file.csv'))
The benchmark is based on an encoder-decoder architecture trained on patches of the well of size 160 x 160.
Pre-processing:
Training:
Post-processing:
from torchvision.transforms import Resize, InterpolationMode
original_size = (160, 272)
image = Resize(original_size, interpolation=InterpolationMode.NEAREST)(image)
Files are accessible when logged in and registered to the challenge