This repository contains the implementation of our extended paper "Advancing Training Stability in Unsupervised SEM Image Segmentation for IC Layout Extraction" based on the original short paper "Towards Unsupervised SEM Image Segmentation for IC Layout Extraction". The full dataset is available here and the source code for the original paper can be found here.
Tested on Python 3.8.20 with torch
1.12.1.
Next to the dependencies from requirements.txt
(install using pip install -r requirements.txt
),
this project requires torch
with a matching CUDA installation, as well as OpenCL at least in version 2.0.
For more information on the parameters required by the scripts below, please run them with --help
.
The scripts for preparing the dataset for supervised and unsupervised training (our approach) can be found in the folder prepare_dataset
.
Creates binary track labels from the SVG labels in our dataset for supervised training and evaluating both approaches.
Splits the SEM images from our dataset linked above and the generated binary track labels into 512x512 px patches used for supervised and unsupervised training.
The patches are saved in two subfolders, image
and label
.
Creates 3 channel pseudo-masks for unsupervised or 1 channel ones for supervised training from the SEM image patches using the conventional segmentation algorithms described in our paper.
Creates the image gradients used for unsupervised decoder training from the SEM image patches.
Creates three text files that split the patches from the dataset into train, validation, and test sets. Each text file contains lists of patch filenames.
Use the parent folder of the image
directory containing the SEM image patches as dataset directory.
The folder train
contains the scripts for both supervised and unsupervised training, with validation after each epoch. They require the dataset to be prepared using the scripts from the previous section, including text files describing for the train and validation split.
The following scripts implement our improved unsupervised approach from the extended paper.
Trains the decoder network on the generated pseudo-mask patches using image gradient patches as labels.
Pre-trains the encoder network in isolation on the SEM image patches using the generated pseudo-masks as labels.
Trains the encoder network on the SEM image patches using the decoder network and gradient patches to compute a loss function.
Trains one of three supervised network architectures either on binary track label or binary pseudo-mask patches, as described in our extended paper.
Use the parent folder of the image
directory containing the SEM image patches as dataset directory.
The scripts in the test
folder evaluate the trained models on the test set from the dataset split, save the results, report the test loss, and compute ESD errors and per-pixels metrics from the predictions.
Predicts the image gradients from pseudo-mask patches and reports the loss compared to the ground-truth gradient patches. Running this script is not required to evaluate our approach.
Uses trained encoder and decoder networks to predict masks and image gradients from SEM image patches. Reports the encoder loss wrt. the predicted gradient patches.
Predicts binary track labels from one or more trained supervised models on the test set. Currently, does not report test loss.
Computes per-pixel metrics and ESD errors from 3 channel (unsupervised) or binary (supervised) mask patches. Saves the error metrics in a file and can draw ESD error visualizations.
This script from the utils
folder can compute the histogram of all SEM images in the dataset. We used it to determine track and via thresholds for the conventional segmentation algorithms.
If you want to cite the work please don't hesitate to cite the extended paper preprint.
@article{2024rothaug,
title = {Advancing Training Stability in Unsupervised SEM Image Segmentation for IC Layout Extraction},
url = {http://doi.org/10.21203/rs.3.rs-4883147/v1},
DOI = {10.21203/rs.3.rs-4883147/v1},
journal = {Journal of Cryptographic Engineering},
publisher = {Springer Science and Business Media LLC},
author = {Rothaug, Nils and Cheng, Deruo and Klix, Simon and Auth, Nicole and B\"{o}cker, Sinan and Puschner, Endres and Becker, Steffen and Paar, Christof},
year = {2024},
month = {08},
note = {under submission}
}