Article in Preparation (Draft)
A research article based on this thesis is currently in preparation. A link to the publication will be available here soon.
Download Article DraftM.S. Thesis by Lorenzo Olmo Marchal | University of California San Diego, 2025
Advisor: Prof. Ludmil B. Alexandrov | Alexandrov Lab
Computational pathology has emerged as a rapidly advancing subspecialty focused on the quantitative, large-scale analysis of pathological data like Whole Slide Images (WSIs). As high-resolution digitized representations of histology slides, WSIs contain diagnostically relevant features that can be leveraged by computational methods such as deep learning. This thesis addresses significant challenges in preprocessing and model interpretability within computational pathology. The core contributions are twofold: first, the development of SlideLab, a novel and robust preprocessing module designed to optimize the creation of high-quality WSI datasets; second, the introduction of a new interpretability method, Polarized Attentional Certainty (PAC), with an exploration of its applications in attention-based models to enhance the transparency and trustworthiness of AI systems in pathology.
This thesis effectively tackles two of the most significant hurdles in computational pathology: the lack of standardized preprocessing and the interpretability of "black box" AI models. The project is logically divided into two main contributions:
Read the full thesis for a detailed understanding of the research, methodology, and findings.
Download Thesis PDFA research article based on this thesis is currently in preparation. A link to the publication will be available here soon.
Download Article DraftThe complete source code for the SlideLab preprocessing pipeline is available on GitHub. Explore the repository to understand the implementation details and contribute to the project.
View on GitHubFirst, clone the repository and navigate into the directory:
git clone https://github.com/lolmomarchal/SlideLab.git
cd SlideLab
To install the required dependencies, create and activate the Conda environment:
conda env create -f environment.yml
conda activate slidelab
Below is an example command to run the preprocessing pipeline:
python SlidePreprocessing.py -i /path/to/input/ -o /path/to/output/ \
-s 512 -m 40 --remove_blurry_tiles --normalize_staining --encode \
-th 0.8 -bh 0.02 --device cuda --batch_size 256
The pipeline behavior can be customized with the following arguments:
| Argument | Description | Default |
|---|---|---|
| Input/Output (Required) | ||
-i, --input_path | Path to the input WSI file(s) | None |
-o, --output_path | Path to save the output tiles | None |
| Tile Customization | ||
-s, --desired_size | Desired size of tiles in pixels | 256 |
-m, --desired_magnification | Desired magnification level (e.g., 20) | 20 |
-ov, --overlap | Factor of overlap between tiles (1 = no overlap) | 1 |
| Preprocessing Options | ||
-rb, --remove_blurry_tiles | Remove blurry tiles using a Laplacian filter | False |
-n, --normalize_staining | Normalize staining of the tiles | False |
-e, --encode | Encode tiles into an .h5 file | False |
MIT License
Copyright (c) 2025 Lorenzo Olmo Marchal
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For questions or inquiries, please contact Lorenzo Olmo Marchal at aolmomarchal@ucsd.edu or connect on LinkedIn.