<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://muzammilateo.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://muzammilateo.github.io/" rel="alternate" type="text/html" /><updated>2026-09-16T14:26:23+00:00</updated><id>https://muzammilateo.github.io/feed.xml</id><title type="html">Muzammil Khan</title><subtitle>Postdoctoral Researcher at University of Twente - Computer Vision, AI, and Medical Robotics</subtitle><author><name>Muzammil Khan</name><email>m.khan.2@erasmusmc.nl</email></author><entry><title type="html">Future Blog Post</title><link href="https://muzammilateo.github.io/posts/2012/08/blog-post-4/" rel="alternate" type="text/html" title="Future Blog Post" /><published>2199-01-01T00:00:00+00:00</published><updated>2199-01-01T00:00:00+00:00</updated><id>https://muzammilateo.github.io/posts/2012/08/future-post</id><content type="html" xml:base="https://muzammilateo.github.io/posts/2012/08/blog-post-4/"><![CDATA[<p>This post will show up by default. To disable scheduling of future posts, edit <code class="language-plaintext highlighter-rouge">config.yml</code> and set <code class="language-plaintext highlighter-rouge">future: false</code>.</p>]]></content><author><name>Muzammil Khan</name><email>m.khan.2@erasmusmc.nl</email></author><category term="cool posts" /><category term="category1" /><category term="category2" /><summary type="html"><![CDATA[This post will show up by default. To disable scheduling of future posts, edit config.yml and set future: false.]]></summary></entry><entry><title type="html">Teaching AI to See Cancer: How Transformer Models Segment Prostate Tissue in Whole-Slide Images</title><link href="https://muzammilateo.github.io/blog/prostate-fcbformer/" rel="alternate" type="text/html" title="Teaching AI to See Cancer: How Transformer Models Segment Prostate Tissue in Whole-Slide Images" /><published>2025-10-02T00:00:00+00:00</published><updated>2025-10-02T00:00:00+00:00</updated><id>https://muzammilateo.github.io/blog/WSI-prostate-wsi</id><content type="html" xml:base="https://muzammilateo.github.io/blog/prostate-fcbformer/"><![CDATA[<div style="text-align:justify; text-justify:inter-word;">

  <h3 id="why-segmenting-cancer-tissue-is-so-hard">🧩 Why Segmenting Cancer Tissue Is So Hard</h3>

  <p>In digital pathology, each <strong>whole-slide image (WSI)</strong> of a biopsy can span several gigapixels — far too large for direct deep learning inference.<br />
To diagnose prostate cancer, pathologists rely on subtle differences in texture and gland morphology that AI models must learn to detect at <strong>micron-level precision</strong>.</p>

  <p>Our recent project at the <strong>University of Twente</strong> focuses on this challenge: teaching AI to segment prostate tissue into four key categories, <strong>background</strong>, <strong>stroma</strong>, <strong>benign glands</strong>, and <strong>tumour regions</strong>, directly from <em>Hematoxylin and Eosin (H&amp;E)</em> slides.</p>

  <p><img src="/images/blogs/WSI_results_overlay.png" alt="Validation examples" />
<em>Figure: Model predictions overlaid on the corresponding WSIs to guide clinical decision-making.</em></p>

  <hr />

  <h3 id="the-idea-fcbformer-for-histopathology">⚙️ The Idea: FCBFormer for Histopathology</h3>

  <p>We built on <a href="https://github.com/ESandML/FCBFormer"><strong>FCBFormer</strong></a>, a transformer-based encoder–decoder architecture originally designed for polyp segmentation.<br />
The model fuses convolutional and transformer representations to capture both <strong>local cellular structures</strong> and <strong>global tissue organisation</strong>.</p>

  <p>Key design components include:</p>
  <ul>
    <li>A <strong>PVTv2-B3</strong> backbone for multi-scale contextual learning.</li>
    <li>A <strong>residual convolutional branch</strong> to preserve boundary details.</li>
    <li>A <strong>prediction head</strong> that merges both to produce a 4-channel segmentation map.</li>
  </ul>

  <hr />

  <h3 id="making-boundaries-and-tumours-sharper">🧮 Making Boundaries and Tumours Sharper</h3>

  <p>Beyond standard <strong>Cross-Entropy</strong> and <strong>Dice Loss</strong>, we introduced new regularisers that explicitly enforce geometric consistency:</p>

  <ul>
    <li><strong>Soft Boundary Dice Loss</strong> - aligns predicted edges with gland boundaries.</li>
    <li><strong>Dilated Dice Loss</strong> - adds tolerance around small, irregular tumour or benign regions to boost recall.</li>
  </ul>

  <p>The total objective was defined as:</p>

