[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-QUVA-Lab--escnn":3,"tool-QUVA-Lab--escnn":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 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[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":80,"owner_url":81,"languages":82,"stars":87,"forks":88,"last_commit_at":89,"license":90,"difficulty_score":23,"env_os":91,"env_gpu":92,"env_ram":91,"env_deps":93,"category_tags":99,"github_topics":100,"view_count":23,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":110,"updated_at":111,"faqs":112,"releases":142},2555,"QUVA-Lab\u002Fescnn","escnn","Equivariant Steerable CNNs Library for Pytorch https:\u002F\u002Fquva-lab.github.io\u002Fescnn\u002F","escnn 是一个基于 PyTorch 的开源扩展库，专为构建“等变可操纵卷积神经网络”而设计。作为 e2cnn 的升级版，它不再局限于平面几何变换，而是全面支持二维及三维空间中的平移、旋转和反射等所有等距变换，甚至提供了等变多层感知机（MLP）的实现。\n\n在传统深度学习中，模型往往需要大量数据才能学会识别不同角度的物体。escnn 通过数学原理将这种“旋转不变性”直接嵌入网络结构，确保输入图像发生旋转或翻转时，特征图也会随之进行对应的精确变换。这种机制让模型天生具备几何理解能力，显著减少了对训练数据的依赖，提升了小样本场景下的泛化效率和鲁棒性。\n\n该工具特别适合从事计算机视觉、医学影像分析、3D 点云处理等领域的研究人员与开发者。其核心技术亮点在于引入了“特征场”概念，用户只需定义标量场或矢量场等类型，即可利用 `R2conv` 和 `R3conv` 模块自动构建最通用的等变卷积层。此外，escnn 还配套了完整的非线性激活、批归一化等组件，并支持从像素网格到点云等多种数据形式，帮助专业人士高效搭建符合几何物理规律的先进 AI 模型。","\nE(n)-equivariant Steerable CNNs (*escnn*)\n--------------------------------------------------------------------------------\n\n*escnn* is a [PyTorch](https:\u002F\u002Fpytorch.org\u002F) extension for equivariant deep learning.\n*escnn* is the successor of the [e2cnn](\u003Chttps:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fe2cnn>) library, which only supported planar isometries.\nInstead, *escnn* supports steerable CNNs equivariant to both 2D and 3D isometries, as well as equivariant MLPs.\n\n\u003Cdiv align=\"center\">\n\u003Ctable>\n  \u003Ctbody>\n    \u003Ctr>\u003Ctd style=\"border: none\">\n        \u003Cb>\u003Ca href='https:\u002F\u002Fquva-lab.github.io\u002Fescnn\u002F' target='_blank'>&nbsp;\n            Documentation\u003C\u002Fa>&nbsp;\u003C\u002Fb>\n    \u003C\u002Ftd>\u003Ctd style=\"border: none\">\n        \u003Cb>\u003Ca href='https:\u002F\u002Fopenreview.net\u002Fforum?id=WE4qe9xlnQw' target='_blank'>&nbsp;\n            Paper ICLR 22\u003C\u002Fa>&nbsp;\u003C\u002Fb>\n    \u003C\u002Ftd>\u003Ctd style=\"border: none\">\n        \u003Cb>\u003Ca href='https:\u002F\u002Fgabri95.github.io\u002FThesis\u002Fthesis.pdf' target='_blank'>&nbsp;\n            MSc Thesis Gabriele\u003C\u002Fa>&nbsp;\u003C\u002Fb> \n    \u003C\u002Ftd>\u003Ctd style=\"border: none\">\n        \u003Cb>\u003Ca href='https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fe2cnn' target='_blank'>&nbsp;\n            e2cnn library\u003C\u002Fa>&nbsp;\u003C\u002Fb>\n    \u003C\u002Ftd>\u003C\u002Ftr>\n    \u003Ctr>\u003C\u002Ftr>\n    \u003Ctr>\u003Ctd style=\"border: none\">\n    \u003C\u002Ftd>\u003Ctd style=\"border: none\">\n        \u003Cb>\u003Ca href='https:\u002F\u002Farxiv.org\u002Fabs\u002F1911.08251' target='_blank'>&nbsp;\n            Paper NeurIPS 19\u003C\u002Fa>&nbsp;\u003C\u002Fb>\n    \u003C\u002Ftd>\u003Ctd style=\"border: none\">\n        \u003Cb>\u003Ca href='https:\u002F\u002Fmaurice-weiler.gitlab.io\u002F#cnn_book' target='_blank'>&nbsp;\n            PhD Thesis Maurice\u003C\u002Fa>&nbsp;\u003C\u002Fb>\n    \u003C\u002Ftd>\u003Ctd style=\"border: none\">\n        \u003Cb>\u003Ca href='https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fe2cnn_experiments' target='_blank'>&nbsp;\n            e2cnn experiments\u003C\u002Fa>&nbsp;\u003C\u002Fb>\n    \u003C\u002Ftd>\u003C\u002Ftr>\n  \u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003C\u002Fdiv>\n\nIf you prefer using Jax, check our this fork [escnn_jax](https:\u002F\u002Fgithub.com\u002Femilemathieu\u002Fescnn_jax) of our library!\n\n--------------------------------------------------------------------------------\n\n*Equivariant neural networks* guarantee a specified transformation behavior of their feature spaces under transformations of their input.\nFor instance, classical convolutional neural networks (*CNN*s) are by design equivariant to translations of their input.\nThis means that a translation of an image leads to a corresponding translation of the network's feature maps.\nThis package provides implementations of neural network modules which are equivariant under all *isometries* $\\mathrm{E}(2)$ of the image plane $\\mathbb{R}^2$ and all *isometries* $\\mathrm{E}(3)$ of the 3D space $\\mathbb{R}^3$, that is, under *translations*, *rotations* and *reflections* (and can, potentially, be extended to all isometries $\\mathrm{E}(n)$ of $\\mathbb{R}^n$).\nIn contrast to conventional CNNs, $\\mathrm{E}(n)$-equivariant models are guaranteed to generalize over such transformations, and are therefore more data efficient.\n\nThe feature spaces of $\\mathrm{E}(n)$-equivariant Steerable CNNs are defined as spaces of *feature fields*, being characterized by their transformation law under rotations and reflections.\nTypical examples are scalar fields (e.g. gray-scale images or temperature fields) or vector fields (e.g. optical flow or electromagnetic fields).\n\n![feature field examples](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FQUVA-Lab_escnn_readme_ff7315924f31.png)\n\nInstead of a number of channels, the user has to specify the field *types* and their *multiplicities* in order to define a feature space.\nGiven a specified input- and output feature space, our ``R2conv`` and ``R3conv`` modules instantiate the *most general* convolutional mapping between them.\nOur library provides many other equivariant operations to process feature fields, including nonlinearities, mappings to produce invariant features, batch normalization and dropout.\n\nIn theory, feature fields are defined on continuous space $\\mathbb{R}^n$.\nIn practice, they are either sampled on a *pixel grid* or given as a *point cloud*.\nescnn represents feature fields by ``GeometricTensor`` objects, which wrap a ``torch.Tensor`` with the corresponding transformation law.\nAll equivariant operations perform a dynamic type-checking in order to guarantee a geometrically sound processing of the feature fields.\n\n\nTo parameterize steerable kernel spaces, equivariant to an arbitrary compact group $G$,\nin our [paper](https:\u002F\u002Fopenreview.net\u002Fforum?id=WE4qe9xlnQw), we generalize the Wigner-Eckart theorem in\n[A Wigner-Eckart Theorem for Group Equivariant Convolution Kernels](https:\u002F\u002Farxiv.org\u002Fabs\u002F2010.10952)\nfrom $G$-homogeneous spaces to more general spaces $X$ carrying a $G$-action. \nIn short, our method leverages a $G$-steerable basis for unconstrained scalar filters over the whole Euclidean space $\\mathbb{R}^n$ to generate steerable kernel spaces with arbitrary input and output field *types*.\nFor example, the left side of the next image shows two elements of a $\\mathrm{SO}(2)$-steerable basis for functions on $\\mathbb{R}^2$ which are used to generate two basis elements for $\\mathrm{SO}(2)$-equivariant steerable kernels on the right.\nIn particular, the steerable kernels considered map a frequency $l=1$ vector field (2 channels) to a frequency $J=2$ \nvector field (2 channels).\n\n![we_theorem_example](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FQUVA-Lab_escnn_readme_6478c550f1c1.png)\n\n\n$\\mathrm{E}(n)$-Equivariant Steerable CNNs unify and generalize a wide range of isometry equivariant CNNs in one single framework.\nExamples include:\n- [Group Equivariant Convolutional Networks](https:\u002F\u002Farxiv.org\u002Fabs\u002F1602.07576)\n- [Harmonic Networks: Deep Translation and Rotation Equivariance](https:\u002F\u002Farxiv.org\u002Fabs\u002F1612.04642)\n- [Steerable CNNs](https:\u002F\u002Farxiv.org\u002Fabs\u002F1612.08498)\n- [Rotation equivariant vector field networks](https:\u002F\u002Farxiv.org\u002Fabs\u002F1612.09346)\n- [Learning Steerable Filters for Rotation Equivariant CNNs](https:\u002F\u002Farxiv.org\u002Fabs\u002F1711.07289)\n- [HexaConv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1803.02108)\n- [Roto-Translation Covariant Convolutional Networks for Medical Image Analysis](https:\u002F\u002Farxiv.org\u002Fabs\u002F1804.03393)\n- [3D Steerable CNNs](https:\u002F\u002Farxiv.org\u002Fabs\u002F1807.02547)\n- [Tensor Field Networks](https:\u002F\u002Farxiv.org\u002Fabs\u002F1802.08219)\n- [Cormorant: Covariant Molecular Neural Networks](https:\u002F\u002Farxiv.org\u002Fabs\u002F1906.04015)\n- [3D GCNNs for Pulmonary Nodule Detection](https:\u002F\u002Farxiv.org\u002Fabs\u002F1804.04656)\n\n\nFor more details, we refer to our ICLR 2022 paper [A Program to Build E(N)-Equivariant Steerable CNNs](https:\u002F\u002Fopenreview.net\u002Fforum?id=WE4qe9xlnQw)\nand our NeurIPS 2019 paper [General E(2)-Equivariant Steerable CNNs](https:\u002F\u002Farxiv.org\u002Fabs\u002F1911.08251).\n\n--------------------------------------------------------------------------------\n\nThe library is structured into four subpackages with different high-level features:\n\n| Component                                                                         | Description                                                      |\n|-----------------------------------------------------------------------------------|------------------------------------------------------------------|\n| [**escnn.group**](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Ftree\u002Fmaster\u002Fescnn\u002Fgroup\u002F)     | implements basic concepts of *group* and *representation* theory |\n| [**escnn.kernels**](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Ftree\u002Fmaster\u002Fescnn\u002Fkernels\u002F) | solves for spaces of equivariant convolution kernels             |\n| [**escnn.gspaces**](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Ftree\u002Fmaster\u002Fescnn\u002Fgspaces\u002F) | defines the Euclidean spaces and their symmetries                |\n| [**escnn.nn**](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Ftree\u002Fmaster\u002Fescnn\u002Fnn\u002F)           | contains equivariant modules to build deep neural networks       |\n--------------------------------------------------------------------------------------------------------------------------------------------------\n\n> **WARNING**:\n> **escnn.kernels** received major refactoring in version 1.0.0 and it is not compatible with previous versions of the library. These changes do not affect the interface provided in the rest of the library but, sometimes, the weights of a network trained with a previous version might not load correctly in a newly instantiated model.\n> We recommend using version [v0.1.9](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Ftree\u002Fv0.1.9) for backward compatibility.\n\n\n\n## Demo\n\nSince $\\mathrm{E}(2)$-steerable CNNs are equivariant under rotations and reflections, their inference is independent from the choice of image orientation.\nThe visualization below demonstrates this claim by feeding rotated images into a randomly initialized $\\mathrm{E}(2)$-steerable CNN (left).\nThe middle plot shows the equivariant transformation of a feature space, consisting of one scalar field (color-coded) and one vector field (arrows), after a few layers.\nIn the right plot we transform the feature space into a comoving reference frame by rotating the response fields back (stabilized view).\n\n![Equivariant CNN output](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FQUVA-Lab_escnn_readme_58c08b3fe9e4.gif)\n\nThe invariance of the features in the comoving frame validates the rotational equivariance of $\\mathrm{E}(2)$-steerable CNNs empirically.\nNote that the fluctuations of responses are discretization artifacts due to the sampling of the image on a pixel grid, which does not allow for exact continuous rotations.\n\u003C!-- Note that the fluctuations of responses are due to discretization artifacts coming from the  -->\n\nFor comparison, we show a feature map response of a conventional CNN for different image orientations below.\n\n![Conventional CNN output](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FQUVA-Lab_escnn_readme_91ade6bf5c60.gif)\n\nSince conventional CNNs are not equivariant under rotations, the response varies randomly with the image orientation.\nThis prevents CNNs from automatically generalizing learned patterns between different reference frames.\n\n\n## Experimental results\n\n$\\mathrm{E}(n)$-steerable convolutions can be used as a drop in replacement for the conventional convolutions used in CNNs.\nWhile using the same base architecture (with similar memory and computational cost), \nthis leads to significant performance boosts compared to CNN baselines (values are test accuracies in percent).\n\n| model        | Rotated ModelNet10 |\n|--------------|--------------------|\n| CNN baseline | 82.5       ± 1.4   |\n| SO(2)-CNN    | 86.9       ± 1.9   |\n| Octa-CNN     | 89.7       ± 0.6   |\n| Ico-CNN      | 90.0       ± 0.6   |\n| SO(3)-CNN    | 89.5       ± 1.0   |\n\nAll models share approximately the same architecture and width.\nFor more details we refer to our [paper](https:\u002F\u002Fopenreview.net\u002Fforum?id=WE4qe9xlnQw).\n\nThis library supports $\\mathrm{E}(2)$-steerable CNNs implemented in our previous [e2cnn](\u003Chttps:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fe2cnn>) library as a special case; \nwe include some representative results in the 2D setting from there:\n\n| model        | CIFAR-10                | CIFAR-100                | STL-10             |\n|--------------|-------------------------|--------------------------|--------------------|\n| CNN baseline | 2.6 &nbsp; ± 0.1 &nbsp; | 17.1 &nbsp; ± 0.3 &nbsp; | 12.74 ± 0.23       |\n| E(2)-CNN *   | 2.39       ± 0.11       | 15.55       ± 0.13       | 10.57 ± 0.70       |\n| E(2)-CNN     | 2.05       ± 0.03       | 14.30       ± 0.09       | &nbsp; 9.80 ± 0.40 |\n\nWhile using the same training setup (*no further hyperparameter tuning*) used for the CNN baselines, the equivariant models achieve significantly better results (values are test errors in percent).\nFor a fair comparison, the models without * are designed such that the number of parameters of the baseline is approximately preserved while models with * preserve the number of channels, and hence compute.\nFor more details we refer to our previous *e2cnn* [paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F1911.08251).\n\n\n## Getting Started\n\n*escnn* is easy to use since it provides a high level user interface which abstracts most intricacies of group and representation theory away.\nThe following code snippet shows how to perform an equivariant convolution from an RGB-image to 10 *regular* feature fields (corresponding to a\n[group convolution](https:\u002F\u002Farxiv.org\u002Fabs\u002F1602.07576)).\n\n```python3\nfrom escnn import gspaces                                          #  1\nfrom escnn import nn                                               #  2\nimport torch                                                       #  3\n                                                                   #  4\nr2_act = gspaces.rot2dOnR2(N=8)                                    #  5\nfeat_type_in  = nn.FieldType(r2_act,  3*[r2_act.trivial_repr])     #  6\nfeat_type_out = nn.FieldType(r2_act, 10*[r2_act.regular_repr])     #  7\n                                                                   #  8\nconv = nn.R2Conv(feat_type_in, feat_type_out, kernel_size=5)       #  9\nrelu = nn.ReLU(feat_type_out)                                      # 10\n                                                                   # 11\nx = torch.randn(16, 3, 32, 32)                                     # 12\nx = feat_type_in(x)                                                # 13\n                                                                   # 14\ny = relu(conv(x))                                                  # 15\n```\n\nLine 5 specifies the symmetry group action on the image plane $\\mathbb{R}^2$ under which the network should be equivariant.\nWe choose the \n[*cyclic group*](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FCyclic_group)\n $\\mathrm{C}_8$, which describes discrete rotations by multiples of $2\\pi\u002F8$.\nLine 6 specifies the input feature field types.\nThe three color channels of an RGB image are thereby to be identified as three independent scalar fields, which transform under the\n[*trivial representation*](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FTrivial_representation)\n of $\\mathrm{C}_8$ (when the input image is rotated, the RGB values do not change; compare the scalar and vector fields in the first image above).\nSimilarly, the output feature space in line 7 is specified to consist of 10 feature fields which transform under the\n[*regular representation*](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FRegular_representation)\nof $\\mathrm{C}_8$.\nThe $\\mathrm{C}_8$-equivariant convolution is then instantiated by passing the input and output type as well as the kernel size to the constructor (line 9).\nLine 10 instantiates an equivariant ReLU nonlinearity which will operate on the output field and is therefore passed the output field type.\n\nLines 12 and 13 generate a random minibatch of RGB images and wrap them into a `nn.GeometricTensor` to associate them\nwith their correct field type `feat_type_in`.\nThe equivariant modules process the geometric tensor in line 15.\nEach module is thereby checking whether the geometric tensor passed to them satisfies the expected transformation law.\n\nBecause the parameters do not need to be updated anymore at test time, after training, any equivariant network can be \nconverted into a pure PyTorch model with no additional computational overhead in comparison to conventional CNNs.\nThe code currently supports the automatic conversion of a few commonly used modules through the `.export()` method; \ncheck the [documentation](https:\u002F\u002Fquva-lab.github.io\u002Fescnn\u002Fapi\u002Fescnn.nn.html) for more details.\n\nTo get started, we provide some examples and tutorials:\n- The [introductory tutorial](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Fblob\u002Fmaster\u002Fexamples\u002Fintroduction.ipynb) introduces the basic functionality of the library.\n- A second [tutorial](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Fblob\u002Fmaster\u002Fexamples\u002Fmodel.ipynb) goes through building and training\nan equivariant model on the rotated MNIST dataset.\n- Note that *escnn* also supports equivariant MLPs; see [these examples](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Fblob\u002Fmaster\u002Fexamples\u002Fmlp.ipynb).\n- Check also the [tutorial](https:\u002F\u002Fuvadlc-notebooks.readthedocs.io\u002Fen\u002Flatest\u002Ftutorial_notebooks\u002FDL2\u002FGeometric_deep_learning\u002Ftutorial2_steerable_cnns.html) on Steerable CNNs using our library in the *Deep Learning 2* course at the University of Amsterdam.\n\nMore complex 2D equivariant *Wide Resnet* models are implemented in [e2wrn.py](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Fblob\u002Fmaster\u002Fexamples\u002Fe2wrn.py).\nTo try a model which is equivariant under reflections call:\n```\ncd examples\npython e2wrn.py\n```\nA version of the same model which is simultaneously equivariant under reflections and rotations of angles multiple of 90 degrees can be run via:\n```\npython e2wrn.py --rot90\n```\nYou can find more examples in the [example](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Ftree\u002Fmaster\u002Fexamples) folder.\nFor instance, [se3_3Dcnn.py](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Fblob\u002Fmaster\u002Fexamples\u002Fse3_3Dcnn.py) implements a 3D CNN equivariant to\nrotations and translations in 3D. You can try it with\n```\ncd examples\npython se3_3Dcnn.py\n```\n\n## Useful material to learn about Equivariance and Steerable CNNs\n\nIf you want to better understand the theory behind equivariant and steerable neural networks, you can check these references:\n- Erik Bekkers' [lectures](https:\u002F\u002Fuvagedl.github.io\u002F) on *Geometric Deep Learning* at in the Deep Learning 2 course at the University of Amsterdam\n- The course material also includes a [tutorial](https:\u002F\u002Fuvadlc-notebooks.readthedocs.io\u002Fen\u002Flatest\u002Ftutorial_notebooks\u002FDL2\u002FGeometric_deep_learning\u002Ftutorial1_regular_group_convolutions.html) on *group convolution* and [another](https:\u002F\u002Fuvadlc-notebooks.readthedocs.io\u002Fen\u002Flatest\u002Ftutorial_notebooks\u002FDL2\u002FGeometric_deep_learning\u002Ftutorial2_steerable_cnns.html) about Steerable CNNs, using *this library*.\n- Gabriele's [MSc thesis](https:\u002F\u002Fgabri95.github.io\u002FThesis\u002Fthesis.pdf) provides a brief overview of the essential mathematical ingredients needed to understand Steerable CNNs.\n- Maurice's [PhD thesis](https:\u002F\u002Fmaurice-weiler.gitlab.io\u002F#cnn_book) develops the representation theory of steerable CNNs, deriving the most prominent layers and explaining the gauge theoretic viewpoint.\n- The [slides](https:\u002F\u002Fpeople.cmm.minesparis.psl.eu\u002Fusers\u002Fvelasco\u002FCesa.pdf) and the [recording](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=FUNAh24DEN4&ab_channel=CalistaWorkshopParis2024) from Gabriele's talk can be useful to understand steerable convolution and how the steerable filters are derived, and include some recent advances on this research topics.\n- Lars Veefkind's [MSc thesis](https:\u002F\u002Fuvagedl.github.io\u002FLearning_the_Degree_of_Equivariance_for_Steerable_CNNs_fixed_typo_compressed.pdf) covers group theory, representation theory and steerable convolution in a very clear way; in particular, it also includes a novel *constructive and intuitive derivation of steerable filters*. \n\n## Dependencies\n\nThe library is based on Python3.7\n\n```\ntorch>=1.3\nnumpy\nscipy\nlie_learn\njoblib\npy3nj\n```\nOptional:\n```\ntorch-geometric\npymanopt>=1.0.0\nautograd\n```\n\n> **WARNING**: `py3nj` enables a fast computation of Clebsh Gordan coefficients.\nIf this package is not installed, our library relies on a numerical method to estimate them.\nThis numerical method is not guaranteed to return the same coefficients computed by `py3nj` (they can differ by a sign).\nFor this reason, models built with and without `py3nj` might not be compatible.\n\n> To successfully install `py3nj` you may need a Fortran compiler installed in you environment.\n\n## Installation\n\nYou can install the latest [release](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Freleases) as\n\n```\npip install escnn\n```\n\nor you can clone this repository and manually install it with\n```\npip install git+https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\n```\n\n\n## Contributing\n\nWould you like to contribute to **escnn**? That's great!\n\nThen, check the instructions in [CONTRIBUTING.md](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) and help us to\nimprove the library!\n\n\nDo you have any doubts? Do you have some idea you would like to discuss? \nFeel free to open a new thread under in [Discussions](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Fdiscussions)!\n\n## Cite\n\nThe development of this library was part of the work done for our papers\n[A Program to Build E(N)-Equivariant Steerable CNNs](https:\u002F\u002Fopenreview.net\u002Fforum?id=WE4qe9xlnQw)\nand [General E(2)-Equivariant Steerable CNNs](https:\u002F\u002Farxiv.org\u002Fabs\u002F1911.08251).\nPlease cite these works if you use our code:\n\n```\n\n   @inproceedings{cesa2022a,\n        title={A Program to Build {E(N)}-Equivariant Steerable {CNN}s },\n        author={Gabriele Cesa and Leon Lang and Maurice Weiler},\n        booktitle={International Conference on Learning Representations},\n        year={2022},\n        url={https:\u002F\u002Fopenreview.net\u002Fforum?id=WE4qe9xlnQw}\n    }\n    \n   @inproceedings{e2cnn,\n       title={{General E(2)-Equivariant Steerable CNNs}},\n       author={Weiler, Maurice and Cesa, Gabriele},\n       booktitle={Conference on Neural Information Processing Systems (NeurIPS)},\n       year={2019},\n       url={https:\u002F\u002Farxiv.org\u002Fabs\u002F1911.08251}\n   }\n```\n\nFeel free to [contact us](mailto:cesa.gabriele@gmail.com,m.weiler.ml@gmail.com).\n\n## License\n\n*escnn* is distributed under BSD Clear license. See LICENSE file.\n","E(n)等变可导向CNNs (*escnn*)\n--------------------------------------------------------------------------------\n\n*escnn* 是一个用于等变深度学习的 [PyTorch](https:\u002F\u002Fpytorch.org\u002F) 扩展。\n*escnn* 是 [e2cnn](\u003Chttps:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fe2cnn>) 库的后继者，后者仅支持平面等距变换。\n相比之下，*escnn* 支持对 2D 和 3D 等距变换都具有等变性的可导向 CNN，以及等变的 MLP。\n\n\u003Cdiv align=\"center\">\n\u003Ctable>\n  \u003Ctbody>\n    \u003Ctr>\u003Ctd style=\"border: none\">\n        \u003Cb>\u003Ca href='https:\u002F\u002Fquva-lab.github.io\u002Fescnn\u002F' target='_blank'>&nbsp;\n            文档\u003C\u002Fa>&nbsp;\u003C\u002Fb>\n    \u003C\u002Ftd>\u003Ctd style=\"border: none\">\n        \u003Cb>\u003Ca href='https:\u002F\u002Fopenreview.net\u002Fforum?id=WE4qe9xlnQw' target='_blank'>&nbsp;\n            ICLR 22 论文\u003C\u002Fa>&nbsp;\u003C\u002Fb>\n    \u003C\u002Ftd>\u003Ctd style=\"border: none\">\n        \u003Cb>\u003Ca href='https:\u002F\u002Fgabri95.github.io\u002FThesis\u002Fthesis.pdf' target='_blank'>&nbsp;\n            加布里埃莱硕士论文\u003C\u002Fa>&nbsp;\u003C\u002Fb> \n    \u003C\u002Ftd>\u003Ctd style=\"border: none\">\n        \u003Cb>\u003Ca href='https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fe2cnn' target='_blank'>&nbsp;\n            e2cnn 库\u003C\u002Fa>&nbsp;\u003C\u002Fb>\n    \u003C\u002Ftd>\u003C\u002Ftr>\n    \u003Ctr>\u003C\u002Ftr>\n    \u003Ctr>\u003Ctd style=\"border: none\">\n    \u003C\u002Ftd>\u003Ctd style=\"border: none\">\n        \u003Cb>\u003Ca href='https:\u002F\u002Farxiv.org\u002Fabs\u002F1911.08251' target='_blank'>&nbsp;\n            NeurIPS 19 论文\u003C\u002Fa>&nbsp;\u003C\u002Fb>\n    \u003C\u002Ftd>\u003Ctd style=\"border: none\">\n        \u003Cb>\u003Ca href='https:\u002F\u002Fmaurice-weiler.gitlab.io\u002F#cnn_book' target='_blank'>&nbsp;\n            莫里斯博士论文\u003C\u002Fa>&nbsp;\u003C\u002Fb>\n    \u003C\u002Ftd>\u003Ctd style=\"border: none\">\n        \u003Cb>\u003Ca href='https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fe2cnn_experiments' target='_blank'>&nbsp;\n            e2cnn 实验\u003C\u002Fa>&nbsp;\u003C\u002Fb>\n    \u003C\u002Ftd>\u003C\u002Ftr>\n  \u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003C\u002Fdiv>\n\n如果您更喜欢使用 Jax，请查看我们库的这个分支 [escnn_jax](https:\u002F\u002Fgithub.com\u002Femilemathieu\u002Fescnn_jax)！\n\n--------------------------------------------------------------------------------\n\n*等变神经网络* 保证其特征空间在输入发生变换时表现出特定的变换行为。\n例如，经典的卷积神经网络（CNN）在设计上对其输入的平移具有等变性。\n这意味着图像的平移会导致网络特征图的相应平移。\n本包提供了在图像平面 \\(\\mathbb{R}^2\\) 的所有 *等距变换* \\(\\mathrm{E}(2)\\) 以及 3D 空间 \\(\\mathbb{R}^3\\) 的所有 *等距变换* \\(\\mathrm{E}(3)\\) 下——即在 *平移*、*旋转* 和 *反射* 下——具有等变性的神经网络模块实现（并且理论上可以扩展到 \\(\\mathbb{R}^n\\) 的所有等距变换 \\(\\mathrm{E}(n)\\)）。\n与传统 CNN 不同，\\(\\mathrm{E}(n)\\) 等变模型能够保证在这些变换上的泛化能力，因此数据效率更高。\n\n\\(\\mathrm{E}(n)\\) 等变可导向 CNN 的特征空间被定义为 *特征场* 空间，其特点是由它们在旋转和反射下的变换规律所决定。\n典型的例子包括标量场（如灰度图像或温度场）或矢量场（如光流或电磁场）。\n\n![特征场示例](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FQUVA-Lab_escnn_readme_ff7315924f31.png)\n\n用户无需指定通道数，而是需要通过指定场的 *类型* 和它们的 *重数* 来定义特征空间。\n给定指定的输入和输出特征空间，我们的 ``R2conv`` 和 ``R3conv`` 模块会实例化两者之间最一般的卷积映射。\n我们的库还提供了许多其他等变操作来处理特征场，包括非线性层、生成不变特征的映射、批归一化和丢弃层。\n\n理论上，特征场定义在连续空间 \\(\\mathbb{R}^n\\) 上。\n实际上，它们要么被采样在 *像素网格* 上，要么以 *点云* 的形式给出。\nescnn 使用 ``GeometricTensor`` 对象来表示特征场，这些对象将一个 ``torch.Tensor`` 包装起来，并附加相应的变换规律。\n所有等变操作都会进行动态类型检查，以确保对特征场的几何处理是合理的。\n\n\n为了参数化对任意紧致群 \\(G\\) 具有等变性的可导向核空间，\n我们在 [论文](https:\u002F\u002Fopenreview.net\u002Fforum?id=WE4qe9xlnQw) 中，在 [Group Equivariant Convolution Kernels 的 Wigner-Eckart 定理](https:\u002F\u002Farxiv.org\u002Fabs\u002F2010.10952) 的基础上，将该定理从 \\(G\\)-齐次空间推广到了承载 \\(G\\)-作用的一般空间 \\(X\\)。\n简而言之，我们的方法利用一个 \\(G\\)-可导向基底，针对整个欧几里得空间 \\(\\mathbb{R}^n\\) 上的无约束标量滤波器，生成具有任意输入和输出场 *类型* 的可导向核空间。\n例如，下图左侧展示了两个 \\(\\mathrm{SO}(2)\\)-可导向基底元素，它们用于定义 \\(\\mathbb{R}^2\\) 上的函数，进而生成右侧两个 \\(\\mathrm{SO}(2)\\)-等变可导向核的基底元素。\n具体来说，这些可导向核将一个频率 \\(l=1\\) 的矢量场（2 个通道）映射到一个频率 \\(J=2\\) 的矢量场（2 个通道）。\n\n![we_theorem_example](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FQUVA-Lab_escnn_readme_6478c550f1c1.png)\n\n\n\\(\\mathrm{E}(n)\\) 等变可导向 CNN 将一系列等距变换等变的 CNN 统一并推广到一个单一框架中。\n示例包括：\n- [Group Equivariant Convolutional Networks](https:\u002F\u002Farxiv.org\u002Fabs\u002F1602.07576)\n- [Harmonic Networks: Deep Translation and Rotation Equivariance](https:\u002F\u002Farxiv.org\u002Fabs\u002F1612.04642)\n- [Steerable CNNs](https:\u002F\u002Farxiv.org\u002Fabs\u002F1612.08498)\n- [Rotation equivariant vector field networks](https:\u002F\u002Farxiv.org\u002Fabs\u002F1612.09346)\n- [Learning Steerable Filters for Rotation Equivariant CNNs](https:\u002F\u002Farxiv.org\u002Fabs\u002F1711.07289)\n- [HexaConv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1803.02108)\n- [Roto-Translation Covariant Convolutional Networks for Medical Image Analysis](https:\u002F\u002Farxiv.org\u002Fabs\u002F1804.03393)\n- [3D Steerable CNNs](https:\u002F\u002Farxiv.org\u002Fabs\u002F1807.02547)\n- [Tensor Field Networks](https:\u002F\u002Farxiv.org\u002Fabs\u002F1802.08219)\n- [Cormorant: Covariant Molecular Neural Networks](https:\u002F\u002Farxiv.org\u002Fabs\u002F1906.04015)\n- [3D GCNNs for Pulmonary Nodule Detection](https:\u002F\u002Farxiv.org\u002Fabs\u002F1804.04656)\n\n\n更多细节请参阅我们在 ICLR 2022 发表的论文 [A Program to Build E(N)-Equivariant Steerable CNNs](https:\u002F\u002Fopenreview.net\u002Fforum?id=WE4qe9xlnQw) 以及我们在 NeurIPS 2019 发表的论文 [General E(2)-Equivariant Steerable CNNs](https:\u002F\u002Farxiv.org\u002Fabs\u002F1911.08251)。\n\n--------------------------------------------------------------------------------\n\n该库由四个子包组成，每个子包具有不同的高级功能：\n\n| 组件                                                                         | 描述                                                      |\n|-----------------------------------------------------------------------------------|------------------------------------------------------------------|\n| [**escnn.group**](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Ftree\u002Fmaster\u002Fescnn\u002Fgroup\u002F)     | 实现了*群*和*表示论*的基本概念 |\n| [**escnn.kernels**](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Ftree\u002Fmaster\u002Fescnn\u002Fkernels\u002F) | 求解等变卷积核空间             |\n| [**escnn.gspaces**](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Ftree\u002Fmaster\u002Fescnn\u002Fgspaces\u002F) | 定义欧几里得空间及其对称性     |\n| [**escnn.nn**](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Ftree\u002Fmaster\u002Fescnn\u002Fnn\u002F)           | 包含用于构建深度神经网络的等变模块       |\n--------------------------------------------------------------------------------------------------------------------------------------------------\n\n> **警告**：\n> **escnn.kernels** 在 1.0.0 版本中进行了重大重构，与库的旧版本不兼容。这些更改不会影响库其他部分提供的接口，但有时使用旧版本训练的网络权重可能无法正确加载到新实例化的模型中。\n> 为了向后兼容，我们建议使用 [v0.1.9](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Ftree\u002Fv0.1.9) 版本。\n\n\n\n\n\n## 演示\n\n由于 $\\mathrm{E}(2)$-可导向 CNN 对旋转和反射具有等变性，因此其推理结果与图像方向的选择无关。\n下面的可视化演示了这一特性：我们将旋转后的图像输入到一个随机初始化的 $\\mathrm{E}(2)$-可导向 CNN 中（左图）。\n中间的图表展示了经过几层网络后，由一个标量场（颜色编码）和一个矢量场（箭头）组成的特征空间的等变变换。\n在右图中，我们通过将响应场反向旋转，将其转换为随动参考系（稳定视图）。\n\n![等变 CNN 输出](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FQUVA-Lab_escnn_readme_58c08b3fe9e4.gif)\n\n在随动参考系中特征的不变性从实验上验证了 $\\mathrm{E}(2)$-可导向 CNN 的旋转等变性。\n请注意，响应的波动是由于图像在像素网格上的采样导致的离散化误差，这使得精确的连续旋转无法实现。\n\u003C!-- 注意，响应的波动是由来自  -->\n\n作为对比，我们展示了传统 CNN 在不同图像方向下的特征图响应：\n\n![传统 CNN 输出](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FQUVA-Lab_escnn_readme_91ade6bf5c60.gif)\n\n由于传统 CNN 不具备旋转等变性，其响应会随着图像方向的变化而随机变化。这阻碍了 CNN 自动地在不同参考系之间泛化已学习的模式。\n\n\n## 实验结果\n\n$\\mathrm{E}(n)$-可导向卷积可以作为 CNN 中传统卷积的直接替代品。\n在使用相同基础架构（内存和计算成本相近）的情况下，\n与 CNN 基线相比，性能得到了显著提升（数值为测试准确率，单位：%）。\n\n| 模型        | 旋转后的 ModelNet10 |\n|--------------|--------------------|\n| CNN 基线 | 82.5       ± 1.4   |\n| SO(2)-CNN    | 86.9       ± 1.9   |\n| Octa-CNN     | 89.7       ± 0.6   |\n| Ico-CNN      | 90.0       ± 0.6   |\n| SO(3)-CNN    | 89.5       ± 1.0   |\n\n所有模型的架构和宽度大致相同。\n更多细节请参阅我们的[论文](https:\u002F\u002Fopenreview.net\u002Fforum?id=WE4qe9xlnQw)。\n\n本库支持我们在先前的 [e2cnn](\u003Chttps:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fe2cnn>) 库中实现的 $\\mathrm{E}(2)$-可导向 CNN 作为特例；\n我们在此列出了一些来自那里的二维场景中的代表性结果：\n\n| 模型        | CIFAR-10                | CIFAR-100                | STL-10             |\n|--------------|-------------------------|--------------------------|--------------------|\n| CNN 基线 | 2.6 &nbsp; ± 0.1 &nbsp; | 17.1 &nbsp; ± 0.3 &nbsp; | 12.74 ± 0.23       |\n| E(2)-CNN *   | 2.39       ± 0.11       | 15.55       ± 0.13       | 10.57 ± 0.70       |\n| E(2)-CNN     | 2.05       ± 0.03       | 14.30       ± 0.09       | &nbsp; 9.80 ± 0.40 |\n\n在采用与 CNN 基线相同的训练设置（*未进行额外的超参数调优*）的情况下，等变模型取得了显著更好的结果（数值为测试错误率，单位：%）。\n为了公平比较，未带 * 号的模型设计时尽量保持与基线模型参数数量相近，而带 * 号的模型则保留了通道数，从而保证计算量相当。\n更多详情请参阅我们之前的 *e2cnn* [论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F1911.08251)。\n\n## 入门\n\n*escnn* 使用起来非常方便，因为它提供了一个高层次的用户界面，将群论和表示论中的大部分复杂细节都抽象掉了。\n下面的代码片段展示了如何从一张 RGB 图像执行到 10 个 *正则* 特征场的等变卷积（对应于\n[群卷积](https:\u002F\u002Farxiv.org\u002Fabs\u002F1602.07576)）。\n\n```python3\nfrom escnn import gspaces                                          #  1\nfrom escnn import nn                                               #  2\nimport torch                                                       #  3\n                                                                   #  4\nr2_act = gspaces.rot2dOnR2(N=8)                                    #  5\nfeat_type_in  = nn.FieldType(r2_act,  3*[r2_act.trivial_repr])     #  6\nfeat_type_out = nn.FieldType(r2_act, 10*[r2_act.regular_repr])     #  7\n                                                                   #  8\nconv = nn.R2Conv(feat_type_in, feat_type_out, kernel_size=5)       #  9\nrelu = nn.ReLU(feat_type_out)                                      # 10\n                                                                   # 11\nx = torch.randn(16, 3, 32, 32)                                     # 12\nx = feat_type_in(x)                                                # 13\n                                                                   # 14\ny = relu(conv(x))                                                  # 15\n```\n\n第 5 行指定了网络应保持等变性的图像平面 $\\mathbb{R}^2$ 上的对称群作用。\n我们选择了\n[*循环群*](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FCyclic_group)\n $\\mathrm{C}_8$，它描述了以 $2\\pi\u002F8$ 的倍数进行的离散旋转。\n第 6 行指定了输入特征场的类型。\nRGB 图像的三个颜色通道被识别为三个独立的标量场，它们按照 $\\mathrm{C}_8$ 的\n[*平凡表示*](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FTrivial_representation)\n进行变换（当输入图像旋转时，RGB 值不会改变；可参考上方第一张图中的标量场和向量场）。\n类似地，第 7 行中指定的输出特征空间由 10 个按照 $\\mathrm{C}_8$ 的\n[*正则表示*](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FRegular_representation)\n进行变换的特征场组成。\n然后通过将输入和输出类型以及卷积核大小传递给构造函数来实例化 $\\mathrm{C}_8$-等变卷积（第 9 行）。\n第 10 行实例化了一个作用于输出场的等变 ReLU 非线性层，因此传入了输出场的类型。\n\n第 12 和 13 行生成了一个随机的 RGB 图像小批量，并将其包装成一个 `nn.GeometricTensor`，以便将其与正确的场类型 `feat_type_in` 关联起来。\n等变模块在第 15 行处理该几何张量。\n每个模块都会检查传入的几何张量是否满足预期的变换规律。\n\n由于在测试时不再需要更新参数，训练完成后，任何等变网络都可以转换为纯 PyTorch 模型，且与传统 CNN 相比没有任何额外的计算开销。\n目前，代码支持通过 `.export()` 方法自动转换一些常用的模块；更多详细信息请参阅\n[文档](https:\u002F\u002Fquva-lab.github.io\u002Fescnn\u002Fapi\u002Fescnn.nn.html)。\n\n为了帮助您入门，我们提供了一些示例和教程：\n- [入门教程](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Fblob\u002Fmaster\u002Fexamples\u002Fintroduction.ipynb) 介绍了该库的基本功能。\n- 第二个 [教程](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Fblob\u002Fmaster\u002Fexamples\u002Fmodel.ipynb) 讲述了如何在旋转后的 MNIST 数据集上构建并训练一个等变模型。\n- 请注意，*escnn* 也支持等变 MLP；请参阅 [这些示例](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Fblob\u002Fmaster\u002Fexamples\u002Fmlp.ipynb)。\n- 此外，请查看阿姆斯特丹大学 *深度学习 2* 课程中使用本库的关于可导向 CNN 的 [教程](https:\u002F\u002Fuvadlc-notebooks.readthedocs.io\u002Fen\u002Flatest\u002Ftutorial_notebooks\u002FDL2\u002FGeometric_deep_learning\u002Ftutorial2_steerable_cnns.html)。\n\n更复杂的 2D 等变 *Wide Resnet* 模型已在 [e2wrn.py](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Fblob\u002Fmaster\u002Fexamples\u002Fe2wrn.py) 中实现。\n要尝试一个在反射下等变的模型，请运行：\n```\ncd examples\npython e2wrn.py\n```\n而同时在反射和 90 度整数倍旋转下等变的同一模型版本，则可通过以下命令运行：\n```\npython e2wrn.py --rot90\n```\n您可以在 [examples](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Ftree\u002Fmaster\u002Fexamples) 文件夹中找到更多示例。\n例如，[se3_3Dcnn.py](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Fblob\u002Fmaster\u002Fexamples\u002Fse3_3Dcnn.py) 实现了一个在 3D 空间中对旋转和平移等变的 3D CNN。您可以尝试运行：\n```\ncd examples\npython se3_3Dcnn.py\n```\n\n## 学习等变性和可导向 CNN 的有用资料\n\n如果您想更好地理解等变和可导向神经网络背后的理论，可以查阅以下参考资料：\n- Erik Bekkers 在阿姆斯特丹大学 *深度学习 2* 课程中关于 *几何深度学习* 的 [讲座](https:\u002F\u002Fuvagedl.github.io\u002F)。\n- 该课程的教材还包括一个关于 *群卷积* 的 [教程](https:\u002F\u002Fuvadlc-notebooks.readthedocs.io\u002Fen\u002Flatest\u002Ftutorial_notebooks\u002FDL2\u002FGeometric_deep_learning\u002Ftutorial1_regular_group_convolutions.html)，以及另一个使用 *本库* 讲解可导向 CNN 的 [教程](https:\u002F\u002Fuvadlc-notebooks.readthedocs.io\u002Fen\u002Flatest\u002Ftutorial_notebooks\u002FDL2\u002FGeometric_deep_learning\u002Ftutorial2_steerable_cnns.html)。\n- Gabriele 的 [硕士论文](https:\u002F\u002Fgabri95.github.io\u002FThesis\u002Fthesis.pdf) 简要概述了理解可导向 CNN 所需的关键数学知识。\n- Maurice 的 [博士论文](https:\u002F\u002Fmaurice-weiler.gitlab.io\u002F#cnn_book) 发展了可导向 CNN 的表示理论，推导出其中最主要的几层，并解释了规范场论的观点。\n- Gabriele 演讲的 [幻灯片](https:\u002F\u002Fpeople.cmm.minesparis.psl.eu\u002Fusers\u002Fvelasco\u002FCesa.pdf) 和 [录像](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=FUNAh24DEN4&ab_channel=CalistaWorkshopParis2024) 对理解可导向卷积及其滤波器的推导过程非常有帮助，并包含了该研究领域的最新进展。\n- Lars Veefkind 的 [硕士论文](https:\u002F\u002Fuvagedl.github.io\u002FLearning_the_Degree_of_Equivariance_for_Steerable_CNNs_fixed_typo_compressed.pdf) 以非常清晰的方式涵盖了群论、表示论和可导向卷积；特别是，其中还包含了一种新颖的 *可导向滤波器的构造性和直观推导方法*。\n\n## 依赖项\n\n该库基于 Python 3.7。\n\n```\ntorch>=1.3\nnumpy\nscipy\nlie_learn\njoblib\npy3nj\n```\n\n可选依赖：\n```\ntorch-geometric\npymanopt>=1.0.0\nautograd\n```\n\n> **警告**：`py3nj` 提供了快速计算 Clebsch-Gordan 系数的功能。如果未安装此包，我们的库将依赖数值方法来估计这些系数。这种数值方法不能保证返回与 `py3nj` 计算得到的相同系数（它们可能仅相差一个符号）。因此，使用和不使用 `py3nj` 构建的模型可能不兼容。\n\n> 要成功安装 `py3nj`，您可能需要在环境中安装 Fortran 编译器。\n\n## 安装\n\n您可以安装最新的 [release](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Freleases)：\n\n```\npip install escnn\n```\n\n或者您可以克隆此仓库并手动安装：\n\n```\npip install git+https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\n```\n\n\n## 贡献\n\n您想为 **escnn** 做出贡献吗？太好了！\n\n请查看 [CONTRIBUTING.md](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) 中的说明，帮助我们改进这个库！\n\n\n您有任何疑问吗？或者有一些想法想要讨论吗？欢迎在 [Discussions](https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Fdiscussions) 中开启新话题！\n\n## 引用\n\n本库的开发是我们论文工作的一部分，包括\n[A Program to Build E(N)-Equivariant Steerable CNNs](https:\u002F\u002Fopenreview.net\u002Fforum?id=WE4qe9xlnQw)\n和 [General E(2)-Equivariant Steerable CNNs](https:\u002F\u002Farxiv.org\u002Fabs\u002F1911.08251)。\n如果您使用我们的代码，请引用以下文献：\n\n```\n\n   @inproceedings{cesa2022a,\n        title={A Program to Build {E(N)}-Equivariant Steerable {CNN}s },\n        author={Gabriele Cesa and Leon Lang and Maurice Weiler},\n        booktitle={International Conference on Learning Representations},\n        year={2022},\n        url={https:\u002F\u002Fopenreview.net\u002Fforum?id=WE4qe9xlnQw}\n    }\n    \n   @inproceedings{e2cnn,\n       title={{General E(2)-Equivariant Steerable CNNs}},\n       author={Weiler, Maurice and Cesa, Gabriele},\n       booktitle={Conference on Neural Information Processing Systems (NeurIPS)},\n       year={2019},\n       url={https:\u002F\u002Farxiv.org\u002Fabs\u002F1911.08251}\n   }\n```\n\n欢迎随时 [联系我们](mailto:cesa.gabriele@gmail.com,m.weiler.ml@gmail.com)。\n\n## 许可证\n\n*escnn* 采用 BSD Clear 许可证进行分发。详情请参阅 LICENSE 文件。","# escnn 快速上手指南\n\n`escnn` 是一个基于 PyTorch 的扩展库，用于构建等变深度学习模型。它支持 2D 和 3D 空间中的等距变换（平移、旋转、反射），是 `e2cnn` 库的后继版本。通过使用 `escnn`，开发者可以构建在几何变换下具有严格数学保证的神经网络，从而显著提高数据效率和泛化能力。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux, macOS 或 Windows\n*   **Python**: 3.7 或更高版本\n*   **核心依赖**:\n    *   [PyTorch](https:\u002F\u002Fpytorch.org\u002F) (推荐最新稳定版)\n    *   `numpy`\n    *   `scipy`\n\n**注意**：`escnn` 强依赖于 PyTorch。请先根据您的 CUDA 版本安装合适的 PyTorch。\n\n## 安装步骤\n\n### 1. 安装 PyTorch (如未安装)\n访问 [PyTorch 官网](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F) 获取适合您环境的安装命令。\n*国内用户推荐使用清华或中科大镜像源加速安装：*\n```bash\npip install torch torchvision torchaudio --index-url https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n### 2. 安装 escnn\n您可以直接通过 pip 从 PyPI 安装最新版本：\n\n```bash\npip install escnn\n```\n\n*如果下载速度较慢，可指定国内镜像源：*\n```bash\npip install escnn -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n或者，如果您需要最新的功能（包含尚未发布的修复），可以从 GitHub 源码安装：\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn.git\n```\n\n## 基本使用\n\n`escnn` 提供了高级接口，抽象了群论和表示理论的复杂性。核心概念是使用 `GeometricTensor` 来包装数据，并指定特征场的类型（Type）和重数（Multiplicity）。\n\n以下是最简单的示例，展示如何创建一个支持 2D 旋转和平移等变性的卷积层，并对一个 RGB 图像进行前向传播。\n\n### 代码示例：构建 E(2) 等变卷积网络\n\n```python\nimport torch\nimport escnn\nfrom escnn import gspaces, nn\n\n# 1. 定义几何空间\n# 这里我们定义一个 2D 平面空间，具有旋转和平移对称性 (E(2))\nr2_space = gspaces.rot2dOnR2(N=8)  # N=8 表示离散化为 8 个旋转角度\n\n# 2. 定义输入和输出特征场类型\n# 输入：RGB 图像，视为标量场 (标量在旋转下不变)，通道数为 3\n# triv 表示平凡表示 (标量)\ninput_type = r2_space.trivial_repr * 3 \n\n# 输出：定义一些更复杂的特征场，例如 4 个标量场和 4 个向量场 (频率为 1)\n# r2_space.irreps(1) 表示频率为 1 的不可约表示 (类似向量)\noutput_type = (r2_space.trivial_repr * 4) + (r2_space.irreps(1) * 4)\n\n# 3. 创建等变卷积层\n# in_type 和 out_type 必须基于同一个几何空间定义\nconv = nn.R2Conv(in_type=input_type, out_type=output_type, kernel_size=3, padding=1)\n\n# 4. 准备输入数据\n# 假设输入是一个 batch size 为 2 的 RGB 图像 (2, 3, 32, 32)\ninput_tensor = torch.randn(2, 3, 32, 32)\n\n# 5. 将普通 Tensor 包装为 GeometricTensor\n# 这一步告诉网络输入数据的几何属性（这里是标量场）\ninput_geotensor = escnn.GeometricTensor(input_tensor, input_type)\n\n# 6. 前向传播\noutput_geotensor = conv(input_geotensor)\n\n# 7. 获取结果\n# 输出仍然是一个 GeometricTensor，包含变换后的特征场\nprint(f\"输入形状：{input_geotensor.tensor.shape}\")\nprint(f\"输出形状：{output_geotensor.tensor.shape}\")\nprint(f\"输出类型：{output_geotensor.type}\")\n\n# 如果需要将其转换回普通 Tensor 用于后续非等变操作或损失计算\noutput_tensor = output_geotensor.tensor\n```\n\n### 关键点说明\n*   **gspaces**: 用于定义空间对称性（如 `rot2dOnR2` 用于 2D 旋转，`rot3dOnR3` 用于 3D 旋转）。\n*   **GeometricTensor**: 核心数据结构，它将 `torch.Tensor` 与其变换规则（Type）绑定，确保运算的几何正确性。\n*   **R2Conv \u002F R3Conv**: 自动根据输入和输出的类型，计算出最通用的等变卷积核。\n*   **类型系统**: 不再仅仅指定“通道数”，而是指定“场类型”（如标量、向量、高阶张量场）及其数量。\n\n通过以上步骤，您即可快速构建具有旋转和平移等变性的神经网络模块。更多复杂的非线性激活函数、池化层和批归一化操作可在 `escnn.nn` 模块中找到。","某医疗影像初创团队正在开发一套自动分析 3D 肺部 CT 扫描的 AI 系统，旨在检测不同体位下的微小肿瘤结节。\n\n### 没有 escnn 时\n- **数据依赖严重**：由于传统 CNN 无法天然理解旋转不变性，团队必须对同一份 CT 数据进行大量人工旋转增强（如翻转、多角度旋转），导致训练数据量膨胀数倍，存储与预处理成本高昂。\n- **泛化能力不足**：当患者扫描姿势发生非标准倾斜时，模型往往将熟悉的病灶误判为背景，因为其特征提取器未能适应空间几何变换，漏诊率显著上升。\n- **模型冗余低效**：为了强行让网络“记住”各种角度的特征，不得不堆叠更深的网络层数和更多的通道数，导致显存占用高企，推理速度难以满足临床实时性要求。\n\n### 使用 escnn 后\n- **数据效率飞跃**：利用 escnn 构建的 E(3)-等变卷积网络，天生具备对 3D 旋转和平移的数学一致性，无需额外数据增强即可覆盖所有空间姿态，训练数据集缩减了 70%。\n- **鲁棒性显著提升**：无论患者以何种角度躺入扫描仪，escnn 都能保证特征图随输入同步变换，确保肿瘤结节在任何视角下都被稳定识别，大幅降低了漏诊风险。\n- **架构轻量精准**：通过定义标量场和向量场等几何特征类型，escnn 用更少的参数实现了更强的几何表达能力，模型体积缩小一半的同时，推理延迟降低了 40%。\n\nescnn 通过将几何对称性直接嵌入神经网络底层，用数学确定性取代了暴力数据增强，让 3D 医疗影像分析更高效、更可靠。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FQUVA-Lab_escnn_43a9dccf.png","QUVA-Lab","QUVA Deep Vision Lab","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FQUVA-Lab_67957d14.png","",null,"https:\u002F\u002Fivi.fnwi.uva.nl\u002Fquva\u002F","https:\u002F\u002Fgithub.com\u002FQUVA-Lab",[83],{"name":84,"color":85,"percentage":86},"Python","#3572A5",100,514,61,"2026-04-02T23:46:18","NOASSERTION","未说明","未说明 (作为 PyTorch 扩展，支持 CPU 和 GPU，具体取决于 PyTorch 环境配置)",{"notes":94,"python":91,"dependencies":95},"该工具是 PyTorch 的扩展库，用于构建等变深度学习模型。README 中未明确列出具体的版本要求或硬件门槛，通常意味着它依赖于用户已安装的 PyTorch 环境（支持 CPU 或 CUDA）。注意：版本 1.0.0 对内核模块进行了重大重构，可能与旧版本训练的模型权重不兼容，如需向后兼容建议使用 v0.1.9 版本。",[96,97,98],"torch","numpy","scipy",[13],[101,102,103,104,105,106,107,108,109],"deep-learning","equivariance","isometries","pytorch","symmetries","rotations","geometric-deep-learning","geometry","invariant","2026-03-27T02:49:30.150509","2026-04-06T08:17:40.122534",[113,118,123,128,133,138],{"id":114,"question_zh":115,"answer_zh":116,"source_url":117},11809,"如何解决 'No module named lie_learn.representations.SO3.irrep_bases' 的导入错误？","该错误通常由 Python 版本不兼容或依赖项安装问题引起。解决方案包括：\n1. 尝试使用 Python 3.7 或 3.9 版本（避免使用 Python 3.11）。\n2. 在 Google Colab 等环境中，运行以下命令直接安装最新版本的依赖：\n   !pip install git+https:\u002F\u002Fgithub.com\u002FAMLab-Amsterdam\u002Flie_learn escnn\n3. 确保安装了正确版本的 lie_learn 包，或者修改 setup.py 以指定兼容版本。","https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Fissues\u002F24",{"id":119,"question_zh":120,"answer_zh":121,"source_url":122},11810,"使用 octahedral CNN 示例时遇到 pymanopt 版本兼容性错误怎么办？","这是由于 pymanopt API 变更导致的兼容性问题。维护者已确认该问题并正在修复。临时解决方案是应用社区提交的 Pull Request #33，该补丁修复了与当前 pymanopt 版本的兼容性。如果您使用的是 escnn v1.0.4 且遇到此错误，请等待官方更新或手动应用该补丁代码。","https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Fissues\u002F29",{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},11811,"SO(3) 群的标准表示（standard_representation）与一阶不可约表示（irreps[1]）为什么矩阵不同？","这是正常的，两者之间相差一个坐标轴的排列（permutation of axis）。标准表示和 irreps[1] 虽然数学上等价，但基向量的顺序不同。如果您需要在基础空间 R^3 中生成向量，务必明确指定类型为 `standard_representation` 而不是 `irreps[1]`，以避免坐标轴错位。","https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Fissues\u002F58",{"id":129,"question_zh":130,"answer_zh":131,"source_url":132},11812,"在 O(2)-equivariant 模型中，点式非线性（point-wise non-linearities）如何影响特征混合？","特征混合仅发生在使用点式或傅里叶非线性（point-wise \u002F Fourier non-linearities）时。范数非线性（Norm-nonlinearities，如 norm-ReLU）独立作用于每个场，因此不会导致不同分量之间的混合。如果您只对标量场使用 ReLU，对向量场使用 norm-ReLU，即使存在非线性层，模型仍可能表现出对 O(2) 的不变性，因为未发生混合。","https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Fissues\u002F19",{"id":134,"question_zh":135,"answer_zh":136,"source_url":137},11813,"训练全卷积网络时，如何处理输出标签以保持等变性并使用 BCELoss？","不要直接将标签转换为 GeometricTensor，这会导致 BCELoss 报错（缺少 'numel' 属性）。也不应直接提取输出张量（.tensor），这会破坏模型的等变性。正确的做法是保持输出为 GeometricTensor 格式，但在计算损失前，确保标签也是同类型的几何张量，或者使用支持几何张量的损失函数包装器。如果必须使用标准 BCELoss，需小心处理维度匹配，同时注意直接在输出上调用 .tensor 会切断梯度传播中的等变约束。","https:\u002F\u002Fgithub.com\u002FQUVA-Lab\u002Fescnn\u002Fissues\u002F4",{"id":139,"question_zh":140,"answer_zh":141,"source_url":132},11814,"如何从球谐系数输入中推断 O(2) 群的翻转（flip）操作？","若要通过输出两个可操纵向量来推断翻转和旋转，需注意翻转轴的定义。限制不可约表示为 (0., 1.) 并不总是将翻转轴固定为 X 轴。实践中，如果输入沿任意轴翻转，输出向量未必沿 X 轴翻转。建议检查所使用的非线性类型：若使用了导致混合的非线性，可能会干扰翻转轴的识别。对于纯旋转，该方法有效；对于翻转，需验证基向量定义及非线性层是否破坏了预期的对称性映射。",[]]