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.


免费创建高清无水印Sora视频
Vora是一个免费创建高清无水印Sora视频的AI工具


最适合小白的AI自动化工作流平台
无需编码 ,轻松生成可复用、可变现的AI自动化工作流

大模型驱动的Excel数据处理工具
基于大模型交互的表格处理系统,允许用户通过对话方式完成数据整理和可视化分析。系统采用机器学习算法解析用户指令,自动执行排序、公式计算和数据透视等操作,支持多种文件格式导入导出。数据处理响应速度保持在0.8秒以内,支持超过100万行数据的即时分析。


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


AI论文写作指导平台
AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。


AI一键生成PPT,就用博思AIPPT!
博思AIPPT,新一代的AI生 成PPT平台,支持智能生成PPT、AI美化PPT、文本&链接生成PPT、导入Word/PDF/Markdown文档生成PPT等,内置海量精美PPT模板,涵盖商务、教育、科技等不同风格,同时针对每个页面提供多种版式,一键自适应切换,完美适配各种办公场景。


AI赋能电商视觉革命,一站式智能商拍平台
潮际好麦深耕服装行业,是国内AI试衣效果最好的软件。使用先进AIGC能力为电商卖家批量提供优质的、低成本的商拍图。合作品牌有Shein、Lazada、安踏、百丽等65个国内外头部品牌,以及国内10万+淘宝、天猫、京东等主流平台的品牌商家,为卖家节省将近85%的出图成本,提升约3倍出图效率,让品牌能够快速上架。


企业专属的AI法律顾问
iTerms是法大大集团旗下法律子品 牌,基于最先进的大语言模型(LLM)、专业的法律知识库和强大的智能体架构,帮助企业扫清合规障碍,筑牢风控防线,成为您企业专属的AI法律顾问。


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


最新版Sora2模型免费使用,一键生成无水印视频
最新版Sora2模型免费使用,一键生成无水印视频
最新AI工具、AI资讯
独家AI资源、AI项目落地

微信扫一扫关注公众号