\[L_{total} = L_{CE} + L_{Dice} + \lambda_b L_{Boundary} + \lambda_t L_{TumourDilated} + \lambda_g L_{BenignDilated}\]

  <p>with $\lambda_b = \lambda_t = \lambda_g = 0.7$ balancing the terms.</p>

  <hr />

  <h3 id="training-and-evaluation">🧠 Training and Evaluation</h3>

  <ul>
    <li><strong>Tiles:</strong> $256 \times 256$ px with 64 px overlap to reduce border artefacts.</li>
    <li><strong>Optimiser:</strong> AdamW with adaptive learning rate decay.</li>
    <li><strong>Augmentation:</strong> mild rotations, flips, and colour jittering (Albumentations).</li>
    <li><strong>Environment:</strong> fully Dockerised with deterministic seeding and automatic checkpointing.</li>
  </ul>

  <p>Training ran on a single GPU, logging per-epoch metrics for complete reproducibility.</p>

  <hr />

  <h3 id="results-and-insights">📊 Results and Insights</h3>

  <p>The model achieved a <strong>mean IoU of 0.71</strong> across validation WSIs:</p>

  <table>
    <thead>
      <tr>
        <th>Class</th>
        <th>IoU</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>Background</td>
        <td>0.99</td>
      </tr>
      <tr>
        <td>Stroma</td>
        <td>0.91</td>
      </tr>
      <tr>
        <td>Benign</td>
        <td>0.52</td>
      </tr>
      <tr>
        <td>Tumour</td>
        <td>0.40</td>
      </tr>
    </tbody>
  </table>

  <p>Despite modest tumour performance (limited data and imbalance), the model produced coherent segmentations with strong stroma delineation.</p>

  <p><img src="/images/blogs/WSI_results.png" alt="Validation examples" />
<em>Figure: Model predictions vs. ground truth for prostate tissue segmentation.</em></p>

  <hr />

  <h3 id="why-this-matters">🧫 Why This Matters</h3>

  <p>Even partial automation can save pathologists significant time.<br />
By pre-highlighting suspicious gland regions, such models act as <strong>assistive diagnostic tools</strong>, not replacements.<br />
The qualitative overlays are especially useful for <strong>annotation bootstrapping</strong>,  speeding up dataset expansion for future supervised learning.</p>

  <hr />

  <h3 id="whats-next">🚀 What’s Next</h3>

  <p>We plan to extend the framework with:</p>
  <ul>
    <li><strong>Multi-resolution learning</strong> (low- and high-mag fusion).</li>
    <li><strong>Self-supervised pretraining</strong> on unlabelled WSIs.</li>
    <li><strong>Multi-instance learning (MIL)</strong> to link patch-level predictions to slide-level outcomes.</li>
  </ul>

  <hr />

  <h3 id="explore-the-code">💻 Explore the Code</h3>

  <p>Implementation and training pipeline are available at:<br />
👉 <a href="https://github.com/MUZAMMILATEO/HighRes-Histopathology-Semantic-Segmentation">github.com/MuzammilAteo/HighRes-Histopathology-Semantic-Segmentation</a></p>

</div>

<p>&lt;/div&gt;</p>

<!-- Load MathJax for rendering inline and display math -->
<script>
  window.MathJax = {
    tex: {
      inlineMath: [['$', '$'], ['\\(', '\\)']],
      displayMath: [['$$', '$$'], ['\\[', '\\]']]
    },
    svg: { fontCache: 'global' }
  };
</script>

