{"id":19425219,"url":"https://github.com/viacheslavdanilov/histology_segmentation","last_synced_at":"2026-06-20T10:31:44.410Z","repository":{"id":160009532,"uuid":"631532189","full_name":"ViacheslavDanilov/histology_segmentation","owner":"ViacheslavDanilov","description":"This repository is dedicated to the segmentation of histological features in regenerated vascular tissues obtained from tissue-engineered vascular grafts (TEVGs) implanted in sheep.","archived":false,"fork":false,"pushed_at":"2024-12-25T10:51:31.000Z","size":62969,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-26T12:38:41.442Z","etag":null,"topics":["cell-segmentation","deep-learning","digital-pathology","histological-features","semantic-segmentation","vascular-tissue-engineering"],"latest_commit_sha":null,"homepage":"","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}},"created_at":"2023-04-23T10:14:41.000Z","updated_at":"2024-12-25T10:51:35.000Z","dependencies_parsed_at":"2024-03-10T07:26:31.423Z","dependency_job_id":"8b5da7f2-7a54-4c9f-b077-1976a1c3dd5a","html_url":"https://github.com/ViacheslavDanilov/histology_segmentation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ViacheslavDanilov/histology_segmentation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViacheslavDanilov%2Fhistology_segmentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViacheslavDanilov%2Fhistology_segmentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViacheslavDanilov%2Fhistology_segmentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViacheslavDanilov%2Fhistology_segmentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ViacheslavDanilov","download_url":"https://codeload.github.com/ViacheslavDanilov/histology_segmentation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViacheslavDanilov%2Fhistology_segmentation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34566920,"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-20T02:00:06.407Z","response_time":98,"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":["cell-segmentation","deep-learning","digital-pathology","histological-features","semantic-segmentation","vascular-tissue-engineering"],"created_at":"2024-11-10T13:46:44.377Z","updated_at":"2026-06-20T10:31:44.390Z","avatar_url":"https://github.com/ViacheslavDanilov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10838384.svg)](https://zenodo.org/doi/10.5281/zenodo.10838383)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10901377.svg)](https://zenodo.org/doi/10.5281/zenodo.10838431)\n[![DOI](http://img.shields.io/badge/DOI-10.3389/fbioe.2024.1411680-B31B1B)](https://doi.org/10.3389/fbioe.2024.1411680)\n\n# ML-driven segmentation of microvascular features of tissue-engineered vascular grafts\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\n\u003ca name=\"introduction\"\u003e\u003c/a\u003e\n## 🎯 Introduction\nThis repository presents an artificial intelligence (AI)-driven approach for the precise segmentation and quantification of histological features observed during the microscopic examination of tissue-engineered vascular grafts (TEVGs). The development of next-generation TEVGs is a leading trend in translational medicine, offering minimally invasive surgical interventions and reducing the long-term risk of device failure. However, the analysis of regenerated tissue architecture poses challenges, necessitating AI-assisted tools for accurate histological evaluation.\n\n\u003ca name=\"data\"\u003e\u003c/a\u003e\n## 📁 Data\nThe study utilized a dataset comprising 104 Whole Slide Images (WSIs) obtained from biodegradable TEVGs implanted into the carotid arteries of 20 sheep. After six months, the sheep were euthanized to assess vascular tissue regeneration patterns. The WSIs were automatically sliced into 99,831 patches, which underwent filtering and manual annotation by pathologists. A total of 1,401 patches were annotated, identifying nine histological features: _arteriole lumen (AL)_, _arteriole media (AM)_, _arteriole adventitia (AA)_, _venule lumen (VL)_, _venule wall (VW)_, _capillary lumen (CL)_, _capillary wall (CW)_, _immune cells (IC)_, and _nerve trunks (NT)_ (\u003ca href=\"#figure-1\"\u003eFigure 1\u003c/a\u003e). These annotations were meticulously verified by a senior pathologist, ensuring accuracy and consistency.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg id=\"figure-1\" width=\"80%\" height=\"80%\" src=\".assets/annotation_methodology.jpg\" 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 histology patches (top row) depicting features associated with a blood vessel regeneration (replacement of a biodegradable polymer by de novo formed vascular tissue). Histological annotations delineated with segmentation masks (bottom row) include arteriole lumen (red), arteriole media (pink), arteriole adventitia (light pink), venule lumen (blue), venule wall (light blue), capillary lumen (brown), capillary wall (tan), immune cells (lime), and nerve trunks (yellow).\u003c/em\u003e\n\u003c/p\u003e\n\n\n\u003ca name=\"methods\"\u003e\u003c/a\u003e\n## 🔬 Methods\nThe methodology involved two main stages: hyperparameter tuning and model training. Six deep learning models ([U-Net](https://link.springer.com/chapter/10.1007/978-3-319-24574-4_28), [LinkNet](https://ieeexplore.ieee.org/document/8305148), [FPN](http://presentations.cocodataset.org/COCO17-Stuff-FAIR.pdf), [PSPNet](https://arxiv.org/abs/1612.01105), [DeepLabV3](https://arxiv.org/abs/1706.05587), and [MA-Net](https://ieeexplore.ieee.org/document/9201310)) were rigorously tuned across 200 configurations to achieve optimal performance. Hyperparameters such as encoder architecture, input image size, optimizer, and learning rate were extensively explored using Bayesian optimization and [HyperBand](https://arxiv.org/abs/1603.06560) early termination strategies.\n\nFollowing the tuning stage, the models were trained and evaluated on the entire dataset using a 5-fold cross-validation approach (\u003ca href=\"#figure-2\"\u003eFigure 2\u003c/a\u003e). This ensured the integrity of subject groups within each subset, preventing data leakage. During training, various augmentation techniques were applied to expand the dataset and mitigate overfitting. Besides that, batch size adjusted based on GPU memory utilization (~90-100% usage).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg id=\"figure-2\" width=\"70%\" height=\"70%\" src=\".assets/loss_evolution.jpg\" alt=\"Loss and DSC evolution\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"left\"\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\n\u003ca name=\"results\"\u003e\u003c/a\u003e\n## 📈 Results\nThe MA-Net model achieved the highest mean Dice Similarity Coefficient (DSC) of 0.875, excelling in arteriole segmentation (\u003ca href=\"#table-1\"\u003eTable 1\u003c/a\u003e). DeepLabV3 performed well in segmenting venous and capillary structures, while FPN exhibited proficiency in identifying immune cells and nerve trunks. An ensemble of these three models attained an average DSC of 0.889, surpassing their individual performances.\n\n\u003cp align=\"right\"\u003e\n  \u003ci\u003e\u003cstrong id=\"table-1\"\u003eTable 1.\u003c/strong\u003e Feature-specific and average Dice Similarity Coefficients of the studied models.\u003c/i\u003e\n\u003c/p\u003e\n\n|   Model   |    AL     |    AM     |    AA     |    VL     |    VW     |    CL     |    CW     |    IC     |    NT     |   Mean    |\n|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|\n|   U-Net   |   0.931   | **0.907** |   0.820   |   0.797   |   0.766   |   0.801   |   0.783   |   0.920   |   0.966   |   0.855   |\n|  LinkNet  |   0.898   |   0.881   |   0.825   |   0.799   |   0.773   |   0.778   |   0.774   |   0.935   |   0.925   |   0.843   |\n|    FPN    |   0.919   |   0.904   |   0.805   |   0.852   |   0.800   |   0.756   |   0.755   | **0.955** | **0.981** |   0.859   |\n|  PSPNet   |   0.872   |   0.838   |   0.830   |   0.784   |   0.734   |   0.728   |   0.722   |   0.937   |   0.959   |   0.823   |\n| DeepLabV3 |   0.872   |   0.861   |   0.803   | **0.900** | **0.861** | **0.815** | **0.793** |   0.895   |   0.975   |   0.864   |\n|  MA-Net   | **0.939** |   0.893   | **0.860** |   0.848   |   0.830   |   0.806   |   0.787   |   0.937   |   0.978   | **0.875** |\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg id=\"figure-3\" width=\"100%\" height=\"100%\" src=\".assets/model_comparison.jpg\" alt=\"Model comparison\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cem\u003e\u003cstrong\u003eFigure 3.\u003c/strong\u003e Comparison of models for microvascular segmentation in tissue-engineered vascular grafts.\u003c/em\u003e\n\u003c/p\u003e\n\nTo illustrate the network predictions, we provide three patches showcasing the segmentation of the studied histologic features in (\u003ca href=\"#figure-4\"\u003eFigure 4\u003c/a\u003e). This figure presents predictions derived from an optimal solution: an ensemble of three models (MA-Net, DeepLabV3, and FPN).\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg id=\"figure-4\" width=\"80%\" height=\"80%\" src=\".assets/ensemble_prediction.jpg\" alt=\"Model comparison\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cem\u003e\u003cstrong\u003eFigure 4.\u003c/strong\u003e Comparison between ground truth segmentation and ensemble predictions.\u003c/em\u003e\n\u003c/p\u003e\n\n\n\u003ca name=\"conclusion\"\u003e\u003c/a\u003e\n## 🏁 Conclusion\nThis study demonstrates the potential of deep learning models for precise segmentation of histological features in regenerated tissues, paving the way for improved AI-assisted workflows during the analysis of tissue-engineered medical devices. The obtained findings foster further research in this field, contributing to the advancement of translational medicine and the implementation of next-generation tissue-engineered constructs.\n\n\u003ca name=\"requirements\"\u003e\u003c/a\u003e\n## 💻 Requirements\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**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/histology_segmentation.git\ncd histology_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_path` and `save_dir` parameters in the [predict.yaml](configs/predict.yaml) configuration file. By default, all images within the specified `data_path` will be processed and saved to the `save_dir` directory.\n\nAvailable `data_path` options:\n- **Option 1** - Directory with images (default): `data/demo/input`\n- **Option 2** - Single image: `data/demo/input/011_0123.jpg`\n\nTo run the pipeline, execute [predict.py](src/models/smp/predict.py) from your IDE or command prompt with:\n``` bash\npython src/models/smp/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/histology_segmentation](https://github.com/ViacheslavDanilov/histology_segmentation)\n- **Dataset:** [https://zenodo.org/doi/10.5281/zenodo.10838383](https://zenodo.org/doi/10.5281/zenodo.10838383)\n- **Models:** [https://zenodo.org/doi/10.5281/zenodo.10838431](https://zenodo.org/doi/10.5281/zenodo.10838431)\n\n\u003ca name=\"how-to-cite\"\u003e\u003c/a\u003e\n## 🖊️ How to Cite\nPlease cite [our paper](https://www.frontiersin.org/journals/bioengineering-and-biotechnology/articles/10.3389/fbioe.2024.1411680/full) if you found our data, methods, or results helpful for your research:\n\n\u003e Danilov V.V., Laptev V.V., Klyshnikov K.Yu., Stepanov A.D., Bogdanov L.A., Antonova L.V., Krivkina E.O., Kutikhin A.G., Ovcharenko E.A. (**2024**). _ML-driven segmentation of microvascular features during histological examination of tissue-engineered vascular grafts_. **Frontiers in Cell and Developmental Biology**. DOI: [https://doi.org/10.3389/fbioe.2024.1411680](https://doi.org/10.3389/fbioe.2024.1411680)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviacheslavdanilov%2Fhistology_segmentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviacheslavdanilov%2Fhistology_segmentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviacheslavdanilov%2Fhistology_segmentation/lists"}