[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-bowang-lab--MedRAX":3,"tool-bowang-lab--MedRAX":62},[4,18,26,36,46,54],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",159636,2,"2026-04-17T23:33:34",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":42,"last_commit_at":43,"category_tags":44,"status":17},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[13,45],"插件",{"id":47,"name":48,"github_repo":49,"description_zh":50,"stars":51,"difficulty_score":32,"last_commit_at":52,"category_tags":53,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":55,"name":56,"github_repo":57,"description_zh":58,"stars":59,"difficulty_score":32,"last_commit_at":60,"category_tags":61,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[45,13,15,14],{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":68,"readme_en":69,"readme_zh":70,"quickstart_zh":71,"use_case_zh":72,"hero_image_url":73,"owner_login":74,"owner_name":75,"owner_avatar_url":76,"owner_bio":77,"owner_company":78,"owner_location":78,"owner_email":78,"owner_twitter":78,"owner_website":78,"owner_url":79,"languages":80,"stars":89,"forks":90,"last_commit_at":91,"license":92,"difficulty_score":93,"env_os":94,"env_gpu":95,"env_ram":94,"env_deps":96,"category_tags":106,"github_topics":107,"view_count":32,"oss_zip_url":78,"oss_zip_packed_at":78,"status":17,"created_at":118,"updated_at":119,"faqs":120,"releases":156},8908,"bowang-lab\u002FMedRAX","MedRAX","MedRAX: Medical Reasoning Agent for Chest X-ray - ICML 2025","MedRAX 是一款专为胸部 X 光片（CXR）解读设计的医疗推理智能体，旨在解决现有 AI 模型功能单一、难以应对复杂临床查询的痛点。它并非单一模型，而是一个能够动态调度多种顶尖专用工具的统一框架。通过集成视觉问答、病灶分割、定位、疾病分类及报告生成等能力，MedRAX 无需额外训练即可协同处理从病灶检测到综合诊断的多步骤复杂任务。\n\n该项目基于 LangChain 和 LangGraph 构建，以具备视觉能力的 GPT-4o 为核心大脑，采用模块化设计，支持本地或云端部署，并提供了基于 Gradio 的即用型交互界面。为了验证其性能，团队还发布了包含 2500 个复杂病例的 ChestAgentBench 基准测试集，涵盖检测、定位、关系推断等七大维度。实验表明，MedRAX 在多项指标上超越了现有的开源及专有模型。\n\nMedRAX 非常适合医疗 AI 研究人员、开发者以及需要辅助诊断参考的临床医生使用。对于研究者，其开放的架构便于集成新工具或评估算法；对于开发者，清晰的代码库和基准数据有助于快速构建应用；对于临床端，它能提供比传统单任务模型更全面、逻辑更严密的影像分析支持，是推动","MedRAX 是一款专为胸部 X 光片（CXR）解读设计的医疗推理智能体，旨在解决现有 AI 模型功能单一、难以应对复杂临床查询的痛点。它并非单一模型，而是一个能够动态调度多种顶尖专用工具的统一框架。通过集成视觉问答、病灶分割、定位、疾病分类及报告生成等能力，MedRAX 无需额外训练即可协同处理从病灶检测到综合诊断的多步骤复杂任务。\n\n该项目基于 LangChain 和 LangGraph 构建，以具备视觉能力的 GPT-4o 为核心大脑，采用模块化设计，支持本地或云端部署，并提供了基于 Gradio 的即用型交互界面。为了验证其性能，团队还发布了包含 2500 个复杂病例的 ChestAgentBench 基准测试集，涵盖检测、定位、关系推断等七大维度。实验表明，MedRAX 在多项指标上超越了现有的开源及专有模型。\n\nMedRAX 非常适合医疗 AI 研究人员、开发者以及需要辅助诊断参考的临床医生使用。对于研究者，其开放的架构便于集成新工具或评估算法；对于开发者，清晰的代码库和基准数据有助于快速构建应用；对于临床端，它能提供比传统单任务模型更全面、逻辑更严密的影像分析支持，是推动自动化胸片解读系统落地的重要一步。","\u003Ch1 align=\"center\">\n🤖 MedRAX: Medical Reasoning Agent for Chest X-ray\n\u003C\u002Fh1>\n\u003Cp align=\"center\"> \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2502.02673\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-ICML 2025-FF6B6B?style=for-the-badge&logo=arxiv&logoColor=white\" alt=\"arXiv\">\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fbowang-lab\u002FMedRAX\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGitHub-Code-4A90E2?style=for-the-badge&logo=github&logoColor=white\" alt=\"GitHub\">\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fwanglab\u002Fchest-agent-bench\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHuggingFace-Dataset-FFBF00?style=for-the-badge&logo=huggingface&logoColor=white\" alt=\"HuggingFace Dataset\">\u003C\u002Fa> \u003C\u002Fp>\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbowang-lab_MedRAX_readme_495654477f38.gif)\n\n\u003Cbr>\n\n## Abstract\nChest X-rays (CXRs) play an integral role in driving critical decisions in disease management and patient care. While recent innovations have led to specialized models for various CXR interpretation tasks, these solutions often operate in isolation, limiting their practical utility in clinical practice. We present MedRAX, the first versatile AI agent that seamlessly integrates state-of-the-art CXR analysis tools and multimodal large language models into a unified framework. MedRAX dynamically leverages these models to address complex medical queries without requiring additional training. To rigorously evaluate its capabilities, we introduce ChestAgentBench, a comprehensive benchmark containing 2,500 complex medical queries across 7 diverse categories. Our experiments demonstrate that MedRAX achieves state-of-the-art performance compared to both open-source and proprietary models, representing a significant step toward the practical deployment of automated CXR interpretation systems.\n\u003Cbr>\u003Cbr>\n\n\n## MedRAX\nMedRAX is built on a robust technical foundation:\n- **Core Architecture**: Built on LangChain and LangGraph frameworks\n- **Language Model**: Uses GPT-4o with vision capabilities as the backbone LLM\n- **Deployment**: Supports both local and cloud-based deployments\n- **Interface**: Production-ready interface built with Gradio\n- **Modular Design**: Tool-agnostic architecture allowing easy integration of new capabilities\n\n### Integrated Tools\n- **Visual QA**: Utilizes CheXagent and LLaVA-Med for complex visual understanding and medical reasoning\n- **Segmentation**: Employs MedSAM and PSPNet model trained on ChestX-Det for precise anatomical structure identification\n- **Grounding**: Uses Maira-2 for localizing specific findings in medical images\n- **Report Generation**: Implements SwinV2 Transformer trained on CheXpert Plus for detailed medical reporting\n- **Disease Classification**: Leverages DenseNet-121 from TorchXRayVision for detecting 18 pathology classes\n- **X-ray Generation**: Utilizes RoentGen for synthetic CXR generation\n- **Utilities**: Includes DICOM processing, visualization tools, and custom plotting capabilities\n\u003Cbr>\u003Cbr>\n\n\n## ChestAgentBench\nWe introduce ChestAgentBench, a comprehensive evaluation framework with 2,500 complex medical queries across 7 categories, built from 675 expert-curated clinical cases. The benchmark evaluates complex multi-step reasoning in CXR interpretation through:\n\n- Detection\n- Classification\n- Localization\n- Comparison\n- Relationship\n- Diagnosis\n- Characterization\n\nDownload the benchmark: [ChestAgentBench on Hugging Face](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fwanglab\u002Fchest-agent-bench)\n```\nhuggingface-cli download wanglab\u002Fchestagentbench --repo-type dataset --local-dir chestagentbench\n```\n\nUnzip the Eurorad figures to your local `MedMAX` directory.\n```\nunzip chestagentbench\u002Ffigures.zip\n```\n\nTo evaluate with GPT-4o, set your OpenAI API key and run the quickstart script.\n```\nexport OPENAI_API_KEY=\"\u003Cyour-openai-api-key>\"\npython quickstart.py \\\n    --model chatgpt-4o-latest \\\n    --temperature 0.2 \\\n    --max-cases 2 \\\n    --log-prefix chatgpt-4o-latest \\\n    --use-urls\n```\n\n\n\u003Cbr>\n\n## Installation\n### Prerequisites\n- Python 3.8+\n- CUDA\u002FGPU for best performance\n\n### Installation Steps\n```bash\n# Clone the repository\ngit clone https:\u002F\u002Fgithub.com\u002Fbowang-lab\u002FMedRAX.git\ncd MedRAX\n\n# Install package\npip install -e .\n```\n\n### Getting Started\n```bash\n# Start the Gradio interface\npython main.py\n```\nor if you run into permission issues\n```bash\nsudo -E env \"PATH=$PATH\" python main.py\n```\nYou need to setup the `model_dir` inside `main.py` to the directory where you want to download or already have the weights of above tools from Hugging Face.\nComment out the tools that you do not have access to.\nMake sure to setup your OpenAI API key in `.env` file!\n\u003Cbr>\u003Cbr>\u003Cbr>\n\n\n## Tool Selection and Initialization\n\nMedRAX supports selective tool initialization, allowing you to use only the tools you need. Tools can be specified when initializing the agent (look at `main.py`):\n\n```python\nselected_tools = [\n    \"ImageVisualizerTool\",\n    \"ChestXRayClassifierTool\",\n    \"ChestXRaySegmentationTool\",\n    # Add or remove tools as needed\n]\n\nagent, tools_dict = initialize_agent(\n    \"medrax\u002Fdocs\u002Fsystem_prompts.txt\",\n    tools_to_use=selected_tools,\n    model_dir=\"\u002Fmodel-weights\"\n)\n```\n\n\u003Cbr>\u003Cbr>\n## Automatically Downloaded Models\n\nThe following tools will automatically download their model weights when initialized:\n\n### Classification Tool\n```python\nChestXRayClassifierTool(device=device)\n```\n\n### Segmentation Tool\n```python\nChestXRaySegmentationTool(device=device)\n```\n\n### Grounding Tool\n```python\nXRayPhraseGroundingTool(\n    cache_dir=model_dir, \n    temp_dir=temp_dir, \n    load_in_8bit=True, \n    device=device\n)\n```\n- Maira-2 weights download to specified `cache_dir`\n- 8-bit and 4-bit quantization available for reduced memory usage\n\n### LLaVA-Med Tool\n```python\nLlavaMedTool(\n    cache_dir=model_dir, \n    device=device, \n    load_in_8bit=True\n)\n```\n- Automatic weight download to `cache_dir`\n- 8-bit and 4-bit quantization available for reduced memory usage\n\n### Report Generation Tool\n```python\nChestXRayReportGeneratorTool(\n    cache_dir=model_dir, \n    device=device\n)\n```\n\n### Visual QA Tool\n```python\nXRayVQATool(\n    cache_dir=model_dir, \n    device=device\n)\n```\n- CheXagent weights download automatically\n\n### MedSAM Tool\n```\nSupport for MedSAM segmentation will be added in a future update.\n```\n\n### Utility Tools\nNo additional model weights required:\n```python\nImageVisualizerTool()\nDicomProcessorTool(temp_dir=temp_dir)\n```\n\u003Cbr>\n\n## Manual Setup Required\n\n### Image Generation Tool\n```python\nChestXRayGeneratorTool(\n    model_path=f\"{model_dir}\u002Froentgen\", \n    temp_dir=temp_dir, \n    device=device\n)\n```\n- RoentGen weights require manual setup:\n  1. Contact authors: https:\u002F\u002Fgithub.com\u002FStanfordMIMI\u002FRoentGen\n  2. Place weights in `{model_dir}\u002Froentgen`\n  3. Optional tool, can be excluded if not needed\n\u003Cbr>\n\n## Configuration Notes\n\n### Required Parameters\n- `model_dir` or `cache_dir`: Base directory for model weights that Hugging Face uses\n- `temp_dir`: Directory for temporary files\n- `device`: \"cuda\" for GPU, \"cpu\" for CPU-only\n\n### Memory Management\n- Consider selective tool initialization for resource constraints\n- Use 8-bit quantization where available\n- Some tools (LLaVA-Med, Grounding) are more resource-intensive\n\u003Cbr>\n\n### Local LLMs\nIf you are running a local LLM using frameworks like [Ollama](https:\u002F\u002Follama.com\u002F) or [LM Studio](https:\u002F\u002Flmstudio.ai\u002F), you need to configure your environment variables accordingly. For example:\n```\nexport OPENAI_BASE_URL=\"http:\u002F\u002Flocalhost:11434\u002Fv1\"\nexport OPENAI_API_KEY=\"ollama\"\n```\n\u003Cbr>\n\n### Optional: OpenAI-compatible Providers\n\nMedRAX supports OpenAI-compatible APIs, allowing regional or local LLM providers to serve as alternative backends.\n\nFor example, to use **Qwen3-VL** via [Alibaba Cloud DashScope](https:\u002F\u002Fbailian.console.aliyun.com\u002F?tab=model#\u002Fmodel-market), set the following environment variables:\n\n```bash\nexport OPENAI_BASE_URL=\"https:\u002F\u002Fdashscope.aliyuncs.com\u002Fcompatible-mode\u002Fv1\"\nexport OPENAI_API_KEY=\"\u003Cyour-dashscope-api-key>\"\nexport OPENAI_MODEL=\"qwen3-vl-235b-a22b-instruct\"\n```\n\u003Cbr>\n\n## Star History\n\u003Cdiv align=\"center\">\n  \n[![Star History Chart](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbowang-lab_MedRAX_readme_6d62b3672e56.png)](https:\u002F\u002Fstar-history.com\u002F#bowang-lab\u002FMedRAX&Date)\n\n\u003C\u002Fdiv>\n\u003Cbr>\n\n\n## Authors\n- **Adibvafa Fallahpour**¹²³⁴ * (adibvafa.fallahpour@mail.utoronto.ca)\n- ****Jun Ma****²³ *\n- **Alif Munim**³⁵ *\n- ****Hongwei Lyu****³\n- ****Bo Wang****¹²³⁶\n\n¹ Department of Computer Science, University of Toronto, Toronto, Canada \u003Cbr>\n² Vector Institute, Toronto, Canada \u003Cbr>\n³ University Health Network, Toronto, Canada \u003Cbr>\n⁴ Cohere, Toronto, Canada \u003Cbr>\n⁵ Cohere Labs, Toronto, Canada \u003Cbr>\n⁶ Department of Laboratory Medicine and Pathobiology, University of Toronto, Toronto, Canada\n\n\u003Cbr>\n* Equal contribution\n\u003Cbr>\u003Cbr>\n\n\n## Citation\nIf you find this work useful, please cite our paper:\n```bibtex\n@misc{fallahpour2025medraxmedicalreasoningagent,\n      title={MedRAX: Medical Reasoning Agent for Chest X-ray}, \n      author={Adibvafa Fallahpour and Jun Ma and Alif Munim and Hongwei Lyu and Bo Wang},\n      year={2025},\n      eprint={2502.02673},\n      archivePrefix={arXiv},\n      primaryClass={cs.LG},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2502.02673}, \n}\n```\n\n---\n\u003Cp align=\"center\">\nMade with ❤️ at University of Toronto, Vector Institute, and University Health Network\n\u003C\u002Fp>\n","\u003Ch1 align=\"center\">\n🤖 MedRAX：用于胸部X光片的医学推理代理\n\u003C\u002Fh1>\n\u003Cp align=\"center\"> \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2502.02673\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-ICML 2025-FF6B6B?style=for-the-badge&logo=arxiv&logoColor=white\" alt=\"arXiv\">\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fbowang-lab\u002FMedRAX\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGitHub-Code-4A90E2?style=for-the-badge&logo=github&logoColor=white\" alt=\"GitHub\">\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fwanglab\u002Fchest-agent-bench\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHuggingFace-Dataset-FFBF00?style=for-the-badge&logo=huggingface&logoColor=white\" alt=\"HuggingFace Dataset\">\u003C\u002Fa> \u003C\u002Fp>\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbowang-lab_MedRAX_readme_495654477f38.gif)\n\n\u003Cbr>\n\n## 摘要\n胸部X光片（CXR）在疾病管理和患者护理中的关键决策中发挥着不可或缺的作用。尽管近年来涌现出针对各种CXO解读任务的专用模型，但这些解决方案往往彼此孤立，限制了其在临床实践中的实际效用。我们提出了MedRAX，这是首个将最先进的CXO分析工具和多模态大型语言模型无缝集成到统一框架中的多功能AI代理。MedRAX能够动态地利用这些模型来解决复杂的医疗问题，而无需额外的训练。为了严格评估其能力，我们推出了ChestAgentBench，一个包含7个不同类别共2,500个复杂医疗问题的综合基准测试。实验结果表明，与开源和专有模型相比，MedRAX达到了最先进的性能，这标志着自动化CXO解读系统向实际部署迈出了重要一步。\n\u003Cbr>\u003Cbr>\n\n\n## MedRAX\nMedRAX建立在坚实的技术基础上：\n- **核心架构**：基于LangChain和LangGraph框架构建\n- **语言模型**：以具备视觉能力的GPT-4o作为骨干LLM\n- **部署方式**：支持本地和云端部署\n- **界面**：使用Gradio构建的生产就绪界面\n- **模块化设计**：工具无关的架构，便于集成新功能\n\n### 集成工具\n- **视觉问答**：采用CheXagent和LLaVA-Med进行复杂的视觉理解和医学推理\n- **分割**：使用MedSAM和基于ChestX-Det数据集训练的PSPNet模型，实现精确的解剖结构识别\n- **定位**：借助Maira-2在医学图像中精确定位特定发现\n- **报告生成**：实施基于CheXpert Plus数据集训练的SwinV2 Transformer，用于生成详细的医学报告\n- **疾病分类**：利用TorchXRayVision中的DenseNet-121检测18种病理类型\n- **X光片生成**：使用RoentGen进行合成CXO生成\n- **实用工具**：包括DICOM处理、可视化工具以及自定义绘图功能\n\u003Cbr>\u003Cbr>\n\n\n## ChestAgentBench\n我们推出了ChestAgentBench，这是一个包含7个类别共2,500个复杂医疗问题的综合评估框架，基于675例专家精选的临床病例构建而成。该基准测试通过以下方面评估CXO解读中的复杂多步推理：\n\n- 检测\n- 分类\n- 定位\n- 比较\n- 关系\n- 诊断\n- 特征描述\n\n下载基准测试：[ChestAgentBench on Hugging Face](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fwanglab\u002Fchest-agent-bench)\n```\nhuggingface-cli download wanglab\u002Fchestagentbench --repo-type dataset --local-dir chestagentbench\n```\n\n将Eurorad图片解压到本地`MedMAX`目录。\n```\nunzip chestagentbench\u002Ffigures.zip\n```\n\n若使用GPT-4o进行评估，请设置您的OpenAI API密钥并运行快速入门脚本。\n```\nexport OPENAI_API_KEY=\"\u003Cyour-openai-api-key>\"\npython quickstart.py \\\n    --model chatgpt-4o-latest \\\n    --temperature 0.2 \\\n    --max-cases 2 \\\n    --log-prefix chatgpt-4o-latest \\\n    --use-urls\n```\n\n\n\u003Cbr>\n\n## 安装\n### 前置条件\n- Python 3.8及以上版本\n- 为获得最佳性能，建议使用CUDA\u002FGPU\n\n### 安装步骤\n```bash\n# 克隆仓库\ngit clone https:\u002F\u002Fgithub.com\u002Fbowang-lab\u002FMedRAX.git\ncd MedRAX\n\n# 安装包\npip install -e .\n```\n\n### 开始使用\n```bash\n# 启动Gradio界面\npython main.py\n```\n或者如果遇到权限问题\n```bash\nsudo -E env \"PATH=$PATH\" python main.py\n```\n您需要在`main.py`中设置`model_dir`，指向您希望下载或已有的上述工具的Hugging Face权重目录。\n请注释掉您无法访问的工具。\n务必在`.env`文件中设置您的OpenAI API密钥！\n\u003Cbr>\u003Cbr>\u003Cbr>\n\n\n## 工具选择与初始化\n\nMedRAX支持选择性工具初始化，允许您仅使用所需的工具。工具可以在初始化代理时指定（参见`main.py`）：\n\n```python\nselected_tools = [\n    \"ImageVisualizerTool\",\n    \"ChestXRayClassifierTool\",\n    \"ChestXRaySegmentationTool\",\n    # 根据需要添加或移除工具\n]\n\nagent, tools_dict = initialize_agent(\n    \"medrax\u002Fdocs\u002Fsystem_prompts.txt\",\n    tools_to_use=selected_tools,\n    model_dir=\"\u002Fmodel-weights\"\n)\n```\n\n\u003Cbr>\u003Cbr>\n## 自动下载的模型\n\n以下工具在初始化时会自动下载其模型权重：\n\n### 分类工具\n```python\nChestXRayClassifierTool(device=device)\n```\n\n### 分割工具\n```python\nChestXRaySegmentationTool(device=device)\n```\n\n### 定位工具\n```python\nXRayPhraseGroundingTool(\n    cache_dir=model_dir, \n    temp_dir=temp_dir, \n    load_in_8bit=True, \n    device=device\n)\n```\n- Maira-2权重会下载到指定的`cache_dir`\n- 提供8位和4位量化选项，以减少内存占用\n\n### LLaVA-Med工具\n```python\nLlavaMedTool(\n    cache_dir=model_dir, \n    device=device, \n    load_in_8bit=True\n)\n```\n- 自动下载权重至`cache_dir`\n- 提供8位和4位量化选项，以减少内存占用\n\n### 报告生成工具\n```python\nChestXRayReportGeneratorTool(\n    cache_dir=model_dir, \n    device=device\n)\n```\n\n### 视觉问答工具\n```python\nXRayVQATool(\n    cache_dir=model_dir, \n    device=device\n)\n```\n- CheXagent权重会自动下载\n\n### MedSAM工具\n```\nMedSAM分割功能将在未来的更新中加入。\n```\n\n### 实用工具\n无需额外的模型权重：\n```python\nImageVisualizerTool()\nDicomProcessorTool(temp_dir=temp_dir)\n```\n\u003Cbr>\n\n## 需要手动设置的工具\n\n### 图像生成工具\n```python\nChestXRayGeneratorTool(\n    model_path=f\"{model_dir}\u002Froentgen\", \n    temp_dir=temp_dir, \n    device=device\n)\n```\n- RoentGen权重需要手动设置：\n  1. 联系作者：https:\u002F\u002Fgithub.com\u002FStanfordMIMI\u002FRoentGen\n  2. 将权重放置在`{model_dir}\u002Froentgen`\n  3. 该工具为可选，如不需要可将其排除\n\u003Cbr>\n\n## 配置注意事项\n\n### 必需参数\n- `model_dir`或`cache_dir`：Hugging Face使用的模型权重基础目录\n- `temp_dir`：临时文件目录\n- `device`：“cuda”表示使用GPU，“cpu”表示仅使用CPU\n\n### 内存管理\n- 针对资源限制，考虑选择性地初始化工具\n- 在可用的情况下使用8位量化\n- 某些工具（LLaVA-Med、Grounding）对资源的需求较高\n\u003Cbr>\n\n### 本地大模型\n如果您正在使用如[Ollama](https:\u002F\u002Follama.com\u002F)或[LM Studio](https:\u002F\u002Flmstudio.ai\u002F)等框架运行本地大模型，则需要相应地配置环境变量。例如：\n```\nexport OPENAI_BASE_URL=\"http:\u002F\u002Flocalhost:11434\u002Fv1\"\nexport OPENAI_API_KEY=\"ollama\"\n```\n\u003Cbr>\n\n### 可选：兼容OpenAI的提供商\n\nMedRAX支持兼容OpenAI的API，允许区域或本地的大模型提供商作为替代后端。\n\n例如，要通过[阿里云DashScope](https:\u002F\u002Fbailian.console.aliyun.com\u002F?tab=model#\u002Fmodel-market)使用**Qwen3-VL**，请设置以下环境变量：\n\n```bash\nexport OPENAI_BASE_URL=\"https:\u002F\u002Fdashscope.aliyuncs.com\u002Fcompatible-mode\u002Fv1\"\nexport OPENAI_API_KEY=\"\u003C您的DashScope API密钥>\"\nexport OPENAI_MODEL=\"qwen3-vl-235b-a22b-instruct\"\n```\n\u003Cbr>\n\n## 星标历史\n\u003Cdiv align=\"center\">\n  \n[![星标历史图表](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbowang-lab_MedRAX_readme_6d62b3672e56.png)](https:\u002F\u002Fstar-history.com\u002F#bowang-lab\u002FMedRAX&Date)\n\n\u003C\u002Fdiv>\n\u003Cbr>\n\n\n## 作者\n- **Adibvafa Fallahpour**¹²³⁴ * (adibvafa.fallahpour@mail.utoronto.ca)\n- ****Jun Ma****²³ *\n- **Alif Munim**³⁵ *\n- ****Hongwei Lyu****³\n- ****Bo Wang****¹²³⁶\n\n¹ 多伦多大学计算机科学系，加拿大多伦多市 \u003Cbr>\n² Vector Institute，加拿大多伦多市 \u003Cbr>\n³ 多伦多大学健康网络，加拿大多伦多市 \u003Cbr>\n⁴ Cohere，加拿大多伦多市 \u003Cbr>\n⁵ Cohere Labs，加拿大多伦多市 \u003Cbr>\n⁶ 多伦多大学检验医学与病理生物学系，加拿大多伦多市\n\n\u003Cbr>\n* 共同贡献\n\u003Cbr>\u003Cbr>\n\n\n## 引用\n如果您觉得这项工作有用，请引用我们的论文：\n```bibtex\n@misc{fallahpour2025medraxmedicalreasoningagent,\n      title={MedRAX：用于胸部X光片的医学推理代理}, \n      author={Adibvafa Fallahpour、Jun Ma、Alif Munim、Hongwei Lyu和Bo Wang},\n      year={2025},\n      eprint={2502.02673},\n      archivePrefix={arXiv},\n      primaryClass={cs.LG},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2502.02673}, \n}\n```\n\n---\n\u003Cp align=\"center\">\n由多伦多大学、Vector Institute和多伦多大学健康网络倾情打造\n\u003C\u002Fp>","# MedRAX 快速上手指南\n\nMedRAX 是一个专为胸部 X 光（CXR）设计的医疗推理智能体，集成了多种先进的医学影像分析工具和多模态大语言模型，无需额外训练即可处理复杂的医疗查询。\n\n## 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **操作系统**: Linux \u002F macOS \u002F Windows (推荐 Linux)\n*   **Python 版本**: 3.8 或更高\n*   **硬件加速**: 强烈建议配备 NVIDIA GPU 并安装 CUDA，以获得最佳性能（部分模型显存需求较高）。\n*   **API 密钥**: \n    *   默认使用 **OpenAI API** (GPT-4o)，需准备 `OPENAI_API_KEY`。\n    *   支持国内兼容接口（如阿里云 DashScope\u002FQwen），需准备对应的 `OPENAI_BASE_URL` 和 `API_KEY`。\n\n## 安装步骤\n\n### 1. 克隆仓库\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fbowang-lab\u002FMedRAX.git\ncd MedRAX\n```\n\n### 2. 安装依赖\n建议使用虚拟环境进行安装。\n```bash\npip install -e .\n```\n> **提示**：如果下载速度较慢，可添加国内镜像源加速：\n> `pip install -e . -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`\n\n### 3. 配置环境变量\n在项目根目录创建 `.env` 文件，或直接导出环境变量。\n\n**方案 A：使用 OpenAI 官方接口**\n```bash\nexport OPENAI_API_KEY=\"\u003Cyour-openai-api-key>\"\n```\n\n**方案 B：使用国内兼容接口（例如阿里云 Qwen-VL）**\n```bash\nexport OPENAI_BASE_URL=\"https:\u002F\u002Fdashscope.aliyuncs.com\u002Fcompatible-mode\u002Fv1\"\nexport OPENAI_API_KEY=\"\u003Cyour-dashscope-api-key>\"\nexport OPENAI_MODEL=\"qwen3-vl-235b-a22b-instruct\"\n```\n\n### 4. 模型权重准备\n首次运行时，大部分工具（如 CheXagent, LLaVA-Med, MedSAM 等）会自动从 Hugging Face 下载权重到指定目录。\n*   若网络受限，建议手动下载权重并放置于本地目录，然后在代码中配置 `model_dir`。\n*   **RoentGen (X 光生成工具)** 需要手动申请并放置权重（可选，非核心功能可忽略）。\n\n## 基本使用\n\n### 方式一：启动 Web 界面 (推荐)\nMedRAX 内置了基于 Gradio 的生产级交互界面。\n\n```bash\npython main.py\n```\n\n> **注意**：\n> 1. 运行前请编辑 `main.py`，将 `model_dir` 参数修改为您存放模型权重的本地路径。\n> 2. 如果不需要某些工具（例如没有权限或显存不足），请在 `main.py` 中注释掉对应的工具初始化代码。\n> 3. 若遇到权限问题，可尝试：`sudo -E env \"PATH=$PATH\" python main.py`\n\n启动后，终端会显示本地访问地址（通常为 `http:\u002F\u002F127.0.0.1:7860`），在浏览器打开即可上传 X 光片并进行对话。\n\n### 方式二：代码调用 (自定义工具链)\n您也可以在 Python 脚本中灵活选择需要的工具进行初始化：\n\n```python\nfrom medrax.agent import initialize_agent\n\n# 选择需要的工具\nselected_tools = [\n    \"ImageVisualizerTool\",\n    \"ChestXRayClassifierTool\",\n    \"ChestXRaySegmentationTool\",\n]\n\n# 初始化智能体\nagent, tools_dict = initialize_agent(\n    \"medrax\u002Fdocs\u002Fsystem_prompts.txt\",\n    tools_to_use=selected_tools,\n    model_dir=\"\u002Fpath\u002Fto\u002Fyour\u002Fmodel-weights\" # 替换为实际路径\n)\n\n# 此处可继续添加推理逻辑\n```\n\n### 方式三：基准测试评估\n如果您想使用 `ChestAgentBench` 数据集评估模型效果：\n\n1. 下载数据集：\n```bash\nhuggingface-cli download wanglab\u002Fchestagentbench --repo-type dataset --local-dir chestagentbench\nunzip chestagentbench\u002Ffigures.zip\n```\n\n2. 运行评估脚本：\n```bash\nexport OPENAI_API_KEY=\"\u003Cyour-openai-api-key>\"\npython quickstart.py \\\n    --model chatgpt-4o-latest \\\n    --temperature 0.2 \\\n    --max-cases 2 \\\n    --log-prefix chatgpt-4o-latest \\\n    --use-urls\n```","在繁忙的三甲医院放射科，主治医师需要在短时间内对大量胸部 X 光片进行精准判读并生成结构化报告，以支持急诊患者的快速分流。\n\n### 没有 MedRAX 时\n- **工具割裂效率低**：医生需分别在疾病分类模型、分割软件和报告生成系统中切换操作，无法在一个界面完成从“发现病灶”到“出具结论”的全流程。\n- **复杂推理能力弱**：面对需要对比历史影像或分析多病灶关联的复杂病例，单一模型往往只能提供碎片化信息，缺乏连贯的逻辑推导。\n- **定位与描述脱节**：自动生成的报告常出现“文不对图”的情况，即文字描述了肺炎，但未能在图像上精确圈出具体感染区域，增加复核负担。\n- **人工复核成本高**：由于缺乏统一的智能代理辅助，资深医生必须花费大量时间手动整合各工具输出结果，极易因疲劳导致漏诊。\n\n### 使用 MedRAX 后\n- **一站式智能闭环**：MedRAX 将视觉问答、解剖结构分割及报告生成等工具无缝集成，医生上传影像后即可自动获得包含定位、分类及完整建议的综合分析。\n- **动态多步推理**：依托 GPT-4o 强大的逻辑能力，MedRAX 能自主调用不同专家模型，像人类专家一样逐步分析病灶间的因果关系及演变趋势。\n- **图文精准对齐**：通过内置的接地（Grounding）技术，MedRAX 生成的报告中每一处诊断结论都能直接在原图上高亮显示对应区域，实现“所见即所得”。\n- **无需训练即刻部署**：医院无需针对特定病种重新训练模型，MedRAX 即可利用现有开源工具链动态解决各类罕见或复杂查询，显著降低落地门槛。\n\nMedRAX 通过构建统一的医疗推理代理，将分散的 AI 能力转化为临床可信赖的决策伙伴，大幅提升了胸部 X 光判读的准确性与工作效率。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbowang-lab_MedRAX_527e066d.png","bowang-lab","WangLab @ U of T","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fbowang-lab_d2da081a.jpg","BoWang's Lab at University of Toronto",null,"https:\u002F\u002Fgithub.com\u002Fbowang-lab",[81,85],{"name":82,"color":83,"percentage":84},"Python","#3572A5",95.7,{"name":86,"color":87,"percentage":88},"Jupyter Notebook","#DA5B0B",4.3,1129,198,"2026-04-16T16:46:50","Apache-2.0",4,"未说明","推荐 NVIDIA GPU (CUDA)，支持 8-bit\u002F4-bit 量化以降低显存需求；部分工具（如 LLaVA-Med, Grounding）资源消耗较大",{"notes":97,"python":98,"dependencies":99},"核心大语言模型默认使用 GPT-4o（需配置 OpenAI API Key），但也支持通过环境变量配置本地 LLM（如 Ollama）或兼容 API（如阿里云 DashScope\u002FQwen）。多个医疗专用模型（如 CheXagent, MedSAM, RoentGen 等）会在首次运行时自动从 Hugging Face 下载权重，需确保网络连接畅通；其中 RoentGen 模型需手动联系作者获取权重。可通过选择性初始化工具来优化资源占用。","3.8+",[100,101,102,103,104,105],"LangChain","LangGraph","Gradio","torch","transformers","accelerate",[14,13],[108,109,110,111,112,113,114,115,116,117],"agent","agentic-ai","agentic-framework","chest-xrays","healthcare","langchain","medical-imaging","chest-xray","medical","reasoning-agent","2026-03-27T02:49:30.150509","2026-04-18T14:25:46.005858",[121,126,131,136,141,146,151],{"id":122,"question_zh":123,"answer_zh":124,"source_url":125},39933,"安装时遇到 'Failed to build pygraphviz' 错误怎么办？","该依赖包仅用于可视化代理图，并非 MedRAX 核心功能所必需。维护者已移除该依赖。请拉取主分支（main）的最新代码并重新安装即可解决：\ngit pull origin main\npip install -e .","https:\u002F\u002Fgithub.com\u002Fbowang-lab\u002FMedRAX\u002Fissues\u002F11",{"id":127,"question_zh":128,"answer_zh":129,"source_url":130},39934,"在 macOS (M2) 上安装失败，提示找不到 'gdcm' 包怎么办？","这是由于 macOS 上 `gdcm` 包的兼容性问题导致的。如果您不需要处理 DICOM 文件，可以直接从 `pyproject.toml` 文件中移除 `gdcm` 依赖项，然后重试安装命令。","https:\u002F\u002Fgithub.com\u002Fbowang-lab\u002FMedRAX\u002Fissues\u002F48",{"id":132,"question_zh":133,"answer_zh":134,"source_url":135},39935,"如何运行 MedRAX 的基准测试（Benchmarks）？找不到 questions 文件夹。","代码库中的 `experiments` 文件夹使用的是旧版数据集结构。建议直接从 Hugging Face 下载最新的基准测试数据集，并使用 `quickstart.py` 文件作为运行基准测试的起点。具体指令请参考 README 中的 ChestAgentBench 部分：\nhttps:\u002F\u002Fgithub.com\u002Fbowang-lab\u002FMedRAX?tab=readme-ov-file#chestagentbench","https:\u002F\u002Fgithub.com\u002Fbowang-lab\u002FMedRAX\u002Fissues\u002F18",{"id":137,"question_zh":138,"answer_zh":139,"source_url":140},39936,"MedRAX 的基准测试数据使用什么许可证？","基准测试数据与代码一样，均采用 Apache 2.0 许可证。","https:\u002F\u002Fgithub.com\u002Fbowang-lab\u002FMedRAX\u002Fissues\u002F50",{"id":142,"question_zh":143,"answer_zh":144,"source_url":145},39937,"项目是否支持或计划集成 MedSAM 模型？","当前版本主要关注其他功能，但团队正在开发 MedRAX2，其中将包含对 MedSAM2 的集成。您可以关注 MedRAX2 仓库以获取最新进展和集成示例：\nhttps:\u002F\u002Fgithub.com\u002Fbowang-lab\u002FMedRAX2","https:\u002F\u002Fgithub.com\u002Fbowang-lab\u002FMedRAX\u002Fissues\u002F2",{"id":147,"question_zh":148,"answer_zh":149,"source_url":150},39938,"遇到 numpy 版本冲突导致的环境配置错误如何解决？","这通常是因为安装了过新版本的 numpy（如 2.3+），导致与 scipy、opencv-python 等依赖包不兼容。建议创建一个干净的虚拟环境，并强制安装兼容版本的 numpy（例如 \u003C2.3.0）：\npip install \"numpy\u003C2.3\"\n或者在安装 medrax 之前指定 numpy 版本。","https:\u002F\u002Fgithub.com\u002Fbowang-lab\u002FMedRAX\u002Fissues\u002F47",{"id":152,"question_zh":153,"answer_zh":154,"source_url":155},39939,"MedRAX 可以用于实际的临床医疗诊断吗？","不可以。官方明确声明：不建议使用 MedRAX 获取医疗建议。该工具仅作为研究原型（research prototype）开发，其输出结果不能替代专业医生的诊断。","https:\u002F\u002Fgithub.com\u002Fbowang-lab\u002FMedRAX\u002Fissues\u002F5",[]]