<script async="" id="MathJax-script" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>]]></content><author><name>Muzammil Khan</name><email>m.khan.2@erasmusmc.nl</email></author><category term="Histopathology" /><category term="Whole Slide Images" /><category term="Transformer Models" /><category term="Semantic Segmentation" /><category term="Prostate Cancer" /><summary type="html"><![CDATA[A look inside a transformer-based segmentation pipeline for prostate cancer detection from histopathology slides, balancing precision, interpretability, and reproducibility.]]></summary></entry><entry><title type="html">Making AI Explain Its Confidence: Inside the ELAAI Framework for MRI-Based Tumour Prediction</title><link href="https://muzammilateo.github.io/blog/elaai-framework/" rel="alternate" type="text/html" title="Making AI Explain Its Confidence: Inside the ELAAI Framework for MRI-Based Tumour Prediction" /><published>2024-10-11T00:00:00+00:00</published><updated>2024-10-11T00:00:00+00:00</updated><id>https://muzammilateo.github.io/blog/explainable-ai-for-mri-tumour-prediction</id><content type="html" xml:base="https://muzammilateo.github.io/blog/elaai-framework/"><![CDATA[<div style="text-align:justify; text-justify:inter-word;">

  <h3 id="understanding-the-challenge">🧠 Understanding the Challenge</h3>
  <p>Bladder tumours are difficult to detect early because MRI scans contain vast, complex structures that vary widely among patients.<br />
AI has shown promise, but most models struggle with <em>limited annotated data</em> and a lack of <em>transparency</em>, clinicians cannot always understand <em>why</em> a model flags a region as abnormal.</p>

  <h3 id="introducing-the-elaai-framework">💡 Introducing the ELAAI Framework</h3>
  <p>In our recent study from the <strong>University of Twente</strong>, we developed the <strong>Explainable and Likelihood-Aware AI (ELAAI)</strong> framework to make tumour detection both <em>data-efficient</em> and <em>interpretable</em>.</p>

  <p><img src="/images/blogs/elaai_overview.png" alt="ELAAI Overview" />
<em>Figure: Simplified overview of the ELAAI workflow.</em></p>

  <p>ELAAI is built on three pillars:</p>

  <ol>
    <li><strong>MFA-Net</strong> - a <em>multi-scale feature aggregation</em> network that learns bladder anatomy from <em>normal</em> MRI scans, reducing the need for tumour-labelled data.</li>
    <li><strong>Refinement Step</strong> - a <em>knowledge-driven algorithm</em> that sharpens boundaries and identifies small wall irregularities.</li>
    <li><strong>SLIP-Net</strong> - a <em>vision transformer-based network</em> that converts spatial deformation between MRI slices into <em>pixel-level tumour likelihood maps</em>.</li>
  </ol>

  <p>Together, they provide not only segmentation but also <em>confidence maps</em> — visualising <em>how certain</em> the AI is about each prediction.</p>

  <h3 id="key-technical-insight">⚙️ Key Technical Insight</h3>
  <p>The core idea is to learn anatomy, not pathology.<br />
By modelling <em>what “normal” looks like</em>, ELAAI detects <em>deviations</em> that might indicate tumour onset, even when explicit tumour annotations are scarce.</p>

  <p>For example, our deterministic uncertainty module computes:</p>

\[U_{map} = \mathcal{N}\big( \text{var}(\theta) + \text{var}(M) \big)\]

  <p>where $\theta$ and $M$ represent phase and magnitude variations of inter-slice deformations.<br />
This allows pixel-level tumour likelihood estimation, effectively quantifying <em>where</em> and <em>how confidently</em> the model sees abnormalities.</p>

  <h3 id="results-in-brief">🔬 Results in Brief</h3>
  <p>ELAAI achieved a <strong>Dice score of 0.91</strong> on bladder segmentation and outperformed five state-of-the-art baselines such as <strong>PRANet, HarDNet, and FCBFormer</strong>.<br />
It was also more robust to noise and low-contrast MRI scans, demonstrating strong generalisation across different patient anatomies.</p>

  <p><img src="/images/blogs/elaai_results.png" alt="Results comparison" />
<em>Figure: ELAAI vs. other likelihood prediction frameworks on bladder MRI scans.</em></p>

  <h3 id="why-it-matters">🩺 Why It Matters</h3>
  <p>The framework enhances <strong>clinical trust</strong> by making predictions explainable and by highlighting <em>how uncertain</em> the model is.<br />
