{"id":19425237,"url":"https://github.com/viacheslavdanilov/generative_design","last_synced_at":"2025-10-24T18:34:05.955Z","repository":{"id":39105298,"uuid":"459451905","full_name":"ViacheslavDanilov/generative_design","owner":"ViacheslavDanilov","description":"This repository is dedicated to the development of an approach based on machine learning and optimization algorithms for generative design of a prosthetic heart valve","archived":false,"fork":false,"pushed_at":"2024-12-25T10:43:29.000Z","size":101219,"stargazers_count":7,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-03T07:51:18.349Z","etag":null,"topics":["artificial-intelligence","finite-element-methods","generative-design","heart-valve","machine-learning"],"latest_commit_sha":null,"homepage":"https://sites.google.com/view/viacheslav-danilov","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":"2022-02-15T06:15:52.000Z","updated_at":"2025-03-04T03:41:15.000Z","dependencies_parsed_at":"2024-12-25T11:32:16.849Z","dependency_job_id":null,"html_url":"https://github.com/ViacheslavDanilov/generative_design","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViacheslavDanilov%2Fgenerative_design","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViacheslavDanilov%2Fgenerative_design/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViacheslavDanilov%2Fgenerative_design/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViacheslavDanilov%2Fgenerative_design/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ViacheslavDanilov","download_url":"https://codeload.github.com/ViacheslavDanilov/generative_design/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250663544,"owners_count":21467366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["artificial-intelligence","finite-element-methods","generative-design","heart-valve","machine-learning"],"created_at":"2024-11-10T13:46:48.121Z","updated_at":"2025-10-24T18:34:05.895Z","avatar_url":"https://github.com/ViacheslavDanilov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10865908.svg)](https://doi.org/10.5281/zenodo.10865908)\n[![DOI](https://img.shields.io/badge/DOI-10.3389/fbioe.2023.1238130-B31B1B)](https://doi.org/10.3389/fbioe.2023.1238130)\n\n# Perfect prosthetic heart valve: generative design with machine learning, modeling, and optimization\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- [Data Access](#data-access)\n- [How to Cite](#how-to-cite)\n\n\u003ca name=\"introduction\"\u003e\u003c/a\u003e\n## 🎯 Introduction\nThis study proposes a novel method for designing prosthetic heart valves (PHVs) by combining machine learning (ML) with optimization algorithms. This approach aims to overcome the limitations of traditional design methods, such as [Computer-Aided Design](https://en.wikipedia.org/wiki/Computer-aided_design) (CAD) and [Finite Element Method](https://en.wikipedia.org/wiki/Finite_element_method) (FEM), by automating the exploration of the vast design space, enabling the rapid development of PHVs that are potentially more effective and durable.\n\n\u003ca name=\"data\"\u003e\u003c/a\u003e\n## 📁 Data\nOur dataset comprises 11,565 unique PHV designs, meticulously generated through parametric modeling. Each design variant is defined by a set of six key parameters: _height (HGT)_, _diameter (DIA)_, _leaflet thickness (THK)_, _curvature (CVT)_, _elevation angle (ANG)_, and _material stiffness (Young’s modulus, ELM)_. These parameters were systematically varied (\u003ca href=\"#figure-1\"\u003eFigure 1\u003c/a\u003e) within realistic ranges to simulate a wide array of possible PHV configurations. For each design, FEM was performed to simulate its behavior under typical physiological conditions, focusing on two critical performance metrics: the _opening area (LMN)_ and _peak stress (STS)_ on the leaflets. This comprehensive dataset serves as the foundation for our machine learning models, capturing the complex interplay between design parameters and PHV performance.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg id=\"figure-1\" width=\"60%\" height=\"60%\" src=\"media/data_distribution.png\" alt=\"Data distribution\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cem\u003e\u003cstrong\u003eFigure 1.\u003c/strong\u003e Distribution of input variables and output targets.\u003c/em\u003e\n\u003c/p\u003e\n\n\u003ca name=\"methods\"\u003e\u003c/a\u003e\n## 🔬 Methods\n\n### Parametric Design and Finite Element Analysis\nInitially, PHV designs were generated using MATLAB, varying the six key parameters within predefined ranges. These designs were then analyzed using \"Abaqus/CAE\" to simulate their mechanical behavior under physiological pressures. The simulation results provided us with LMN and STS values for each design.\n\n### Machine Learning Models\nWith the dataset in hand, we explored a variety of machine learning algorithms, focusing particularly on ensemble methods due to their robustness and accuracy. The dataset was split into training and validation sets, with 80% for training and 20% for validation. We evaluated the performance of decision trees, random forests, gradient boosting machines (including XGBoost, LightGBM, and CatBoost), and neural networks, ultimately focusing on ensemble models that combined the strengths of multiple algorithms.\n\n### Optimization Algorithms\nFor the optimization phase, we employed six state-of-the-art algorithms: [Random Search](https://www.jmlr.org/papers/v13/bergstra12a.html) (RS), [Tree-structured Parzen Estimator](https://papers.nips.cc/paper/2011/hash/86e8f7ab32cfd12577bc2619bc635690-Abstract.html) (TPE), [CMA-ES-based Algorithm](https://arxiv.org/abs/1604.00772) (CMA), [Nondominated Sorting Genetic Algorithm](https://ieeexplore.ieee.org/document/996017) (NSGA), [Multiobjective Tree-structured Parzen Estimator](https://www.jair.org/index.php/jair/article/view/13188) (MTPE), [Quasi-Monte Carlo Algorithm](https://www.jmlr.org/papers/v13/bergstra12a.html) (QMC). Each algorithm was tasked with finding the optimal set of design parameters that maximized the opening area while minimizing the peak stress, iterating through 2,000 design simulations per algorithm.\n\n\u003ca name=\"results\"\u003e\u003c/a\u003e\n## 📈 Results\nOur ensemble ML models achieved notable accuracy, with Mean Absolute Percentage Errors of 11.8% for the lumen opening and 10.2% for peak stress predictions (\u003ca href=\"#table-1\"\u003eTable 1\u003c/a\u003e). This precision underscores the potential of ML models to predict PHV performance based on design parameters.\n\nIn the optimization phase, TPE and NSGA emerged as the most effective algorithms, efficiently navigating the design space to identify configurations that balanced the opening area and stress distribution. Designs optimized by these algorithms achieved design scores of approximately 95%, indicating a high degree of efficacy in meeting the established performance criteria.\n\n\u003cp align=\"left\"\u003e\u003ci\u003e\u003cstrong id=\"table-1\"\u003eTable 1.\u003c/strong\u003e Evaluation of model performance on training and validation subsets.\u003c/i\u003e\u003c/p\u003e\n\n| **№** | **Metric** | **LMN train** | **LMN val** | **STS train** | **STS val** |\n|:-----:|:----------:|:-------------:|-------------|:-------------:|:-----------:|\n|   1   |    MAPE    |     0.116     | 0.118       |     0.093     |    0.102    |\n|   2   |    WAPE    |     0.042     | 0.044       |     0.077     |    0.081    |\n|   3   |    MAE     |     0.018     | 0.019       |     0.127     |    0.135    |\n|   4   |   NRMSE    |     0.040     | 0.044       |     0.022     |    0.029    |\n|   5   |    R^2     |     98.7%     | 98.4%       |     97.0%     |    96.8%    |\n\nA qualitative examination of the optimization results confirms the efficiency of the algorithms. All algorithms effectively selected parameter combinations that resulted in optimal leaflet opening while minimizing stress, as demonstrated in \u003ca href=\"#figure-2\"\u003eFigure 2\u003c/a\u003e. The optimal leaflet models typically exhibit high opening areas while maintaining moderate stress values, which in most cases do not exceed 2.0 MPa. This is well below the strength limit of the material models. It is noteworthy that the optimization algorithms show similar trends in selecting the best geometric indicators.\n\nThe [**valve opening directory**](https://github.com/ViacheslavDanilov/generative_design/tree/main/media/valve_opening) provides a set of valves generated by all optimization algorithms, with the valve presented below being specifically generated by the Quasi-Monte Carlo algorithm.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg id=\"figure-2\" width=\"80%\" height=\"80%\" src=\"media/generated_valves.png\" alt=\"Approach overview\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"left\"\u003e\n    \u003cem\u003e\u003cstrong\u003eFigure 2.\u003c/strong\u003e Examples of final designs resulting from the studied optimizers: epiphyses in the open state after pressure application simulation. The initial geometry from which all algorithms started optimization is also presented.\u003c/em\u003e\n\u003c/p\u003e\n\nhttps://user-images.githubusercontent.com/32963687/218339366-ecd354f0-4612-4097-8f01-6c0774b9d044.mp4\n\n\u003ca name=\"conclusion\"\u003e\u003c/a\u003e\n## 🏁 Conclusion\n\nOur generative design approach offers a significant advancement in the development of medical devices, especially prosthetic heart valves. By harnessing the power of machine learning and optimization algorithms, we can explore a wider array of geometric possibilities and achieve optimal designs more efficiently than traditional methods.\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.8.x\n- Required core packages: [requirements.txt](https://github.com/ViacheslavDanilov/generative_design/blob/main/requirements.txt)\n\n\u003ca name=\"installation\"\u003e\u003c/a\u003e\n## ⚙ Installation\n**Step 1:** Download and install Miniconda\n``` bash\nwget https://repo.anaconda.com/miniconda/Miniconda3-py38_22.11.1-1-Linux-x86_64.sh\nchmod +x Miniconda3-latest-Linux-x86_64.sh\n./Miniconda3-latest-Linux-x86_64.sh\n```\n\n**Step 2:** Clone the repository\n``` bash\ngit clone https://github.com/ViacheslavDanilov/generative_design.git\n```\n\n**Step 3:** Create a conda environment and install the requirements for the repository\n``` bash\ncd generative_design\nchmod +x create_env.sh\nsource create_env.sh\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/generative_design\n- **Dataset:** https://github.com/ViacheslavDanilov/generative_design/raw/main/dataset/data.xlsx\n- **Models:** https://zenodo.org/doi/10.5281/zenodo.10865907\n\n\u003ca name=\"how-to-cite\"\u003e\u003c/a\u003e\n## 🖊️ How to Cite\nPlease cite [our paper](https://doi.org/10.3389/fbioe.2023.1238130) if you found our data, methods, or results helpful for your research:\n\n\u003e Danilov V.V., Klyshnikov K.Y., Onishenko P.S., Proutski A., Gankin Y., Melgani F., Ovcharenko E.A. (**2023**). _Perfect prosthetic heart valve: generative design with machine learning, modeling, and optimization_. **Frontiers in Bioengineering and Biotechnology**. DOI: [https://doi.org/10.3389/fbioe.2023.1238130](https://doi.org/10.3389/fbioe.2023.1238130)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviacheslavdanilov%2Fgenerative_design","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviacheslavdanilov%2Fgenerative_design","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviacheslavdanilov%2Fgenerative_design/lists"}