{"id":19425195,"url":"https://github.com/viacheslavdanilov/oct_segmentation","last_synced_at":"2026-06-17T11:32:06.542Z","repository":{"id":44105288,"uuid":"458227794","full_name":"ViacheslavDanilov/oct_segmentation","owner":"ViacheslavDanilov","description":"This repository is dedicated to the segmentation of optical coherence tomography (OCT) images and the analysis of the plaques that appear on them","archived":false,"fork":false,"pushed_at":"2026-01-01T23:03:24.000Z","size":225760,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-26T12:38:41.359Z","etag":null,"topics":["deep-learning","image-processing","machine-learning","medical-imaging","segmentation"],"latest_commit_sha":null,"homepage":"https://www.vdanilov.com/portfolio/coronary-insight/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ViacheslavDanilov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-02-11T14:52:59.000Z","updated_at":"2026-01-23T11:09:26.000Z","dependencies_parsed_at":"2023-02-16T18:15:41.474Z","dependency_job_id":"c67d2a20-d462-4509-96ba-8ee1ffc0691e","html_url":"https://github.com/ViacheslavDanilov/oct_segmentation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ViacheslavDanilov/oct_segmentation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViacheslavDanilov%2Foct_segmentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViacheslavDanilov%2Foct_segmentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViacheslavDanilov%2Foct_segmentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViacheslavDanilov%2Foct_segmentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ViacheslavDanilov","download_url":"https://codeload.github.com/ViacheslavDanilov/oct_segmentation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViacheslavDanilov%2Foct_segmentation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34447264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","image-processing","machine-learning","medical-imaging","segmentation"],"created_at":"2024-11-10T13:46:41.293Z","updated_at":"2026-06-17T11:32:06.528Z","avatar_url":"https://github.com/ViacheslavDanilov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14478209.svg)](https://doi.org/10.5281/zenodo.14478209)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14481678.svg)](https://doi.org/10.5281/zenodo.14481678)\n[![DOI](http://img.shields.io/badge/DOI-TO.ADD.PAPER-B31B1B)](https://TO.BE.UPDATED.SOON)\n\n\u003ch1 align=\"center\"\u003eSegmentation and quantification of atherosclerotic plaques in OCT images\u003c/h1\u003e\n\u003cbr\u003e\n\n\u003ca name=\"contents\"\u003e\u003c/a\u003e\n## 📖 Contents\n- [Introduction](#introduction)\n- [Data](#data)\n- [Methods](#methods)\n- [Results](#results)\n- [Conclusion](#conclusion)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [How to Run](#how-to-run)\n- [Data Access](#data-access)\n- [How to Cite](#how-to-cite)\n\n\u003ca name=\"introduction\"\u003e\u003c/a\u003e\n## 🎯 Introduction\nThis repository provides a comprehensive approach for deep learning-based segmentation and quantification of atherosclerotic plaque features in [optical coherence tomography](https://en.wikipedia.org/wiki/Optical_coherence_tomography) (OCT) images. The accurate analysis of plaques is critical for preventing cardiovascular events and guiding therapeutic interventions. By leveraging state-of-the-art deep learning models, this project enables precise identification of lumen, fibrous cap, lipid core, and vasa vasorum features, contributing to advancements in cardiovascular diagnostics.\n\n\u003ca name=\"data\"\u003e\u003c/a\u003e\n## 📁 Data\nThe dataset comprises OCT images from 103 patients, collected across multiple centers. These images include 25,698 annotated slices, detailing four key plaque features:\n\n- **Lumen (LM):** Vascular opening\n- **Fibrous Cap (FC):** Thin protective layer over lipid core\n- **Lipid Core (LC)**: Lipid-rich region associated with vulnerable plaques\n- **Vasa Vasorum (VV)**: Microvessels supplying the arterial wall\n\nAnnotations were performed by cardiologists using [Supervisely](https://supervisely.com/), with double-verification for accuracy (refer to \u003ca href=\"#figure-1\"\u003eFigure 1\u003c/a\u003e). The dataset is structured for 5-fold cross-validation to ensure robust model evaluation. For more details, refer to the Dataset Repository at [https://doi.org/10.5281/zenodo.14478209](https://doi.org/10.5281/zenodo.14478209).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg id=\"figure-1\" width=\"100%\" height=\"100%\" src=\".assets/annotation-methodology.png\" alt=\"Annotation methodology\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"left\"\u003e\n    \u003cem\u003e\u003cstrong\u003eFigure 1.\u003c/strong\u003e Annotation methodology for optical coherence tomography images depicting plaque morphological features associated with atherosclerotic plaque development. The feature annotations delineated with segmentation masks include the lumen (pink), fibrous cap (blue), lipid core (blue), and vasa vasorum (red).\u003c/em\u003e\n\u003c/p\u003e\n\n\u003ca name=\"methods\"\u003e\u003c/a\u003e\n## 🔬 Methods\nWe employed nine advanced deep learning architectures — [U-Net](https://link.springer.com/chapter/10.1007/978-3-319-24574-4_28), [U-Net++](https://link.springer.com/chapter/10.1007/978-3-030-00889-5_1), [DeepLabV3](https://arxiv.org/abs/1706.05587), [DeepLabV3+](https://link.springer.com/chapter/10.1007/978-3-030-01234-2_49), [FPN](http://presentations.cocodataset.org/COCO17-Stuff-FAIR.pdf), [LinkNet](https://ieeexplore.ieee.org/document/8305148), [PSPNet](https://arxiv.org/abs/1612.01105), [PAN](https://arxiv.org/abs/1805.10180), and [MA-Net](https://ieeexplore.ieee.org/document/9201310) — to address the segmentation of atherosclerotic plaque features. To enhance performance, we applied a hybrid segmentation strategy, which involves designing specialized models for each plaque feature based on their prevalence and complexity:\n- **Lumen Segmentation:** A single-class model trained exclusively for the lumen, leveraging its high representation in the dataset.\n- **Fibrous Cap and Lipid Core Segmentation:** A two-class model trained jointly on these features due to their shared morphological characteristics and moderate dataset representation.\n- **Vasa Vasorum Segmentation:** A separate single-class model focused on this rare feature to better capture its unique characteristics.\n\nEach model underwent a comprehensive tuning process to optimize its performance, which included:\n- **Hyperparameter Tuning:** We employed Bayesian optimization, combined with the HyperBand early stopping strategy, to explore different configurations and identify the most effective hyperparameters for each model.\n- **Data Augmentation:** To enhance the robustness of the models and prevent overfitting, various augmentation techniques were applied, such as random brightness adjustments, rotations, and scaling.\n- **Cross-Validation:** A 5-fold cross-validation strategy was used to partition the data, ensuring that each model was trained and evaluated on different subsets of the dataset, which prevented data leakage and helped assess model generalizability.\n\n\u003ca name=\"results\"\u003e\u003c/a\u003e\n## 📈 Results\nThe models exhibited varying levels of accuracy across features. U-Net++ excelled in lumen segmentation, achieving a Dice Similarity Coefficient (DSC) of 0.987. This performance reflects the advantage of a single-class model dedicated to the lumen, leveraging its high representation in the dataset to capture clear and distinct boundaries effectively.\n\nFor fibrous cap and lipid core segmentation, LinkNet performed strongly with DSCs of 0.736 and 0.751, respectively. These results highlight the effectiveness of a two-class model trained jointly on these features, allowing it to better handle their shared morphological characteristics, such as overlapping and intricate boundaries.\n\nThe segmentation of vasa vasorum, a rare and subtle feature, was tackled using a dedicated single-class U-Net model, achieving a DSC of 0.610. Despite the inherent challenges due to its sparse representation in the dataset, this approach ensured focused learning on the vasa vasorum's unique structure, yielding promising results.\n\nAn ensemble approach combining U-Net++, LinkNet, and U-Net further improved overall segmentation accuracy, achieving an average DSC of 0.882. These results demonstrate the effectiveness of tailoring model architectures and strategies to the specific requirements of each plaque feature. Performance metrics, including precision, recall, F1 score, IoU and DSC, are detailed in \u003ca href=\"#table-1\"\u003eTable 1\u003c/a\u003e, with training dynamics and segmentation outcomes visualized in \u003ca href=\"#figure-2\"\u003eFigure 2\u003c/a\u003e, \u003ca href=\"#figure-3\"\u003eFigure 3\u003c/a\u003e, and \u003ca href=\"#figure-4\"\u003eFigure 4\u003c/a\u003e.\n\n\u003cp align=\"left\"\u003e\n  \u003ci\u003e\u003cstrong id=\"table-1\"\u003eTable 1.\u003c/strong\u003e Segmentation performance metrics for each plaque morphological feature, averaged over 5 folds.\u003c/i\u003e\n\u003c/p\u003e\n\n|   **PMF**    | **Precision** | **Recall** | **F1** | **IoU** | **DSC** |\n|:------------:|:-------------:|:----------:|:------:|:-------:|:-------:|\n|    Lumen     |     0.986     |   0.988    | 0.987  |  0.975  |  0.987  |\n| Fibrous cap  |     0.737     |   0.784    | 0.736  |  0.608  |  0.736  |\n|  Lipid core  |     0.815     |   0.772    | 0.751  |  0.639  |  0.751  |\n| Vasa vasorum |     0.664     |   0.630    | 0.610  |  0.511  |  0.610  |\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg id=\"figure-2\" width=\"80%\" height=\"80%\" src=\".assets/loss-and-dsc-evolution.png\" alt=\"Loss and DSC evolution\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cem\u003e\u003cstrong\u003eFigure 2.\u003c/strong\u003e Comparative analysis of loss and DSC evolution during training and testing phases over 5-fold cross-validation with 95% confidence interval.\u003c/em\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg id=\"figure-3\" width=\"80%\" height=\"80%\" src=\".assets/prediction-vs-ground-truth.png\" alt=\"Comparison GT with predictions\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cem\u003e\u003cstrong\u003eFigure 3.\u003c/strong\u003e Comparison between ground truth segmentation and ensemble predictions.\u003c/em\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg id=\"figure-4\" width=\"80%\" height=\"80%\" src=\".assets/activation-maps.png\" alt=\"Class Activation Maps\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cem\u003e\u003cstrong\u003eFigure 4.\u003c/strong\u003e Comparative class activation maps for the lumen region in patient 032.\u003c/em\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n\u003ca name=\"conclusion\"\u003e\u003c/a\u003e\n## 🏁 Conclusion\nThis project leverages optimized machine learning models to automate atherosclerotic plaque segmentation in OCT images, achieving high accuracy for key features such as lumen (DSC: 0.987), fibrous cap (DSC: 0.736), lipid core (DSC: 0.751), and vasa vasorum (DSC: 0.610). The hybrid segmentation strategy and targeted optimization effectively handled dataset imbalances and feature complexities, ensuring robust performance across diverse plaque morphologies. This work underscores the potential of ML-driven OCT imaging in detecting vulnerable plaques, guiding interventions, and advancing cardiovascular diagnostics. Openly shared resources promote further innovation in this field.\n\n\u003ca name=\"requirements\"\u003e\u003c/a\u003e\n## 💻 Requirements\n\n- Operating System\n  - [x] macOS\n  - [x] Linux\n  - [x] Windows (limited testing carried out)\n- Python 3.11.x\n- Required core libraries: [environment.yaml](environment.yaml)\n\n\u003ca name=\"installation\"\u003e\u003c/a\u003e\n## ⚙ Installation\n\n**Step 1: Install Miniconda**\n\nInstallation guide: https://docs.conda.io/projects/miniconda/en/latest/index.html#quick-command-line-install\n\n**Step 2: Clone the repository and change the current working directory**\n``` bash\ngit clone https://github.com/ViacheslavDanilov/oct_segmentation.git\ncd oct_segmentation\n```\n\n**Step 3: Set up an environment and install the necessary packages**\n``` bash\nchmod +x make_env.sh\n./make_env.sh\n```\n\n\u003ca name=\"how-to-run\"\u003e\u003c/a\u003e\n## 🚀 How to Run\n\nSpecify the `data_dir` and `save_dir` parameters in the [predict.yaml](configs/predict.yaml) configuration file. By default, all images within the specified `data_dir` will be processed and saved to the `save_dir` directory.\n\nTo run the pipeline, execute [predict.py](src/predict.py) from your IDE or command prompt with:\n``` bash\npython src/predict.py\n```\n\n\u003ca name=\"data-access\"\u003e\u003c/a\u003e\n## 🔐 Data Access\nAll essential components of the study, including the curated source code, dataset, and trained models, are publicly available:\n- **Source code:** [https://github.com/ViacheslavDanilov/oct_segmentation](https://github.com/ViacheslavDanilov/oct_segmentation)\n- **Dataset:** [https://doi.org/10.5281/zenodo.14478209](https://doi.org/10.5281/zenodo.14478209)\n- **Models:** [https://doi.org/10.5281/zenodo.14481678](https://doi.org/10.5281/zenodo.14481678)\n\n\u003ca name=\"how-to-cite\"\u003e\u003c/a\u003e\n## 🖊️ How to Cite - TO BE UPDATED ONCE THE PAPER IS PUBLISHED\nPlease cite [OUR PAPER](https://TO.BE.UPDATED.SOON) if you found our data, methods, or results helpful for your research:\n\n\u003e Danilov V.V., Laptev V.V., Klyshnikov K.Yu., Ovcharenko E.A. (**2024**). _PAPER TITLE_. **Journal Title**. DOI: [TO.BE.UPDATED.SOON](TO.BE.UPDATED.SOON)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviacheslavdanilov%2Foct_segmentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviacheslavdanilov%2Foct_segmentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviacheslavdanilov%2Foct_segmentation/lists"}