This means clinicians can interpret tumour likelihood maps as <em>confidence-weighted guidance</em>, not just binary outputs.</p>

  <h3 id="code-and-reference">🔗 Code and Reference</h3>
  <p>The complete implementation is available at<br />
👉 <a href="https://github.com/MuzammilAteo/ELAAI">github.com/MuzammilAteo/ELAAI</a></p>

  <blockquote>
    <p><em>This post summarises the follwoing research as:</em><br />
Khan M., de Groot A.G., Cornel E.B., van der Heijden A.G., Siepel F.J.<br />
“Explainable and Likelihood-Aware AI Framework for MRI-Based Pixel-Level Bladder Tumour Prediction,” 2024.</p>
  </blockquote>

</div>

<!-- Load MathJax for rendering inline and display math -->
<script>
  window.MathJax = {
    tex: {
      inlineMath: [['$', '$'], ['\\(', '\\)']],
      displayMath: [['$$', '$$'], ['\\[', '\\]']]
    },
    svg: { fontCache: 'global' }
  };
</script>

<script async="" id="MathJax-script" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>]]></content><author><name>Muzammil Khan</name><email>m.khan.2@erasmusmc.nl</email></author><category term="Medical Imaging" /><category term="Explainable AI" /><category term="MRI" /><category term="Deep Learning" /><category term="Uncertainty" /><summary type="html"><![CDATA[How our Explainable and Likelihood-Aware AI (ELAAI) framework improves tumour prediction in MRI scans while ensuring transparency and clinical trust.]]></summary></entry><entry><title type="html">Blog Post number 4</title><link href="https://muzammilateo.github.io/posts/2012/08/blog-post-4/" rel="alternate" type="text/html" title="Blog Post number 4" /><published>2015-08-14T00:00:00+00:00</published><updated>2015-08-14T00:00:00+00:00</updated><id>https://muzammilateo.github.io/posts/2012/08/blog-post-4</id><content type="html" xml:base="https://muzammilateo.github.io/posts/2012/08/blog-post-4/"><![CDATA[<p>This is a sample blog post. Lorem ipsum I can’t remember the rest of lorem ipsum and don’t have an internet connection right now. Testing testing testing this blog post. Blog posts are cool.</p>

<h1 id="headings-are-cool">Headings are cool</h1>

<h1 id="you-can-have-many-headings">You can have many headings</h1>

<h2 id="arent-headings-cool">Aren’t headings cool?</h2>]]></content><author><name>Muzammil Khan</name><email>m.khan.2@erasmusmc.nl</email></author><category term="cool posts" /><category term="category1" /><category term="category2" /><summary type="html"><![CDATA[This is a sample blog post. Lorem ipsum I can’t remember the rest of lorem ipsum and don’t have an internet connection right now. Testing testing testing this blog post. Blog posts are cool.]]></summary></entry><entry><title type="html">Blog Post number 3</title><link href="https://muzammilateo.github.io/posts/2014/08/blog-post-3/" rel="alternate" type="text/html" title="Blog Post number 3" /><published>2014-08-14T00:00:00+00:00</published><updated>2014-08-14T00:00:00+00:00</updated><id>https://muzammilateo.github.io/posts/2014/08/blog-post-3</id><content type="html" xml:base="https://muzammilateo.github.io/posts/2014/08/blog-post-3/"><![CDATA[<p>This is a sample blog post. Lorem ipsum I can’t remember the rest of lorem ipsum and don’t have an internet connection right now. Testing testing testing this blog post. Blog posts are cool.</p>

<h1 id="headings-are-cool">Headings are cool</h1>

<h1 id="you-can-have-many-headings">You can have many headings</h1>

<h2 id="arent-headings-cool">Aren’t headings cool?</h2>]]></content><author><name>Muzammil Khan</name><email>m.khan.2@erasmusmc.nl</email></author><category term="cool posts" /><category term="category1" /><category term="category2" /><summary type="html"><![CDATA[This is a sample blog post. Lorem ipsum I can’t remember the rest of lorem ipsum and don’t have an internet connection right now. Testing testing testing this blog post. Blog posts are cool.]]></summary></entry></feed>