Article Text

Download PDFPDF
Compound computer vision workflow for efficient and automated immunohistochemical analysis of whole slide images
  1. Michael Kyung Ik Lee1,2,
  2. Madhumitha Rabindranath1,
  3. Kevin Faust2,3,
  4. Jennie Yao2,
  5. Ariel Gershon4,
  6. Noor Alsafwani5,
  7. Phedias Diamandis1,2,4,6
  1. 1 Laboratory Medicine & Pathobiology, University of Toronto Temerty Faculty of Medicine, Toronto, Ontario, Canada
  2. 2 Princess Margaret Cancer Centre, University Health Network, Toronto, Ontario, Canada
  3. 3 Computer Science, University of Toronto, Toronto, Ontario, Canada
  4. 4 Pathology, University Health Network, Toronto, Ontario, Canada
  5. 5 Pathology, Imam Abdulrahman Bin Faisal University, Dammam, Saudi Arabia
  6. 6 Medical Biophysics, University of Toronto, Toronto, Ontario, Canada
  1. Correspondence to Dr Phedias Diamandis, Laboratory Medicine & Pathobiology, University of Toronto Temerty Faculty of Medicine, Toronto, Canada; p.diamandis{at}


Aims Immunohistochemistry (IHC) assessment of tissue is a central component of the modern pathology workflow, but quantification is challenged by subjective estimates by pathologists or manual steps in semi-automated digital tools. This study integrates various computer vision tools to develop a fully automated workflow for quantifying Ki-67, a standard IHC test used to assess cell proliferation on digital whole slide images (WSIs).

Methods We create an automated nuclear segmentation strategy by deploying a Mask R-CNN classifier to recognise and count 3,3′-diaminobenzidine positive and negative nuclei. To further improve automation, we replaced manual selection of regions of interest (ROIs) by aligning Ki-67 WSIs with corresponding H&E-stained sections, using scale-invariant feature transform (SIFT) and a conventional histomorphological convolutional neural networks to define tumour-rich areas for quantification.

Results The Mask R-CNN was tested on 147 images generated from 34 brain tumour Ki-67 WSIs and showed a high concordance with aggregate pathologists’ estimates (Embedded Image assessors; Embedded Image r=0.9750). Concordance of each assessor’s Ki-67 estimates was higher when compared with the Mask R-CNN than between individual assessors (ravg=0.9322 vs 0.8703; p=0.0213). Coupling the Mask R-CNN with SIFT-CNN workflow demonstrated ROIs can be automatically chosen and partially sampled to improve automation and dramatically decrease computational time (average: 88.55–19.28 min; p<0.0001).

Conclusions We show how innovations in computer vision can be serially compounded to automate and improve implementation in clinical workflows. Generalisation of this approach to other ancillary studies has significant implications for computational pathology.

  • brain neoplasms
  • computers
  • molecular
  • diagnostic techniques and procedures
  • immunohistochemistry
  • image processing
  • computer-assisted

Data availability statement

Data are available in a public, open access repository. Data are available upon reasonable request. (

Statistics from

Request Permissions

If you wish to reuse any or all of this article please use the link below which will take you to the Copyright Clearance Center’s RightsLink service. You will be able to get a quick price and instant permission to reuse the content in many different ways.


  • Handling editor Runjan Chetty.

  • Twitter @pdiamandisii

  • MKIL, MR and KF contributed equally.

  • Contributors KF, MR, MKIL and PD conceived the idea and approach. KF developed the computational workflow. MR, MKIL, JY and PD annotated and generated the training and validation image set, and interpreted the IHC data. NA, AG and PD assisted with human evaluation of IHC images. KF, MR, MKIL and PD wrote the manuscript with input from all other authors. PD acted as the guarantor for this paper.

  • Funding Funding support is provided by the Terry Fox Research Institute New Investigator Award, Cancer Research Society, the Canadian Institute for Health Research and the Princess Margaret Cancer Foundation. MKIL is supported by Frederick Banting and Charles Best Canada Graduate Scholarships (CGS-M).

  • Competing interests None declared.

  • Provenance and peer review Not commissioned; internally peer reviewed.

  • Supplemental material This content has been supplied by the author(s). It has not been vetted by BMJ Publishing Group Limited (BMJ) and may not have been peer-reviewed. Any opinions or recommendations discussed are solely those of the author(s) and are not endorsed by BMJ. BMJ disclaims all liability and responsibility arising from any reliance placed on the content. Where the content includes any translated material, BMJ does not warrant the accuracy and reliability of the translations (including but not limited to local regulations, clinical guidelines, terminology, drug names and drug dosages), and is not responsible for any error and/or omissions arising from translation and adaptation or otherwise.