Concrete rebar CT scan analysis tool
Pease select your operating system
Windows
- Click on the green
<> Codebutton and downloadZIP - Unzip the downloaded file to a desired location
- Download and install Miniforge for your operating system
- Run the downloaded
.exefile- Select "Add Miniforge3 to PATH environment variable"
- Open the newly installed Miniforge Prompt
- Move to the downloaded GitHub repository
- Run one of the following command:
# TensorFlow with GPU support
mamba env create -f environment_tf_gpu.yml
# TensorFlow with no GPU support
mamba env create -f environment_tf_nogpu.yml- Activate Conda environment:
conda activate concreteYour prompt should now start with (concrete) instead of (base)
MacOS
- Click on the green
<> Codebutton and downloadZIP - Unzip the downloaded file to a desired location
- Download and install Miniforge for your operating system
- Open your terminal
- Move to the directory containing the Miniforge installer
- Run one of the following command:
# Intel-Series
bash Miniforge3-MacOSX-x86_64.sh
# M-Series
bash Miniforge3-MacOSX-arm64.sh- Re-open your terminal
- Move to the downloaded GitHub repository
- Run one of the following command:
# TensorFlow with GPU support
mamba env create -f environment_tf_gpu.yml
# TensorFlow with no GPU support
mamba env create -f environment_tf_nogpu.yml- Activate Conda environment:
conda activate concreteYour prompt should now start with (concrete) instead of (base)
Main processing tasks executed on original image stacks
- Downscale (reduce processing time)
# For downscale factor (df) = 4
original stack (z, y, x) = 1948 x 1788 x 1788 = 13 Gb
downscaled stack (z, y, x) = 487 x 447 x 447 = 186 Mb- Preprocess
- center images over Z axis
- compute median projection (
med_proj) - normalize images (divide by
med_projto getnorm) - determine matrix and rod masks (
mtx_mask,rod_mask) - compute distance maps
mtx_EDM- distance from outer surface
rod_EDM- distance from inner rod
- Predict (U-Net - resnet34)
- manually annotate data (Napari)
- train semantic segmentation model (~ 25 image pairs)
- save weights (
model-weights_void.hdf5) - predict un-seen images (
obj_probs)
- Segment
- segment voids from
obj_probs - normalize void brightness (custom fitting procedure)
- determine air and liquid masks (
air_mask,liquid_mask)
- segment voids from
- Objects
- extract
obj_data(see outputs folder)
- extract
Between different timepoints, the image stacks exhibit inconsistencies in terms
of translation, rotation, and scaling within the 3D space.
- Match object pairs
- compare segmented objects for:
- distance to outer surface
- distance to neighbors
- shape descriptors (area, solidity)
- identify valid pairs (min. difference between comparison criteria)
- compare segmented objects for:
- Register 3D stacks
- compute affine transformation matrix (based on valid pair centroids)
- apply transformation and save registered data (see registered folder)
Display prediction (display_probs.py) and segmentation (display_mask.py)
results in a customized Napari viewer.
- Time0_crop_df4.tif # crop + downscale raw images
- Time0_crop_df4_norm.tif # crop + downscale + norm. images
- Time0_crop_df4_probs.tif # obj. predictions (model)
- Time0_crop_df4_air_mask.tif # labelled mask of obj.
- Time0_crop_df4_liquid_mask.tif # mask of air-filled regions
- Time0_crop_df4_labels.tif # mask of liquid-filled regions
- Time0_crop_df4_metadata.pkl # processing metadata - crop_df4_reg.tif # registered crop + downscale raw images
- crop_df4_reg_norm.tif # registered crop + downscale + norm. images
- crop_df4_reg_probs.tif # registered obj. predictions
- crop_df4_reg_air_mask.tif # registered air masks
- crop_df4_reg_liquid_mask.tif # registered liquid masks
- crop_df4_transform_matrix.pkl # registration transformation matricesobj_data.csv
- label # obj. identification label (see `labels.tif`)
- ctrd_z # obj. z position
- ctrd_y # obj. y position
- ctrd_x # obj. x position
- area # obj. number of voxel (3D volume)
- air_area # air number of voxel (3D volume)
- liquid_area # liquid number of voxel (3D volume)
- ratio # liquid / obj. volume
- solidity # obj. volume / obj. convex hull volume
- obj_dist # distance from neighbouring obj.
- mtx_dist # distance from external matrix surface
- category # 0 = inner obj., 1 = surface obj., 2 = rod objplot.jpg
- Fading images in
reg_hmatch.tif- solved
- Bin fluctuation from timepoint to timepoint
- partially solved by excluding bins with not enough data-points
- Consistent bin range (avoid disapiring bin range (e.g 0-10))
- solved by showing excluding bins NaN text in plot



