[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-ImprintLab--Medical-SAM-Adapter":3,"tool-ImprintLab--Medical-SAM-Adapter":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},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,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},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 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":79,"owner_email":79,"owner_twitter":79,"owner_website":79,"owner_url":80,"languages":81,"stars":94,"forks":95,"last_commit_at":96,"license":97,"difficulty_score":10,"env_os":98,"env_gpu":99,"env_ram":98,"env_deps":100,"category_tags":108,"github_topics":109,"view_count":10,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":115,"updated_at":116,"faqs":117,"releases":153},382,"ImprintLab\u002FMedical-SAM-Adapter","Medical-SAM-Adapter","A lightweight adapter bridges SAM with medical imaging [MedIA]","Medical-SAM-Adapter 是一款专为医学影像分析设计的开源项目，它将强大的 Segment Anything Model（SAM）成功迁移至医疗领域。通过引入轻量级适配器（Adapter）和 LoRA 技术，Medical-SAM-Adapter 无需从头训练庞大的基础模型，即可让 SAM 精准分割 CT、MRI 等医学图像中的器官或病变区域。\n\n这一方案有效解决了通用视觉模型在专业医疗场景下表现不佳的问题，大幅降低了医疗 AI 开发的门槛与计算成本。Medical-SAM-Adapter 非常适合从事医学图像处理的研究人员及开发者使用。\n\n其技术亮点丰富：不仅提供了涵盖多种器官的预训练模型库（Medical-Adapter Zoo），还集成了 EfficientSAM 和 MobileSAM 等高效架构，显著提升了推理速度。此外，Medical-SAM-Adapter 持续更新，已支持多类别分割及多种主流数据集加载，并配有详细的代码指南。活跃的 Discord 社区也为用户提供了良好的交流环境，是探索医疗图像分割技术的理想起点。","\u003Ch1 align=\"center\">● Medical SAM Adapter\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FDN4rvk95CC\">\n        \u003Cimg alt=\"Discord\" src=\"https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1146610656779440188?logo=discord&style=flat&logoColor=white\"\u002F>\u003C\u002Fa>\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fstatic\u002Fv1?label=license&message=GPL&color=white&style=flat\" alt=\"License\"\u002F>\n\u003C\u002Fp>\n\nMedical SAM Adapter, or say MSA, is a project to fineturn [SAM](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fsegment-anything) using [Adaption](https:\u002F\u002Flightning.ai\u002Fpages\u002Fcommunity\u002Ftutorial\u002Flora-llm\u002F) for the Medical Imaging.\nThis method is elaborated on the paper [Medical SAM Adapter: Adapting Segment Anything Model for Medical Image Segmentation](https:\u002F\u002Farxiv.org\u002Fabs\u002F2304.12620).\n\n## A Quick Overview \n \u003Cimg width=\"880\" height=\"380\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FImprintLab_Medical-SAM-Adapter_readme_123550b16926.jpeg\">\n\n ## News\n - [TOP] Join in our [Discord](https:\u002F\u002Fdiscord.gg\u002FEqbgSPEX) to ask questions and discuss with others.\n - [TOP] 24-03-02 We have released our pre-trained Adapters in [Medical-Adapter-Zoo](https:\u002F\u002Fhuggingface.co\u002FKidsWithTokens\u002FMedical-Adapter-Zoo\u002Ftree\u002Fmain). Try it without painful training 😉 Credit: @shinning0821\n - 23-05-10. This project is still quickly updating 🌝. Check TODO list to see what will be released next.\n - 23-05-11. GitHub Dicussion opened. You guys can now talk, code and make friends on the playground 👨‍❤️‍👨. \n - 23-12-22. Released data loader and example case on [REFUGE](https:\u002F\u002Frefuge.grand-challenge.org\u002F) dataset. Credit: @jiayuanz3\n - 24-01-04. Released the Efficient Med-SAM-Adapter❗️ A new, faster, and more lightweight version incorporates Meta [EfficientSAM](https:\u002F\u002Fyformer.github.io\u002Fefficient-sam\u002F)🏇. Full credit goes to @shinning0821. \n - 24-01-07. The image resolution now can be resized by ``-image_size``. Credit: @shinning0821\n - 24-01-11. Added a detailed guide on utilizing the Efficient Med-SAM-Adapter, complete with a comparison of performance and speed. You can find this resource in  [guidance\u002Fefficient_sam.ipynb](.\u002Fguidance\u002Fefficient_sam.ipynb). Credit: @shinning0821\n - 24-01-14. We've just launched our first official version, v0.1.0-alpha 🥳. This release includes support for [MobileSAM](https:\u002F\u002Fgithub.com\u002FChaoningZhang\u002FMobileSAM), which can be activated by setting ``-net mobile_sam``. Additionally, you now have the flexibility to use ViT, Tiny ViT, and Efficient ViT as encoders. Check the details [here](https:\u002F\u002Fgithub.com\u002FKidsWithTokens\u002FMedical-SAM-Adapter\u002Freleases\u002Ftag\u002Fv0.1.0-alpha). Credit: @shinning0821\n - 24-01-20. Added a guide on utilizing the mobile sam in Med-SAM-Adapter, with a comparison of performance and speed. You can find it in [guidance\u002Fmobile_sam.ipynb](https:\u002F\u002Fgithub.com\u002FKidsWithTokens\u002FMedical-SAM-Adapter\u002Fblob\u002Fmain\u002Fguidance\u002Fmobile_sam.ipynb) Credit: @shinning0821\n - 24-01-21. We've added [LoRA](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fdiffusers\u002Ftraining\u002Flora) to our framework🤖. Use it by setting ``-mod`` as ``sam_lora``.\nA guidance can be found in [here](https:\u002F\u002Fgithub.com\u002FKidsWithTokens\u002FMedical-SAM-Adapter\u002Fblob\u002Fmain\u002Fguidance\u002Flora.ipynb). Credit: @shinning0821\n - 24-01-22. We've added dataloader for [LIDC dataset](https:\u002F\u002Fpaperswithcode.com\u002Fdataset\u002Flidc-idri), a multi-rater(4 raters 👨‍⚕️🧑🏽‍⚕️👩‍⚕️🧑🏽‍⚕️) lesions segmentation from low-dose lung CTs 🩻. You can download the preprocessed LIDC dataset at [here](https:\u002F\u002Fgithub.com\u002Fstefanknegt\u002FProbabilistic-Unet-Pytorch). Also updated environment, and random_click function. Credit: @jiayuanz3\n - 24-03-06. We've supported multi-class segmentation. Use it by setting ``-multimask_output`` to the number of classes favored. Also updated REFUGE example to two classes (optic disc & cup). Credit: @LJQCN101\n - 24-03-06. We've supported many other datasets and rebuild the code of datasets and dataloaders. Seen in `guidance\u002FDataset.md` Credit: @shinning0821\n\n## Medical Adapter Zoo 🐘🐊🦍🦒🦨🦜🦥\nWe've released a bunch of pre-trained Adapters for various organs\u002Flesions in [Medical-Adapter-Zoo](https:\u002F\u002Fhuggingface.co\u002FKidsWithTokens\u002FMedical-Adapter-Zoo\u002Ftree\u002Fmain). Just pick the adapter that matches your disease and easily adjust SAM to suit your specific needs 😉. \n\nIf you can't find what you're looking for. Please suggest it through any contact method available to us (GitHub issue, HuggingFace community, or [Discord](https:\u002F\u002Fdiscord.gg\u002FEqbgSPEX)). We'll do our very best to include it.\n \n ## Requirement\n\n Install the environment:\n\n ``conda env create -f environment.yml``\n\n ``conda activate sam_adapt``\n\n Then download [SAM checkpoint](https:\u002F\u002Fdl.fbaipublicfiles.com\u002Fsegment_anything\u002Fsam_vit_b_01ec64.pth), and put it at .\u002Fcheckpoint\u002Fsam\u002F\n\n You can run:\n\n ``wget https:\u002F\u002Fdl.fbaipublicfiles.com\u002Fsegment_anything\u002Fsam_vit_b_01ec64.pth``\n\n ``mv sam_vit_b_01ec64.pth .\u002Fcheckpoint\u002Fsam``\n creat the folder if it does not exist\n\n ## Example Cases\n\n ### Melanoma Segmentation from Skin Images (2D)\n\n 1. Download ISIC dataset part 1 from https:\u002F\u002Fchallenge.isic-archive.com\u002Fdata\u002F. Then put the csv files in \".\u002Fdata\u002Fisic\" under your data path. Your dataset folder under \"your_data_path\" should be like:\nISIC\u002F\n     ISBI2016_ISIC_Part1_Test_Data\u002F...\n     \n     ISBI2016_ISIC_Part1_Training_Data\u002F...\n     \n     ISBI2016_ISIC_Part1_Test_GroundTruth.csv\n     \n      ISBI2016_ISIC_Part1_Training_GroundTruth.csv\n    \n    You can fine the csv files [here](https:\u002F\u002Fgithub.com\u002FKidsWithTokens\u002FMedSegDiff\u002Ftree\u002Fmaster\u002Fdata\u002Fisic_csv)\n\n 3. Begin Adapting! run: ``python train.py -net sam -mod sam_adpt -exp_name *msa_test_isic* -sam_ckpt .\u002Fcheckpoint\u002Fsam\u002Fsam_vit_b_01ec64.pth -image_size 1024 -b 32 -dataset isic -data_path *..\u002Fdata*``\n change \"data_path\" and \"exp_name\" for your own useage. you can change \"exp_name\" to anything you want.\n\n You can descrease the ``image size`` or batch size ``b`` if out of memory.\n\n 3. Evaluation: The code can automatically evaluate the model on the test set during traing, set \"--val_freq\" to control how many epoches you want to evaluate once. You can also run val.py for the independent evaluation.\n\n 4. Result Visualization: You can set \"--vis\" parameter to control how many epoches you want to see the results in the training or evaluation process.\n\n In default, everything will be saved at `` .\u002Flogs\u002F`` \n\n ### REFUGE: Optic-disc Segmentation from Fundus Images (2D) \n [REFUGE](https:\u002F\u002Frefuge.grand-challenge.org\u002F) dataset contains 1200 fundus images with optic disc\u002Fcup segmentations and clinical glaucoma labels. \n\n 1. Dowaload the dataset manually from [here](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Frealslimman\u002FREFUGE-MultiRater\u002Ftree\u002Fmain), or using command lines:\n\n ``git lfs install``\n\n ``git clone git@hf.co:datasets\u002Frealslimman\u002FREFUGE-MultiRater``\n\n unzip and put the dataset to the target folder\n\n ``unzip .\u002FREFUGE-MultiRater.zip``\n\n ``mv REFUGE-MultiRater .\u002Fdata``\n\n 2. For training the adapter, run: ``python train.py -net sam -mod sam_adpt -exp_name REFUGE-MSAdapt -sam_ckpt .\u002Fcheckpoint\u002Fsam\u002Fsam_vit_b_01ec64.pth -image_size 1024 -b 32 -dataset REFUGE -data_path .\u002Fdata\u002FREFUGE-MultiRater``\n you can change \"exp_name\" to anything you want.\n\n You can descrease the ``image size`` or batch size ``b`` if out of memory.\n\n ### Abdominal Multiple Organs Segmentation (3D)\n\n This tutorial demonstrates how MSA can adapt SAM to 3D multi-organ segmentation task using the BTCV challenge dataset.\nFor BTCV dataset, under Institutional Review Board (IRB) supervision, 50 abdomen CT scans of were randomly selected from a combination of an ongoing colorectal cancer chemotherapy trial, and a retrospective ventral hernia study. The 50 scans were captured during portal venous contrast phase with variable volume sizes (512 x 512 x 85 - 512 x 512 x 198) and field of views (approx. 280 x 280 x 280 mm3 - 500 x 500 x 650 mm3). The in-plane resolution varies from 0.54 x 0.54 mm2 to 0.98 x 0.98 mm2, while the slice thickness ranges from 2.5 mm to 5.0 mm.\nTarget: 13 abdominal organs including\nSpleen\nRight Kidney\nLeft Kidney\nGallbladder\nEsophagus\nLiver\nStomach\nAorta\nIVC\nPortal and Splenic Veins\nPancreas\nRight adrenal gland\nLeft adrenal gland.\nModality: CT\nSize: 30 3D volumes (24 Training + 6 Testing)\nChallenge: BTCV MICCAI Challenge\nThe following figure shows image patches with the organ sub-regions that are annotated in the CT (top left) and the final labels for the whole dataset (right).\n1. Prepare BTCV dataset following [MONAI](https:\u002F\u002Fdocs.monai.io\u002Fen\u002Fstable\u002Findex.html) instruction:\nDownload BTCV dataset from: https:\u002F\u002Fwww.synapse.org\u002F#!Synapse:syn3193805\u002Fwiki\u002F217752. After you open the link, navigate to the \"Files\" tab, then download Abdomen\u002FRawData.zip.\nAfter downloading the zip file, unzip. Then put images from RawData\u002FTraining\u002Fimg in ..\u002Fdata\u002FimagesTr, and put labels from RawData\u002FTraining\u002Flabel in ..\u002Fdata\u002FlabelsTr.\nDownload the json file for data splits from this [link](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1qcGh41p-rI3H_sQ0JwOAhNiQSXriQqGi\u002Fview). Place the JSON file at ..\u002Fdata\u002Fdataset_0.json.\n2. For the Adaptation, run: ``python train.py -net sam -mod sam_adpt -exp_name msa-3d-sam-btcv -sam_ckpt .\u002Fcheckpoint\u002Fsam\u002Fsam_vit_b_01ec64.pth -image_size 1024 -b 8 -dataset decathlon -thd True -chunk 96 -data_path ..\u002Fdata -num_sample 4``  \nYou can modify following parameters to save the memory usage: '-b' the batch size, '-chunk' the 3D depth (channel) for each sample, '-num_sample' number of samples for [Monai.RandCropByPosNegLabeld](https:\u002F\u002Fdocs.monai.io\u002Fen\u002Fstable\u002Ftransforms.html#randcropbyposneglabeld), 'evl_chunk' the 3D channel split step in the evaluation, decrease it if out of memory in the evaluation. \n## Run on  your own dataset\nIt is simple to run MSA on the other datasets. Just write another dataset class following which in `` .\u002Fdataset.py``. You only need to make sure you return a dict with \n     {\n                 'image': A tensor saving images with size [C,H,W] for 2D image, size [C, H, W, D] for 3D data.\n                 D is the depth of 3D volume, C is the channel of a scan\u002Fframe, which is commonly 1 for CT, MRI, US data. \n                 If processing, say like a colorful surgical video, D could the number of time frames, and C will be 3 for a RGB frame.\n                 'label': The target masks. Same size with the images except the resolutions (H and W).\n                 'p_label': The prompt label to decide positive\u002Fnegative prompt. To simplify, you can always set 1 if don't need the negative prompt function.\n                 'pt': The prompt. Should be the same as that in SAM, e.g., a click prompt should be [x of click, y of click], one click for each scan\u002Fframe if using 3d data.\n                 'image_meta_dict': Optional. if you want save\u002Fvisulize the result, you should put the name of the image in it with the key ['filename_or_obj'].\n                 ...(others as you want)\n     }\nWelcome to open issues if you meet any problem. It would be appreciated if you could contribute your dataset extensions. Unlike natural images, medical images vary a lot depending on different tasks. Expanding the generalization of a method requires everyone's efforts.\n\n ### TODO LIST\n\n- [ ] Jupyter tutorials.\n- [x] Fix bugs in BTCV. Add BTCV example.\n- [ ] Release REFUGE2, BraTs dataloaders and examples\n- [x] Changable Image Resolution \n- [ ] Fix bugs in Multi-GPU parallel\n- [x] Sample and Vis in training\n- [ ] Release general data pre-processing and post-processing\n- [x] Release evaluation\n- [ ] Deploy on HuggingFace\n- [x] configuration\n- [ ] Release SSL code\n- [ ] Release Medical Adapter Zoo\n\n ## Cite\n ~~~\n@misc{wu2023medical,\n      title={Medical SAM Adapter: Adapting Segment Anything Model for Medical Image Segmentation}, \n      author={Junde Wu and Wei Ji and Yuanpei Liu and Huazhu Fu and Min Xu and Yanwu Xu and Yueming Jin},\n      year={2023},\n      eprint={2304.12620},\n      archivePrefix={arXiv},\n      primaryClass={cs.CV}\n}\n ~~~\n\n\n\n\n\n\n","\u003Ch1 align=\"center\">● 医学 SAM 适配器\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FDN4rvk95CC\">\n        \u003Cimg alt=\"Discord\" src=\"https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1146610656779440188?logo=discord&style=flat&logoColor=white\"\u002F>\u003C\u002Fa>\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fstatic\u002Fv1?label=license&message=GPL&color=white&style=flat\" alt=\"License\"\u002F>\n\u003C\u002Fp>\n\n医学 SAM 适配器（或称 MSA）是一个针对医学影像，利用 [Adaption (适配技术)](https:\u002F\u002Flightning.ai\u002Fpages\u002Fcommunity\u002Ftutorial\u002Flora-llm\u002F) 对 [SAM (Segment Anything Model)](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fsegment-anything) 进行 [finetune (微调)] 的项目。\n该方法在论文 [Medical SAM Adapter: Adapting Segment Anything Model for Medical Image Segmentation](https:\u002F\u002Farxiv.org\u002Fabs\u002F2304.12620) 中有详细阐述。\n\n## 快速概览 \n \u003Cimg width=\"880\" height=\"380\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FImprintLab_Medical-SAM-Adapter_readme_123550b16926.jpeg\">\n\n ## 更新\n - [置顶] 加入我们的 [Discord](https:\u002F\u002Fdiscord.gg\u002FEqbgSPEX) 提问并与其他人讨论。\n - [置顶] 24-03-02 我们已在 [Medical-Adapter-Zoo](https:\u002F\u002Fhuggingface.co\u002FKidsWithTokens\u002FMedical-Adapter-Zoo\u002Ftree\u002Fmain) 发布了预训练的 Adapters（适配器）。无需痛苦训练即可尝试 😉 致谢：@shinning0821\n - 23-05-10. 本项目仍在快速更新中 🌝。查看 TODO 列表以了解下一个发布内容。\n - 23-05-11. GitHub Discussion 已开启。你们现在可以在游乐场里聊天、写代码和交朋友 👨‍❤️‍👨。 \n - 23-12-22. 在 [REFUGE](https:\u002F\u002Frefuge.grand-challenge.org\u002F) 数据集上发布了数据加载器 (data loader) 和示例案例。致谢：@jiayuanz3\n - 24-01-04. 发布了高效 Med-SAM-Adapter❗️这是一个新的、更快且更轻量级的版本，融合了 Meta [EfficientSAM](https:\u002F\u002Fyformer.github.io\u002Fefficient-sam\u002F)🏇。全部归功于 @shinning0821。 \n - 24-01-07. 图像分辨率现在可以通过 ``-image_size`` 进行调整。致谢：@shinning0821\n - 24-01-11. 添加了关于如何使用高效 Med-SAM-Adapter 的详细指南，包含性能和速度对比。你可以在 [guidance\u002Fefficient_sam.ipynb](.\u002Fguidance\u002Fefficient_sam.ipynb) 找到此资源。致谢：@shinning0821\n - 24-01-14. 我们刚刚发布了首个正式版本 v0.1.0-alpha 🥳。此版本支持 [MobileSAM](https:\u002F\u002Fgithub.com\u002FChaoningZhang\u002FMobileSAM)，可通过设置 ``-net mobile_sam`` 激活。此外，你现在可以灵活地使用 ViT (视觉 transformer)、Tiny ViT 和 Efficient ViT 作为编码器 (encoder)。详情请点击 [这里](https:\u002F\u002Fgithub.com\u002FKidsWithTokens\u002FMedical-SAM-Adapter\u002Freleases\u002Ftag\u002Fv0.1.0-alpha)。致谢：@shinning0821\n - 24-01-20. 添加了在 Med-SAM-Adapter 中使用 Mobile SAM 的指南，包含性能和速度对比。你可以在 [guidance\u002Fmobile_sam.ipynb](https:\u002F\u002Fgithub.com\u002FKidsWithTokens\u002FMedical-SAM-Adapter\u002Fblob\u002Fmain\u002Fguidance\u002Fmobile_sam.ipynb) 找到它。致谢：@shinning0821\n - 24-01-21. 我们在框架中加入了 [LoRA (低秩适应)](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fdiffusers\u002Ftraining\u002Flora)🤖。通过将 ``-mod`` 设置为 ``sam_lora`` 来使用它。指南可在 [此处](https:\u002F\u002Fgithub.com\u002FKidsWithTokens\u002FMedical-SAM-Adapter\u002Fblob\u002Fmain\u002Fguidance\u002Flora.ipynb) 找到。致谢：@shinning0821\n - 24-01-22. 我们为 [LIDC 数据集](https:\u002F\u002Fpaperswithcode.com\u002Fdataset\u002Flidc-idri) 添加了数据加载器 (dataloader)，这是来自低剂量肺部 CT 的多评分者 (4 位评分者 👨‍⚕️🧑🏽‍⚕️👩‍⚕️🧑🏽‍⚕️) 病灶分割数据 🩻。你可以在 [此处](https:\u002F\u002Fgithub.com\u002Fstefanknegt\u002FProbabilistic-Unet-Pytorch) 下载预处理后的 LIDC 数据集。同时更新了环境及 random_click 函数。致谢：@jiayuanz3\n - 24-03-06. 我们支持了多类别分割。通过将 ``-multimask_output`` 设置为所需的类别数量来使用它。同时将 REFUGE 示例更新为两个类别（视盘和视杯）。致谢：@LJQCN101\n - 24-03-06. 我们支持了许多其他数据集，并重写了数据集和数据加载器的代码。详见 `guidance\u002FDataset.md`。致谢：@shinning0821\n\n## Medical Adapter Zoo 🐘🐊🦍🦒🦨🦜🦥\n我们已在 [Medical-Adapter-Zoo](https:\u002F\u002Fhuggingface.co\u002FKidsWithTokens\u002FMedical-Adapter-Zoo\u002Ftree\u002Fmain) 中发布了一系列针对各种器官\u002F病变的预训练**适配器 (Adapter)**。只需选择匹配你疾病的适配器，即可轻松调整 **SAM (Segment Anything Model)** 以适应你的特定需求 😉。\n\n如果你找不到想要的，请通过任何可用的联系方式建议我们（GitHub issue、HuggingFace community 或 [Discord](https:\u002F\u002Fdiscord.gg\u002FEqbgSPEX)）。我们将竭尽全力将其纳入。\n\n ## Requirement\n\n 安装环境：\n\n ``conda env create -f environment.yml``\n\n ``conda activate sam_adapt``\n\n 然后下载 [SAM checkpoint](https:\u002F\u002Fdl.fbaipublicfiles.com\u002Fsegment_anything\u002Fsam_vit_b_01ec64.pth)，并将其放在 .\u002Fcheckpoint\u002Fsam\u002F 目录下。\n\n 你可以运行：\n\n ``wget https:\u002F\u002Fdl.fbaipublicfiles.com\u002Fsegment_anything\u002Fsam_vit_b_01ec64.pth``\n\n ``mv sam_vit_b_01ec64.pth .\u002Fcheckpoint\u002Fsam``\n 如果文件夹不存在则创建该文件夹\n\n ## Example Cases\n\n ### Melanoma Segmentation from Skin Images (2D)\n\n 1. 从 https:\u002F\u002Fchallenge.isic-archive.com\u002Fdata\u002F 下载 ISIC 数据集第 1 部分。然后将 csv 文件放入数据路径下的\".\u002Fdata\u002Fisic\"中。你在 \"your_data_path\" 下的数据集文件夹结构应如下所示：\nISIC\u002F\n     ISBI2016_ISIC_Part1_Test_Data\u002F...\n     \n     ISBI2016_ISIC_Part1_Training_Data\u002F...\n     \n     ISBI2016_ISIC_Part1_Test_GroundTruth.csv\n     \n      ISBI2016_ISIC_Part1_Training_GroundTruth.csv\n    \n    你可以在 [这里](https:\u002F\u002Fgithub.com\u002FKidsWithTokens\u002FMedSegDiff\u002Ftree\u002Fmaster\u002Fdata\u002Fisic_csv) 找到 csv 文件\n\n 2. 开始适配！运行：``python train.py -net sam -mod sam_adpt -exp_name *msa_test_isic* -sam_ckpt .\u002Fcheckpoint\u002Fsam\u002Fsam_vit_b_01ec64.pth -image_size 1024 -b 32 -dataset isic -data_path *..\u002Fdata*``\n 更改 \"data_path\" 和 \"exp_name\" 以符合你自己的使用习惯。你可以将 \"exp_name\" 更改为你想要的任何内容。\n\n 如果内存不足，可以降低 ``image size`` 或批次大小 ``b``。\n\n 3. 评估：代码可以在训练期间自动在测试集上评估模型，设置 \"--val_freq\" 来控制你想每隔多少轮次评估一次。你也可以运行 val.py 进行独立评估。\n\n 4. 结果可视化：你可以设置 \"--vis\" 参数来控制你想在训练或评估过程中查看多少轮次的结果。\n\n 默认情况下，所有内容都将保存在 `` .\u002Flogs\u002F`` 目录下。\n\n ### REFUGE: Optic-disc Segmentation from Fundus Images (2D) \n [REFUGE](https:\u002F\u002Frefuge.grand-challenge.org\u002F) 数据集包含 1200 张带有视盘\u002F杯分割和临床青光眼标签的眼底图像。 \n\n 1. 手动从 [这里](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Frealslimman\u002FREFUGE-MultiRater\u002Ftree\u002Fmain) 下载数据集，或使用命令行：\n\n ``git lfs install``\n\n ``git clone git@hf.co:datasets\u002Frealslimman\u002FREFUGE-MultiRater``\n\n 解压并将数据集放入目标文件夹\n\n ``unzip .\u002FREFUGE-MultiRater.zip``\n\n ``mv REFUGE-MultiRater .\u002Fdata``\n\n 2. 对于训练适配器，运行：``python train.py -net sam -mod sam_adpt -exp_name REFUGE-MSAdapt -sam_ckpt .\u002Fcheckpoint\u002Fsam\u002Fsam_vit_b_01ec64.pth -image_size 1024 -b 32 -dataset REFUGE -data_path .\u002Fdata\u002FREFUGE-MultiRater``\n 你可以将 \"exp_name\" 更改为你想要的任何内容。\n\n 如果内存不足，可以降低 ``image size`` 或批次大小 ``b``。\n\n ### Abdominal Multiple Organs Segmentation (3D)\n\n 本教程演示了如何使用 BTCV 挑战数据集让 **MSA (Medical Segment Anything)** 适配 SAM 到 3D 多器官分割任务。\n对于 BTCV 数据集，在机构审查委员会 (IRB) 的监督下，从正在进行的结直肠癌化疗试验和回顾性腹壁疝研究中随机选择了 50 例腹部 CT 扫描。这 50 次扫描是在门静脉造影期捕获的，具有可变的体积大小 (512 x 512 x 85 - 512 x 512 x 198) 和视野 (约 280 x 280 x 280 mm³ - 500 x 500 x 650 mm³)。平面内分辨率从 0.54 x 0.54 mm² 变化到 0.98 x 0.98 mm²，而层厚范围从 2.5 mm 到 5.0 mm。\n目标：13 个腹部器官，包括\n脾脏\n右肾\n左肾\n胆囊\n食管\n肝脏\n胃\n主动脉\n下腔静脉 (IVC)\n门静脉和脾静脉\n胰腺\n右肾上腺\n左肾上腺。\n模态：CT\n大小：30 个 3D 数据体 (24 个训练 + 6 个测试)\n挑战：BTCV MICCAI 挑战\n下图展示了 CT 中标注的器官子区域图像块（左上）和整个数据集的最终标签（右侧）。\n1. 按照 [MONAI](https:\u002F\u002Fdocs.monai.io\u002Fen\u002Fstable\u002Findex.html) 说明准备 BTCV 数据集：\n从以下地址下载 BTCV 数据集：https:\u002F\u002Fwww.synapse.org\u002F#!Synapse:syn3193805\u002Fwiki\u002F217752。打开链接后，导航到\"Files\"选项卡，然后下载 Abdomen\u002FRawData.zip。\n下载 zip 文件后，解压。然后将 RawData\u002FTraining\u002Fimg 中的图像放入 ..\u002Fdata\u002FimagesTr，将 RawData\u002FTraining\u002Flabel 中的标签放入 ..\u002Fdata\u002FlabelsTr。\n从 [此链接](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1qcGh41p-rI3H_sQ0JwOAhNiQSXriQqGi\u002Fview) 下载数据划分的 json 文件。将 JSON 文件放置在 ..\u002Fdata\u002Fdataset_0.json 处。\n2. 对于适配，运行：``python train.py -net sam -mod sam_adpt -exp_name msa-3d-sam-btcv -sam_ckpt .\u002Fcheckpoint\u002Fsam\u002Fsam_vit_b_01ec64.pth -image_size 1024 -b 8 -dataset decathlon -thd True -chunk 96 -data_path ..\u002Fdata -num_sample 4``  \n你可以修改以下参数以节省内存使用：'-b' 批次大小，'-chunk' 每个样本的 3D 深度（通道），'-num_sample' [Monai.RandCropByPosNegLabeld](https:\u002F\u002Fdocs.monai.io\u002Fen\u002Fstable\u002Ftransforms.html#randcropbyposneglabeld) 的样本数量，'evl_chunk' 评估中的 3D 通道分割步长，如果在评估时内存不足，请减小它。\n\n## 在您的自定义数据集上运行\n在其他数据集上运行 MSA (Medical SAM Adapter) 很简单。只需参照 `` .\u002Fdataset.py`` 中的示例编写另一个数据集类。您只需要确保返回一个包含以下内容的字典：\n         {\n                     'image': 保存图像的张量 (tensor)，2D 图像大小为 [C,H,W]，3D 数据大小为 [C, H, W, D]。\n                     D 是 3D 体积的深度，C 是扫描\u002F帧的通道数，CT、MRI、US 数据通常为 1。\n                     如果处理如彩色手术视频等内容，D 可以是时间帧的数量，RGB 帧的 C 为 3。\n                     'label': 目标掩码。尺寸与图像相同（分辨率 H 和 W 除外）。\n                     'p_label': 提示标签，用于决定正\u002F负提示。为简化起见，若不需要负提示功能，可始终设为 1。\n                     'pt': 提示。应与 SAM (Segment Anything Model) 中的一致，例如点击提示应为 [点击 x 坐标，点击 y 坐标]，如果使用 3D 数据，每个扫描\u002F帧有一个点击。\n                     'image_meta_dict': 可选。如果您想保存\u002F可视化结果，应在其中放入图像名称，键为 ['filename_or_obj']。\n                     ...(其他按需添加)\n         }\n如果您遇到任何问题，欢迎提交 Issue。如果您能贡献您的数据集扩展，我们将不胜感激。与自然图像不同，医学图像因任务不同而有很大差异。扩展方法的泛化能力需要大家的共同努力。\n\n ### TODO 列表\n\n- [ ] Jupyter 教程。\n- [x] 修复 BTCV 中的 Bug。添加 BTCV 示例。\n- [ ] 发布 REFUGE2、BraTs 的数据加载器和示例\n- [x] 可变图像分辨率\n- [ ] 修复多 GPU 并行中的 Bug\n- [x] 训练时的采样和可视化\n- [ ] 发布通用的数据预处理和后处理\n- [x] 发布评估代码\n- [ ] 部署到 HuggingFace\n- [x] 配置\n- [ ] 发布 SSL (自监督学习) 代码\n- [ ] 发布医疗适配器库\n\n ## 引用\n ~~~\n@misc{wu2023medical,\n      title={Medical SAM Adapter: Adapting Segment Anything Model for Medical Image Segmentation}, \n      author={Junde Wu and Wei Ji and Yuanpei Liu and Huazhu Fu and Min Xu and Yanwu Xu and Yueming Jin},\n      year={2023},\n      eprint={2304.12620},\n      archivePrefix={arXiv},\n      primaryClass={cs.CV}\n}\n ~~~","# Medical-SAM-Adapter 快速上手指南\n\n**Medical-SAM-Adapter (MSA)** 是一个基于 [SAM](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fsegment-anything) 的开源项目，通过适配器技术（Adaption\u002FLoRA）针对医学影像进行微调，实现高精度的医学图像分割。支持 2D（皮肤、眼底等）和 3D（CT\u002FMRI）任务。\n\n## 环境准备\n\n*   **系统要求**: Linux \u002F macOS \u002F Windows (WSL)\n*   **依赖**: Python 3.x, PyTorch, CUDA (建议版本与 `environment.yml` 匹配)\n*   **前置资源**: 需下载官方 SAM 权重文件并放置到指定目录。\n\n## 安装步骤\n\n1.  **克隆仓库**\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002FWuJunde\u002FMedical-SAM-Adapter.git\n    cd Medical-SAM-Adapter\n    ```\n\n2.  **创建虚拟环境**\n    ```bash\n    conda env create -f environment.yml\n    conda activate sam_adapt\n    ```\n\n3.  **下载 SAM 检查点**\n    将 SAM 模型权重下载至 `.\u002Fcheckpoint\u002Fsam\u002F` 目录下：\n    ```bash\n    mkdir -p .\u002Fcheckpoint\u002Fsam\n    wget https:\u002F\u002Fdl.fbaipublicfiles.com\u002Fsegment_anything\u002Fsam_vit_b_01ec64.pth\n    mv sam_vit_b_01ec64.pth .\u002Fcheckpoint\u002Fsam\u002F\n    ```\n\n## 基本使用\n\n### 训练示例 (以 ISIC 黑色素瘤分割为例)\n\n1.  **准备数据**\n    下载 ISIC 数据集并将 CSV 标签文件放入 `.\u002Fdata\u002Fisic` 目录。\n\n2.  **启动训练**\n    运行以下命令开始微调。请根据实际路径修改 `-data_path` 和 `-exp_name`。\n    ```bash\n    python train.py -net sam -mod sam_adpt -exp_name msa_test_isic -sam_ckpt .\u002Fcheckpoint\u002Fsam\u002Fsam_vit_b_01ec64.pth -image_size 1024 -b 32 -dataset isic -data_path ..\u002Fdata\n    ```\n    *   `-net`: 选择网络架构 (如 `sam`)\n    *   `-mod`: 选择微调模式 (如 `sam_adpt`, `sam_lora`)\n    *   `-image_size`: 输入图像分辨率\n    *   `-b`: Batch Size (显存不足时可减小)\n\n3.  **评估与可视化**\n    *   训练过程中自动评估，可通过 `--val_freq` 控制频率。\n    *   独立评估：运行 `python val.py`。\n    *   结果可视化：设置 `--vis` 参数查看训练或评估过程中的结果。\n    *   默认输出保存在 `.\u002Flogs\u002F` 目录。\n\n### 其他任务配置\n\n*   **3D 腹部器官分割 (BTCV)**:\n    ```bash\n    python train.py -net sam -mod sam_adpt -exp_name msa-3d-sam-btcv -sam_ckpt .\u002Fcheckpoint\u002Fsam\u002Fsam_vit_b_01ec64.pth -image_size 1024 -b 8 -dataset decathlon -thd True -chunk 96 -data_path ..\u002Fdata -num_sample 4\n    ```\n*   **多类别分割**: 设置 `-multimask_output` 为类别数量。\n*   **高效版\u002F移动端**: 支持 `EfficientSAM` 和 `MobileSAM`，详见 `guidance\u002F` 下的 Jupyter Notebook 教程。\n\n### 预训练模型推荐\n若无需从头训练，可直接使用已发布的预训练 Adapter：\n*   **地址**: [Medical-Adapter-Zoo](https:\u002F\u002Fhuggingface.co\u002FKidsWithTokens\u002FMedical-Adapter-Zoo\u002Ftree\u002Fmain)\n*   **用法**: 下载对应器官\u002F病变的适配器权重，替换训练时的相应配置即可。","某三甲医院影像科团队正在开发肺结节自动筛查系统。他们急需从低剂量 CT 中精准分割微小病灶以辅助医生诊断。\n\n### 没有 Medical-SAM-Adapter 时\n- 通用 SAM 模型直接应用在医学图像上效果差，无法识别细微的肺结节纹理和复杂边界。\n- 从头训练专用分割网络需要海量标注数据，团队仅有少量专家标注样本，模型难以收敛。\n- 传统深度学习模型计算资源消耗大，推理速度慢，难以满足临床实时辅助诊断的高并发需求。\n- 针对不同器官需重新设计网络架构，研发周期长且维护成本高。\n\n### 使用 Medical-SAM-Adapter 后\n- 利用预训练适配器微调，仅需少量标注即可实现高精度病灶分割，有效解决了数据稀缺难题。\n- 支持 EfficientSAM 等高效编码器，显著降低显存占用并提升推理速度，适配边缘设备部署。\n- 内置多类别分割功能，可同时区分肿瘤、血管及正常组织，无需为不同器官重复建模。\n- 可直接调用 Medical-Adapter-Zoo 中的预训练权重，开箱即用，极大缩短了项目上线时间。\n\nMedical-SAM-Adapter 通过轻量级适配技术，将通用视觉大模型快速转化为专业医疗助手，大幅降低了 AI 落地的门槛与成本。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FImprintLab_Medical-SAM-Adapter_c7c3c0de.png","ImprintLab","Imprint Lab","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FImprintLab_1f53a865.png","",null,"https:\u002F\u002Fgithub.com\u002FImprintLab",[82,86,90],{"name":83,"color":84,"percentage":85},"Python","#3572A5",98.9,{"name":87,"color":88,"percentage":89},"Jupyter Notebook","#DA5B0B",0.8,{"name":91,"color":92,"percentage":93},"Shell","#89e051",0.2,1294,122,"2026-04-04T03:38:02","GPL-3.0","未说明","需要 GPU（具体型号\u002F显存\u002FCUDA 版本未明确说明，需根据显存调整 batch_size）",{"notes":101,"python":98,"dependencies":102},"1. 推荐使用 conda 通过 environment.yml 创建环境；2. 首次运行需手动下载 SAM 预训练权重文件（约 500MB）至 .\u002Fcheckpoint\u002Fsam\u002F；3. 3D 任务需遵循 MONAI 指南准备 BTCV 数据集；4. 显存不足时可降低 image_size 或 batch_size 参数；5. 多卡并行功能当前存在已知 Bug（见 TODO 列表）；6. 支持多种医学数据集（如 ISIC, REFUGE, LIDC, BTCV），需按对应路径放置数据。",[103,104,105,106,107],"torch","MONAI","segment_anything","diffusers","lightning",[13],[110,111,112,113,114],"adapter","deep-learning","medical-imaging","segment-anything-model","segmentagtion","2026-03-27T02:49:30.150509","2026-04-06T06:43:59.841787",[118,123,128,133,138,143,148],{"id":119,"question_zh":120,"answer_zh":121,"source_url":122},1395,"如何更改输入图像的尺寸进行训练？","现在支持更改图像大小，只需在运行脚本时设置 `-image_size` 参数，并确保加载与修改后尺寸匹配的预训练权重。","https:\u002F\u002Fgithub.com\u002FImprintLab\u002FMedical-SAM-Adapter\u002Fissues\u002F9",{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},1396,"训练过程中验证集 IoU 值过低是什么原因？","可能是训练轮数不足导致的，建议将训练 epoch 数增加到 100 以上。同时确认 IoU 计算代码是否正确。","https:\u002F\u002Fgithub.com\u002FImprintLab\u002FMedical-SAM-Adapter\u002Fissues\u002F67",{"id":129,"question_zh":130,"answer_zh":131,"source_url":132},1397,"哪里可以获取医学图像的预训练模型或 Adapter 权重？","维护者正在构建 Medical-Adapter-Zoo (https:\u002F\u002Fhuggingface.co\u002FKidsWithTokens\u002FMedical-Adapter-Zoo) 以发布各种医学图像的 adapter 权重，预计一个月内完成。","https:\u002F\u002Fgithub.com\u002FImprintLab\u002FMedical-SAM-Adapter\u002Fissues\u002F8",{"id":134,"question_zh":135,"answer_zh":136,"source_url":137},1398,"数据集的文件路径结构是怎样的？如何获取所需的 .csv 文件？","路径应包含 Test_Data, GroundTruth, Training_Data 等子文件夹。CSV 文件可参考 MedSegDiff 仓库的 data\u002Fisic_csv 目录获取。","https:\u002F\u002Fgithub.com\u002FImprintLab\u002FMedical-SAM-Adapter\u002Fissues\u002F13",{"id":139,"question_zh":140,"answer_zh":141,"source_url":142},1399,"使用多分类任务（如 REFUGE 数据集）时报错 Target size 不匹配怎么办？","需要在 cfg.py 配置文件中将 `multimask_output` 参数设置为 2。","https:\u002F\u002Fgithub.com\u002FImprintLab\u002FMedical-SAM-Adapter\u002Fissues\u002F100",{"id":144,"question_zh":145,"answer_zh":146,"source_url":147},1400,"运行 3D 数据集训练示例时出现 'nice_train_loader' 未定义错误如何解决？","这是 README 文档中的参数错误，需要将命令中第二个 `dataset` 参数修改为 `data_path`。","https:\u002F\u002Fgithub.com\u002FImprintLab\u002FMedical-SAM-Adapter\u002Fissues\u002F61",{"id":149,"question_zh":150,"answer_zh":151,"source_url":152},1401,"使用自定义数据集训练时报错或显存不足该如何处理？","确保将每个目标（target）转换为二进制 2D 图。如果显存不足（如 50A 显卡），可将 batch_size 调整为 4。","https:\u002F\u002Fgithub.com\u002FImprintLab\u002FMedical-SAM-Adapter\u002Fissues\u002F12",[154,159],{"id":155,"version":156,"summary_zh":157,"released_at":158},100900,"v0.1.0","## What's Changed\r\n- Add LoRa to our framework, can use -mod option for specific training ways, including train from scratch, using adapter, LoRa or AdaLoRa\r\n- Release the guidance on how to use LoRa in our framework\r\n- Other code refactoring and optimization.","2024-01-21T18:44:41",{"id":160,"version":161,"summary_zh":162,"released_at":163},100901,"v0.1.0-alpha","- Added the \"-encoder\" option, which allows specifying the specific ImageEncoder type. (you can set different encoders for the same '-net')\r\n\r\n- Now, you have the flexibility to choose between using adapters or training from scratch by utilizing the -mod option in the command line.\r\n\r\n- The framework now embraces MobileSAM with the introduction of the -net mobile_sam option. Moreover, it extends support to vit, tiny_vit, and efficient_vit as encoders. Specifically, when opting for vit or tiny_vit, the framework facilitates Adapter usage (adapter support for efficient_vit will be available in a later release due to its specific structure). Another notable feature is the compatibility with input images of varying resolutions. Successful training and testing have been conducted on ISIC and REFUGE datasets.\r\n\r\n- Other code refactoring and optimization.","2024-01-14T21:47:12"]