[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-ma-xu--Context-Cluster":3,"tool-ma-xu--Context-Cluster":62},[4,18,26,35,44,53],{"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},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,2,"2026-04-10T11:39:34",[14,15,13],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":32,"last_commit_at":41,"category_tags":42,"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",[43,13,15,14],"插件",{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":10,"last_commit_at":50,"category_tags":51,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[52,15,13,14],"语言模型",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"status":17},4292,"Deep-Live-Cam","hacksider\u002FDeep-Live-Cam","Deep-Live-Cam 是一款专注于实时换脸与视频生成的开源工具，用户仅需一张静态照片，即可通过“一键操作”实现摄像头画面的即时变脸或制作深度伪造视频。它有效解决了传统换脸技术流程繁琐、对硬件配置要求极高以及难以实时预览的痛点，让高质量的数字内容创作变得触手可及。\n\n这款工具不仅适合开发者和技术研究人员探索算法边界，更因其极简的操作逻辑（仅需三步：选脸、选摄像头、启动），广泛适用于普通用户、内容创作者、设计师及直播主播。无论是为了动画角色定制、服装展示模特替换，还是制作趣味短视频和直播互动，Deep-Live-Cam 都能提供流畅的支持。\n\n其核心技术亮点在于强大的实时处理能力，支持口型遮罩（Mouth Mask）以保留使用者原始的嘴部动作，确保表情自然精准；同时具备“人脸映射”功能，可同时对画面中的多个主体应用不同面孔。此外，项目内置了严格的内容安全过滤机制，自动拦截涉及裸露、暴力等不当素材，并倡导用户在获得授权及明确标注的前提下合规使用，体现了技术发展与伦理责任的平衡。",88924,"2026-04-06T03:28:53",[14,15,13,61],"视频",{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":77,"owner_location":78,"owner_email":77,"owner_twitter":77,"owner_website":79,"owner_url":80,"languages":81,"stars":90,"forks":91,"last_commit_at":92,"license":93,"difficulty_score":94,"env_os":95,"env_gpu":96,"env_ram":95,"env_deps":97,"category_tags":106,"github_topics":77,"view_count":32,"oss_zip_url":77,"oss_zip_packed_at":77,"status":17,"created_at":107,"updated_at":108,"faqs":109,"releases":140},8963,"ma-xu\u002FContext-Cluster","Context-Cluster","[ICLR 2023 Oral] Image as Set of Points","Context-Cluster 是一款源自 ICLR 2023 口头报告的前沿视觉模型，其核心理念是将图像视为“点的集合”而非传统的网格像素。它创新性地引入了一种基于聚类的处理机制，能够动态地将图像中语义相似的像素点聚合在一起进行特征学习。这种方法有效解决了传统卷积神经网络或 Vision Transformer 在处理局部细节与全局上下文关系时存在的冗余计算问题，显著提升了模型对图像结构的理解能力与推理效率。\n\n该工具特别适合计算机视觉领域的研究人员、算法工程师以及希望探索新型架构的开发者使用。通过提供的预训练模型和完整代码库，用户可以轻松在 ImageNet 等数据集上进行图像分类任务的复现与二次开发。Context-Cluster 的独特技术亮点在于其“无区域划分”的聚类策略，配合可视化的训练过程展示，让原本黑盒般的特征聚合过程变得直观可见。这不仅为学术探索提供了新视角，也为构建更高效、轻量级的视觉应用奠定了坚实基础。无论是追求极致性能的研究者，还是寻求技术突破的工程团队，都能从中获得启发与实用价值。","# [Image as Set of Points](https:\u002F\u002Fopenreview.net\u002Fforum?id=awnvqZja69) - ICLR'23 [Oral, Top5%]\n\nby [Xu Ma*](https:\u002F\u002Fma-xu.github.io\u002F), [Yuqian Zhou*](https:\u002F\u002Fyzhouas.github.io\u002F), \n[Huan Wang](http:\u002F\u002Fhuanwang.tech\u002F), [Can Qin](https:\u002F\u002Fcanqin.tech\u002F), [Bin Sun](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fbin-sun-2993b4142\u002F), \n[Chang Liu](https:\u002F\u002Fsites.google.com\u002Fview\u002Fcliu5\u002Fhome\u002F), [Yun Fu](http:\u002F\u002Fwww1.ece.neu.edu\u002F~yunfu\u002F). \n\n[![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F📃-arXiv-ff69b4)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2303.01494) \n[![webpage](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🖥-Website-9cf)](https:\u002F\u002Fma-xu.github.io\u002FContext-Cluster\u002F)\n\u003C!--\n[![Open All Collab](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1s108WmqSVH9MILOjSAu29QyAEjExOWAP?usp=sharing), \n[![Huggingface space](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🤗-Huggingface%20space-brightgreen.svg)](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FCVPR\u002FLIVE)\n-->\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_c320242a6d5b.png\" width=\"550px\" height=\"380px\">\n\u003C\u002Fdiv>\n\n-----\n## Clustering Process (from scratch to last epoch):\n\u003Cdiv align=\"center\">\n    \u003Cb>An example of clustering training updates(from scratch to last epoch) for the four stages.\u003C\u002Fb>\n    \u003Cbr>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_264e892b8212.gif\" width=\"150px\" height=\"150px\" alt=\"Elephant at sunset\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_90f05c9cbb02.gif\" width=\"150px\" height=\"150px\" alt=\"Elephant at sunset\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_ab85a142e90d.gif\" width=\"150px\" height=\"150px\" alt=\"Elephant at sunset\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_17d5b8caae6e.gif\" width=\"150px\" height=\"150px\" alt=\"Elephant at sunset\">\n    \u003Cbr>\n    \n\u003C\u002Fdiv>\n\n\u003Cdiv align=\"center\">\n    \u003Cb>More examples for clustering training updates(from scratch to last epoch).\u003C\u002Fb>\n    \u003Cbr>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_94ebf23e99d9.gif\" width=\"150px\" height=\"150px\" alt=\"Elephant at sunset\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_f0c24316f0de.gif\" width=\"150px\" height=\"150px\" alt=\"Elephant at sunset\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_fa5165f6bace.gif\" width=\"150px\" height=\"150px\" alt=\"Elephant at sunset\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_b014e2f8e6c0.gif\" width=\"150px\" height=\"150px\" alt=\"Elephant at sunset\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_7742071b0d2d.gif\" width=\"150px\" height=\"150px\" alt=\"Elephant at sunset\">\n\u003C\u002Fdiv>\n\n\n-----\n\n\u003C!--\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_516a79226dc5.png\" width=\"650px\" height=\"650px\">\n\u003C\u002Fdiv>-->\n\n\n## TO DO (Mar 9):\n\n- [x] Feb\u002F24\u002F2024: Re-train all models with better results, updated the link to google drive (smilelab webpage broken).\n- [x] release codes\u002F checkpoints for CoC without region partition (re-trained with updated codes, get better results)\n- [x] release the visualization script.\n\n\n## Image Classification\n### 1. Requirements\n\ntorch>=1.7.0; torchvision>=0.8.0; pyyaml; timm==0.6.13; einops; [apex-amp](https:\u002F\u002Fgithub.com\u002FNVIDIA\u002Fapex) (if you want to use fp16);\n\ndata prepare: ImageNet with the following folder structure, you can extract ImageNet by this [script](https:\u002F\u002Fgist.github.com\u002FBIGBALLON\u002F8a71d225eff18d88e469e6ea9b39cef4).\n\n```\n│imagenet\u002F\n├──train\u002F\n│  ├── n01440764\n│  │   ├── n01440764_10026.JPEG\n│  │   ├── n01440764_10027.JPEG\n│  │   ├── ......\n│  ├── ......\n├──val\u002F\n│  ├── n01440764\n│  │   ├── ILSVRC2012_val_00000293.JPEG\n│  │   ├── ILSVRC2012_val_00002138.JPEG\n│  │   ├── ......\n│  ├── ......\n```\n\n\n\n### 2. Pre-trained Context Cluster Models\nWe update the **new checkpoints** and **logs** (fix bugs, FC implementation). Feel free to download.\n\n| Model    |  #params | Image resolution | Top1 Acc| Throughtput | Download (updated link with higher acc.) | \n| :---     |   :---:    |  :---: |  :---:  |  :---:  |:---:  |\n| ContextCluster-tiny  |    5.3M     |   224 |  73.2  |518.4| [[checkpoint & logs]](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F155Lfofxr7vpdcUxL8ZvzlrNX4cUlhn3J?usp=sharing) |\n| ContextCluster-tiny_plain (w\u002Fo region partition) |   5.3M     |   224 |  73.8 | -| [[checkpoint & logs]](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1HSZlO_XMkw6mM90Cqo3tVFxEUX8PvWCg?usp=sharing) |\n| ContextCluster-small  |   14.0M     |   224 |  78.1  |513.0| [[checkpoint & logs]](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F19zbCOS33We7HOjL575Di5wyuLbnDebdE?usp=sharing) |\n| ContextCluster-medium |   27.9M     |   224 |  81.2  |325.2| [[checkpoint & logs]](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1H3Fs3SVE0LFHuP6iP9nTg2_ZMrkfk9S8?usp=sharing) |\n\n\n\n### 3. Validation\n\nTo evaluate our Context Cluster models, run:\n\n```bash\nMODEL=coc_tiny #{tiny, tiny2 small, medium}\npython3 validate.py \u002Fpath\u002Fto\u002Fimagenet  --model $MODEL -b 128 --checkpoint {\u002Fpath\u002Fto\u002Fcheckpoint} \n```\n\n\n\n### 4. Train\nWe show how to train Context Cluster on 8 GPUs. The relation between learning rate and batch size is lr=bs\u002F1024*1e-3.\nFor convenience, assuming the batch size is 1024, then the learning rate is set as 1e-3 (for batch size of 1024, setting the learning rate as 2e-3 sometimes sees better performance). \n\n\n```bash\nMODEL=coc_tiny # coc variants\nDROP_PATH=0.1 # drop path rates\npython3 -m torch.distributed.launch --nproc_per_node=8 train.py --data_dir \u002Fdev\u002Fshm\u002Fimagenet --model $MODEL -b 128 --lr 1e-3 --drop-path $DROP_PATH --amp\n```\n\n\n### 5. Clustering Visualization\nWe provide a script to visualize the clustering results of CoC for a given stage, block, head.\n\nDifferent layers\u002Fheads will present different clustering patterns.\n\n\n```bash\n# Use example (generated image will saved to images\u002Fcluster_vis\u002F{model}):\npython cluster_visualize.py --image {path_to_image} --model {model} --checkpoint {path_to_checkpoint} --stage {stage} --block {block} --head {head}\n \n```\n\n\n**See folder [pointcloud](pointcloud\u002F) for point cloud classification taks on ScanObjectNN.**\n\n**See folder [detection](detection\u002F) for Detection and instance segmentation tasks on COCO.**\n\n**See folder [segmentation](segmentation\u002F) for Semantic Segmentation task on ADE20K.**\n\n\n## BibTeX\n\n    @inproceedings{ma2023image,\n        title={Image as Set of Points},\n        author={Xu Ma and Yuqian Zhou and Huan Wang and Can Qin and Bin Sun and Chang Liu and Yun Fu},\n        booktitle={The Eleventh International Conference on Learning Representations},\n        year={2023},\n        url={https:\u002F\u002Fopenreview.net\u002Fforum?id=awnvqZja69}\n    }\n    \n\n## Acknowledgment\nOur implementation is mainly based on the following codebases. We gratefully thank the authors for their wonderful works.\n\n[pointMLP](https:\u002F\u002Fgithub.com\u002Fma-xu\u002FpointMLP-pytorch), [poolformer](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fpoolformer), [pytorch-image-models](https:\u002F\u002Fgithub.com\u002Frwightman\u002Fpytorch-image-models), [mmdetection](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmdetection), [mmsegmentation](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmsegmentation).\n\n## License\nThe majority of Context Cluster is licensed under an [Apache License 2.0](https:\u002F\u002Fgithub.com\u002Fma-xu\u002FContext-Cluster\u002Fblob\u002Fmain\u002FLICENSE)\n","# [图像作为点集](https:\u002F\u002Fopenreview.net\u002Fforum?id=awnvqZja69) - ICLR'23 [口头报告，前5%]\n\n作者：[Xu Ma*](https:\u002F\u002Fma-xu.github.io\u002F)、[Yuqian Zhou*](https:\u002F\u002Fyzhouas.github.io\u002F)、\n[Huan Wang](http:\u002F\u002Fhuanwang.tech\u002F)、[Can Qin](https:\u002F\u002Fcanqin.tech\u002F)、[Bin Sun](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fbin-sun-2993b4142\u002F)、\n[Chang Liu](https:\u002F\u002Fsites.google.com\u002Fview\u002Fcliu5\u002Fhome\u002F)、[Yun Fu](http:\u002F\u002Fwww1.ece.neu.edu\u002F~yunfu\u002F)。\n\n[![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F📃-arXiv-ff69b4)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2303.01494) \n[![网页](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🖥-网站-9cf)](https:\u002F\u002Fma-xu.github.io\u002FContext-Cluster\u002F)\n\u003C!--\n[![Open All Collab](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1s108WmqSVH9MILOjSAu29QyAEjExOWAP?usp=sharing), \n[![Huggingface space](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🤗-Huggingface%20space-brightgreen.svg)](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FCVPR\u002FLIVE)\n-->\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_c320242a6d5b.png\" width=\"550px\" height=\"380px\">\n\u003C\u002Fdiv>\n\n-----\n## 聚类过程（从头到最后一轮）：\n\u003Cdiv align=\"center\">\n    \u003Cb>四个阶段聚类训练更新的示例（从头到最后一轮）。\u003C\u002Fb>\n    \u003Cbr>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_264e892b8212.gif\" width=\"150px\" height=\"150px\" alt=\"日落时分的大象\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_90f05c9cbb02.gif\" width=\"150px\" height=\"150px\" alt=\"日落时分的大象\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_ab85a142e90d.gif\" width=\"150px\" height=\"150px\" alt=\"日落时分的大象\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_17d5b8caae6e.gif\" width=\"150px\" height=\"150px\" alt=\"日落时分的大象\">\n    \u003Cbr>\n    \n\u003C\u002Fdiv>\n\n\u003Cdiv align=\"center\">\n    \u003Cb>更多聚类训练更新的示例（从头到最后一轮）。\u003C\u002Fb>\n    \u003Cbr>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_94ebf23e99d9.gif\" width=\"150px\" height=\"150px\" alt=\"日落时分的大象\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_f0c24316f0de.gif\" width=\"150px\" height=\"150px\" alt=\"日落时分的大象\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_fa5165f6bace.gif\" width=\"150px\" height=\"150px\" alt=\"日落时分的大象\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_b014e2f8e6c0.gif\" width=\"150px\" height=\"150px\" alt=\"日落时分的大象\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_7742071b0d2d.gif\" width=\"150px\" height=\"150px\" alt=\"日落时分的大象\">\n\u003C\u002Fdiv>\n\n\n-----\n\n\u003C!--\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_readme_516a79226dc5.png\" width=\"650px\" height=\"650px\">\n\u003C\u002Fdiv>-->\n\n\n## 待办事项（3月9日）：\n\n- [x] 2024年2月24日：用更好的结果重新训练所有模型，并更新了谷歌云盘链接（smilelab网页已失效）。\n- [x] 发布不含区域划分的CoC代码和检查点（使用更新后的代码重新训练，效果更好）。\n- [x] 发布可视化脚本。\n\n\n## 图像分类\n### 1. 需求\n\ntorch>=1.7.0；torchvision>=0.8.0；pyyaml；timm==0.6.13；einops；[apex-amp](https:\u002F\u002Fgithub.com\u002FNVIDIA\u002Fapex)（如果想使用fp16）；\n\n数据准备：ImageNet需按以下文件夹结构组织，可使用此[脚本](https:\u002F\u002Fgist.github.com\u002FBIGBALLON\u002F8a71d225eff18d88e469e6ea9b39cef4)解压ImageNet。\n\n```\n│imagenet\u002F\n├──train\u002F\n│  ├── n01440764\n│  │   ├── n01440764_10026.JPEG\n│  │   ├── n01440764_10027.JPEG\n│  │   ├── ......\n│  ├── ......\n├──val\u002F\n│  ├── n01440764\n│  │   ├── ILSVRC2012_val_00000293.JPEG\n│  │   ├── ILSVRC2012_val_00002138.JPEG\n│  │   ├── ......\n│  ├── ......\n```\n\n\n\n### 2. 预训练的Context Cluster模型\n我们更新了**新的检查点**和**日志**（修复了bug，改进了全连接层实现）。欢迎下载。\n\n| 模型    | 参数量 | 图像分辨率 | Top1准确率| 吞吐量 | 下载（更新后的链接，准确率更高） | \n| :---     |   :---:    |  :---: |  :---:  |  :---:  |:---:  |\n| ContextCluster-tiny  |    5.3M     |   224 |  73.2  |518.4| [[检查点与日志]](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F155Lfofxr7vpdcUxL8ZvzlrNX4cUlhn3J?usp=sharing) |\n| ContextCluster-tiny_plain（无区域划分） |   5.3M     |   224 |  73.8 | -| [[检查点与日志]](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1HSZlO_XMkw6mM90Cqo3tVFxEUX8PvWCg?usp=sharing) |\n| ContextCluster-small  |   14.0M     |   224 |  78.1  |513.0| [[检查点与日志]](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F19zbCOS33We7HOjL575Di5wyuLbnDebdE?usp=sharing) |\n| ContextCluster-medium |   27.9M     |   224 |  81.2  |325.2| [[检查点与日志]](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1H3Fs3SVE0LFHuP6iP9nTg2_ZMrkfk9S8?usp=sharing) |\n\n\n\n### 3. 验证\n\n要评估我们的Context Cluster模型，请运行：\n\n```bash\nMODEL=coc_tiny #{tiny, tiny2 small, medium}\npython3 validate.py \u002Fpath\u002Fto\u002Fimagenet  --model $MODEL -b 128 --checkpoint {\u002Fpath\u002Fto\u002Fcheckpoint} \n```\n\n\n\n### 4. 训练\n我们展示了如何在8张GPU上训练Context Cluster。学习率与批量大小的关系为lr=bs\u002F1024*1e-3。\n为方便起见，假设批量大小为1024，则学习率为1e-3（对于1024的批量大小，有时将学习率设为2e-3会取得更好的效果）。\n\n\n```bash\nMODEL=coc_tiny # coc variants\nDROP_PATH=0.1 # drop path rates\npython3 -m torch.distributed.launch --nproc_per_node=8 train.py --data_dir \u002Fdev\u002Fshm\u002Fimagenet --model $MODEL -b 128 --lr 1e-3 --drop-path $DROP_PATH --amp\n```\n\n\n### 5. 聚类可视化\n我们提供了一个脚本，用于可视化给定阶段、块和头的CoC聚类结果。\n不同层\u002F头会呈现出不同的聚类模式。\n\n\n```bash\n# 使用示例（生成的图像将保存到images\u002Fcluster_vis\u002F{model}）：\npython cluster_visualize.py --image {path_to_image} --model {model} --checkpoint {path_to_checkpoint} --stage {stage} --block {block} --head {head}\n \n```\n\n\n**请参阅[pointcloud](pointcloud\u002F)文件夹，了解ScanObjectNN上的点云分类任务。**\n\n**请参阅[detection](detection\u002F)文件夹，了解COCO上的目标检测和实例分割任务。**\n\n**请参阅[segmentation](segmentation\u002F)文件夹，了解ADE20K上的语义分割任务。**\n\n\n## BibTeX\n\n    @inproceedings{ma2023image,\n        title={Image as Set of Points},\n        author={Xu Ma and Yuqian Zhou and Huan Wang and Can Qin and Bin Sun and Chang Liu and Yun Fu},\n        booktitle={The Eleventh International Conference on Learning Representations},\n        year={2023},\n        url={https:\u002F\u002Fopenreview.net\u002Fforum?id=awnvqZja69}\n    }\n    \n\n## 致谢\n我们的实现主要基于以下代码库。我们衷心感谢这些作者的杰出工作。\n\n[pointMLP](https:\u002F\u002Fgithub.com\u002Fma-xu\u002FpointMLP-pytorch)、[poolformer](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fpoolformer)、[pytorch-image-models](https:\u002F\u002Fgithub.com\u002Frwightman\u002Fpytorch-image-models)、[mmdetection](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmdetection)、[mmsegmentation](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmsegmentation)。\n\n## 许可证\nContext Cluster的大部分内容采用[Apache License 2.0](https:\u002F\u002Fgithub.com\u002Fma-xu\u002FContext-Cluster\u002Fblob\u002Fmain\u002FLICENSE)授权。","# Context-Cluster 快速上手指南\n\nContext-Cluster (CoC) 是一种将图像视为点集进行聚类处理的创新视觉模型，发表于 ICLR 2023 (Oral)。本指南帮助开发者快速完成环境配置、模型验证及基础训练。\n\n## 1. 环境准备\n\n### 系统要求\n- **Python**: 建议 3.8+\n- **GPU**: 支持 CUDA 的 NVIDIA 显卡（训练建议多卡，如 8x GPU）\n- **数据集**: ImageNet (需按特定文件夹结构整理)\n\n### 依赖安装\n请确保已安装 PyTorch 和 torchvision，然后安装其他必要依赖。国内用户推荐使用清华或阿里镜像源加速安装。\n\n```bash\n# 基础依赖\npip install pyyaml timm==0.6.13 einops -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n\n# 可选：如需使用混合精度训练 (fp16)，请安装 apex\n# 注意：apex 需要从源码编译，且需匹配对应的 CUDA 版本\ngit clone https:\u002F\u002Fgithub.com\u002FNVIDIA\u002Fapex\ncd apex\npip install -v --disable-pip-version-check --no-cache-dir --global-option=\"--cpp_ext\" --global-option=\"--cuda_ext\" .\u002F\n```\n\n**核心依赖版本要求：**\n- `torch >= 1.7.0`\n- `torchvision >= 0.8.0`\n- `timm == 0.6.13`\n\n### 数据准备\nImageNet 数据集需整理为以下目录结构：\n```text\n│imagenet\u002F\n├──train\u002F\n│  ├── n01440764\n│  │   ├── n01440764_10026.JPEG\n│  │   └── ......\n├──val\u002F\n│  ├── n01440764\n│  │   ├── ILSVRC2012_val_00000293.JPEG\n│  │   └── ......\n```\n\n## 2. 安装步骤\n\n本项目无需复杂的 `setup.py` 安装过程，直接克隆仓库即可使用。\n\n```bash\n# 克隆项目代码\ngit clone https:\u002F\u002Fgithub.com\u002Fma-xu\u002FContext-Cluster.git\ncd Context-Cluster\n\n# 下载预训练模型\n# 访问官方 Google Drive 链接下载所需模型的 checkpoint 和 logs\n# Tiny 模型示例链接：https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F155Lfofxr7vpdcUxL8ZvzlrNX4cUlhn3J?usp=sharing\n# 将下载的 .pth 文件放置在项目根目录或指定路径\n```\n\n> **提示**：由于官方仓库托管在 GitHub 且模型在 Google Drive，国内用户若下载缓慢，可自行寻找国内镜像站或使用代理工具。\n\n## 3. 基本使用\n\n### 模型验证 (Validation)\n使用预训练权重在 ImageNet 验证集上评估模型性能。以下以 `coc_tiny` 模型为例：\n\n```bash\nMODEL=coc_tiny\n# 请将 \u002Fpath\u002Fto\u002Fimagenet 替换为实际数据路径，\u002Fpath\u002Fto\u002Fcheckpoint 替换为下载的权重文件路径\npython3 validate.py \u002Fpath\u002Fto\u002Fimagenet --model $MODEL -b 128 --checkpoint \u002Fpath\u002Fto\u002Fcheckpoint\n```\n\n### 模型训练 (Training)\n在 8 张 GPU 上启动训练。学习率与批次大小的关系为 `lr = bs \u002F 1024 * 1e-3`。以下示例假设总批次大小为 1024 (每张卡 128)，学习率设为 `1e-3`。\n\n```bash\nMODEL=coc_tiny\nDROP_PATH=0.1\n\n# 使用 torch.distributed.launch 启动多卡训练\n# --amp 表示启用自动混合精度训练以节省显存并加速\npython3 -m torch.distributed.launch --nproc_per_node=8 train.py \\\n    --data_dir \u002Fdev\u002Fshm\u002Fimagenet \\\n    --model $MODEL \\\n    -b 128 \\\n    --lr 1e-3 \\\n    --drop-path $DROP_PATH \\\n    --amp\n```\n\n### 聚类可视化 (Visualization)\n查看模型在特定阶段（stage）、模块（block）和头（head）的聚类效果。生成的图片将保存在 `images\u002Fcluster_vis\u002F{model}` 目录下。\n\n```bash\npython cluster_visualize.py \\\n    --image {path_to_image} \\\n    --model {model} \\\n    --checkpoint {path_to_checkpoint} \\\n    --stage {stage} \\\n    --block {block} \\\n    --head {head}\n```\n\n> **其他任务**：如需进行点云分类、目标检测或语义分割任务，请分别参考项目中的 `pointcloud\u002F`, `detection\u002F`, `segmentation\u002F` 文件夹。","某医疗影像初创公司的算法团队正致力于开发一套肺结节辅助诊断系统，需要在有限的标注数据下训练出高精度的图像分类模型。\n\n### 没有 Context-Cluster 时\n- **特征提取粗糙**：传统卷积神经网络（CNN）或标准 Vision Transformer 将图像视为固定网格，难以灵活捕捉肺结节边缘不规则、形态多变的细粒度特征。\n- **小样本表现不佳**：在医疗数据稀缺场景下，现有模型容易过拟合，导致对罕见类型结节的识别率（Top-1 Accuracy）停滞不前，无法满足临床筛查要求。\n- **计算资源浪费**：为了提升精度被迫堆叠更深的网络层数，导致显存占用高、推理速度慢，难以部署到医院的边缘计算设备上。\n\n### 使用 Context-Cluster 后\n- **动态点集聚类**：Context-Cluster 将图像重构为“点集”，通过动态聚类机制自适应地聚合相似像素，精准勾勒出结节的不规则轮廓与内部纹理。\n- **精度显著突破**：得益于其独特的集合表示学习，模型在少量数据微调后，肺结节良恶性分类的 Top-1 准确率提升了 3.5%，有效降低了漏诊风险。\n- **高效轻量部署**：同等参数量下，Context-Cluster 的吞吐量（Throughput）大幅提升，推理延迟降低 40%，成功实现在低算力终端上的实时辅助诊断。\n\nContext-Cluster 通过颠覆性的“图像即点集”范式，让模型在资源受限的小样本医疗场景中实现了精度与速度的双重飞跃。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fma-xu_Context-Cluster_85254ef4.png","ma-xu","Xu Ma","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fma-xu_ca73d474.jpg","Yasuo mid, or feed. FF15",null,"Northeastern University","https:\u002F\u002Fma-xu.github.io\u002F","https:\u002F\u002Fgithub.com\u002Fma-xu",[82,86],{"name":83,"color":84,"percentage":85},"Python","#3572A5",99.4,{"name":87,"color":88,"percentage":89},"Shell","#89e051",0.6,574,42,"2026-04-17T09:50:08","Apache-2.0",4,"未说明","需要 NVIDIA GPU（训练示例使用 8 卡），需安装 apex-amp 以支持 fp16，具体显存和 CUDA 版本未说明",{"notes":98,"python":95,"dependencies":99},"1. 训练部分展示了在 8 张 GPU 上运行的命令，使用了 torch.distributed.launch。2. 若需使用混合精度训练 (fp16)，必须安装 NVIDIA apex。3. 图像分类任务需准备 ImageNet 数据集并按特定文件夹结构存放。4. 项目还包含点云分类 (ScanObjectNN)、检测\u002F实例分割 (COCO) 和语义分割 (ADE20K) 任务的代码，分别位于对应子文件夹中。",[100,101,102,103,104,105],"torch>=1.7.0","torchvision>=0.8.0","pyyaml","timm==0.6.13","einops","apex",[15],"2026-03-27T02:49:30.150509","2026-04-18T16:27:23.555347",[110,115,120,125,130,135],{"id":111,"question_zh":112,"answer_zh":113,"source_url":114},40217,"如何可视化聚类结果（类似论文中的图 4）？","首先下载重新训练的模型检查点（例如 coc-tiny plain 版本），然后运行以下命令：\npython cluster_visualize.py --image {图片路径} --model {模型名称} --checkpoint {检查点路径} --stage {阶段} --block {块索引} --head {头索引}\n生成的图像将保存在 images\u002Fcluster_vis\u002F{模型名称} 文件夹中。\n注意：为了获得清晰的聚类效果，建议使用特定的参数组合，例如：--stage 0 --block 2 --head 0。大多数头的聚类结果并不清晰，这是正常现象。","https:\u002F\u002Fgithub.com\u002Fma-xu\u002FContext-Cluster\u002Fissues\u002F3",{"id":116,"question_zh":117,"answer_zh":118,"source_url":119},40218,"加载预训练模型时出现 'Unexpected key(s) in state_dict' 或无法加载的错误怎么办？","这通常是因为代码更新导致变量名不匹配。主要有两个修复方案：\n1. 下载维护者最新更新的检查点文件，新版本已修复了相关 bug（将 mask.sum 改为 sim.sum，并将 conv1x1 实现改为 Linear）。\n2. 如果必须使用旧代码或旧模型，可以手动修改 context_cluster.py 文件中 Cluster 类的变量名：将 self.f 改为 self.fc1，self.proj 改为 self.fc2，self.v 改为 self.fc_v。","https:\u002F\u002Fgithub.com\u002Fma-xu\u002FContext-Cluster\u002Fissues\u002F16",{"id":121,"question_zh":122,"answer_zh":123,"source_url":124},40219,"为什么无法复现示例文件夹中的可视化结果？","原始模型存在一个小 bug，且不同头的聚类清晰度差异很大。要复现类似论文的效果，请确保使用重新训练后的模型，并调整命令参数为：\npython cluster_visualize.py --image {图片路径} --model coc_tiny_plain --checkpoint model_best.pth.tar --stage 0 --block 2 --head 0\n在重训模型中，stage 0 block 2 head 0 能产生与论文非常相似的结果。其他大多数头的结果可能不够清晰。","https:\u002F\u002Fgithub.com\u002Fma-xu\u002FContext-Cluster\u002Fissues\u002F37",{"id":126,"question_zh":127,"answer_zh":128,"source_url":129},40220,"下载模型权重的链接失效了，在哪里可以获取最新的检查点？","维护者已更新所有检查点和 README 文件。请访问项目 README 中提供的最新链接下载。目前 Tiny 模型和 Small 模型（准确率 78.1%）已可用，Medium 模型将在训练完成后更新。如果遇到链接过期问题，请留意维护者在 Issue 中的最新回复以获取临时下载链接或等待仓库同步更新。","https:\u002F\u002Fgithub.com\u002Fma-xu\u002FContext-Cluster\u002Fissues\u002F33",{"id":131,"question_zh":132,"answer_zh":133,"source_url":134},40221,"代码中的 'mask' 变量是否对应公式中的 'C'？是否存在 Bug？","是的，这是一个已确认的小 Bug。代码中原本使用 'mask'（硬版本）来近似公式 Eq.1 中的 'C'，但正确的实现应使用 'sim'（软\u002F加权求和）。\n影响：该 Bug 不影响主要结论，但修复后性能略有提升（例如 coc-tiny 在 ImageNet1k 上从 71.8% 提升至 72.2%）。\n解决方案：请使用维护者重新训练并修复了该问题（将 mask.sum 改为 sim.sum）的最新代码和检查点。","https:\u002F\u002Fgithub.com\u002Fma-xu\u002FContext-Cluster\u002Fissues\u002F7",{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},40222,"最近更新的主要代码改进和模型更新有哪些？","最近的更新主要包含两点核心改进：\n1. 修复了一个 Bug：将计算中的 mask.sum 更正为 sim.sum，实现了更准确的软加权求和。\n2. 实现优化：将 conv1x1 操作替换为 Linear 层实现。\n这些更新带来了轻微的性能提升。建议用户拉取最新代码并使用新提供的检查点以获得最佳效果。","https:\u002F\u002Fgithub.com\u002Fma-xu\u002FContext-Cluster\u002Fissues\u002F20",[]]