This toolbox aims at providing low-level and high-level building blocks for Machine Learning / AI researchers and practitioners. It helps to simplify and streamline work on deep learning models for healthcare and life sciences, by providing tested components (data loaders, pre-processing), deep learning models, and cloud integration tools.
This repository consists of two Python packages, as well as project-specific codebases:
For the full toolbox (this will also install hi-ml-azure):
pypi via pip, by running pip install hi-mlFor just the AzureML helper functions:
pypi via pip, by running pip install hi-ml-azureFor the histopathology workflows, please follow the instructions here.
If you would like to contribute to the code, please check the developer guide.
The detailed package documentation, with examples and API reference, is on readthedocs.
Use case: you have a Python script that does something - that could be training a model, or pre-processing some data.
The hi-ml-azure package can help easily run that on Azure Machine Learning (AML) services.
Here is an example script that reads images from a folder, resizes and saves them to an output folder:
from pathlib import Path if __name__ == '__main__': input_folder = Path("/tmp/my_dataset") output_folder = Path("/tmp/my_output") for file in input_folder.glob("*.jpg"): contents = read_image(file) resized = contents.resize(0.5) write_image(output_folder / file.name)
Doing that at scale can take a long time. We'd like to run that script in AzureML, consume the data from a folder in blob storage, and write the results back to blob storage.
With the hi-ml-azure package, you can turn that script into one that runs on the cloud by adding one function call:
from pathlib import Path from health_azure import submit_to_azure_if_needed if __name__ == '__main__': current_file = Path(__file__) run_info = submit_to_azure_if_needed(compute_cluster_name="preprocess-ds12", input_datasets=["images123"], # Omit this line if you don't create an output dataset (for example, in # model training scripts) output_datasets=["images123_resized"], default_datastore="my_datastore") # When running in AzureML, run_info.input_datasets and run_info.output_datasets will be populated, # and point to the data coming from blob storage. For runs outside AML, the paths will be None. # Replace the None with a meaningful path, so that we can still run the script easily outside AML. input_dataset = run_info.input_datasets[0] or Path("/tmp/my_dataset") output_dataset = run_info.output_datasets[0] or Path("/tmp/my_output") files_processed = [] for file in input_dataset.glob("*.jpg"): contents = read_image(file) resized = contents.resize(0.5) write_image(output_dataset / file.name) files_processed.append(file.name) # Any other files that you would not consider an "output dataset", like metrics, etc, should be written to # a folder "./outputs". Any files written into that folder will later be visible in the AzureML UI. # run_info.output_folder already points to the correct folder. stats_file = run_info.output_folder / "processed_files.txt" stats_file.write_text("\n".join(files_processed))
Once these changes are in place, you can submit the script to AzureML by supplying an additional --azureml flag
on the commandline, like python myscript.py --azureml.
That's it!
For details, please refer to the onboarding page.
For more examples, please see examples.md.
If you've found a bug in the code, please check the issues page. If no existing issue exists, please open a new one. Be sure to include
We welcome all contributions that help us achieve our aim of speeding up ML/AI research in health and life sciences. Examples of contributions are
Please check the detailed page about contributions.
You are responsible for the performance, the necessary testing, and if needed any regulatory clearance for any of the models produced by this toolbox.
If you have any feature requests, or find issues in the code, please create an issue on GitHub.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.


稳定高效的流量提升解决方案,助力品牌曝光
稳定高效的流量提升解决方案,助力品牌曝光


最新版Sora2模型免费使用,一键生成无水 印视频
最新版Sora2模型免费使用,一键生成无水印视频


实时语音翻译/同声传译工具
Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带它走遍全球,无论你是留学生、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。


选题、配图、成文,一站式创作,让内容运营更高效
讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播,提升内容营销效果。


AI辅助编程,代码自动修复
Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。


最强AI数据分析助手
小浣熊家族Raccoon,您的AI智能助手,致力于通过先进的人工智能技术,为用户提供高效、便捷的智能服务。无论是日常咨询还是专业问题解答,小浣熊都能以快速、准确的响应满足您的需求,让您的生活更加智能便捷。


像人一样思考的AI智能体
imini 是一款超级AI智能体,能根据人类指令,自主思考、自主完成、并且交付结果的AI智能体。


AI数字人视频创作平台
Keevx 一款开箱即用的AI数字人视频创作平台,广泛适用于电商广告、企业培训与社媒宣传,让全球企业与个人创作者无需拍摄剪辑,就能快速生成多语言、高质量的专业视频。


一站式AI创作平台
提供 AI 驱动的图片、视频生成及数字人等功能,助力创意创作


AI办公助手,复杂任务高效处理
AI办公助手,复杂任务高效处理。办公效率低?扣子空间AI助手支持播客生成、PPT制作、网页开发及报告写作,覆盖科研、商业、舆情等领域的专家Agent 7x24小时响应,生活工作无缝切换,提升50%效率!
最新AI工具、AI资讯
独家AI资源、AI项目落地

微信扫一扫关注公众号