[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-InterDigitalInc--CompressAI":3,"tool-InterDigitalInc--CompressAI":61},[4,18,26,36,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},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 真正成长为懂上",153609,2,"2026-04-13T11:34:59",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"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",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":76,"owner_twitter":76,"owner_website":76,"owner_url":77,"languages":78,"stars":102,"forks":103,"last_commit_at":104,"license":105,"difficulty_score":32,"env_os":106,"env_gpu":107,"env_ram":108,"env_deps":109,"category_tags":116,"github_topics":117,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":125,"updated_at":126,"faqs":127,"releases":157},7250,"InterDigitalInc\u002FCompressAI","CompressAI","A PyTorch library and evaluation platform for end-to-end compression research","CompressAI 是一个基于 PyTorch 构建的开源库与评估平台，专为端到端数据压缩研究而设计。它主要解决了传统图像和视频压缩算法在深度学习时代难以灵活实验、对比和复现的痛点，为研究人员提供了一套标准化的工具链。\n\n这款工具非常适合从事多媒体压缩算法研究的科研人员、深度学习开发者以及希望探索新一代编码技术的学生使用。通过 CompressAI，用户可以轻松访问基于深度学习的自定义操作层、模型架构，甚至直接调用预训练好的端到端压缩模型。其独特亮点在于不仅部分移植了 TensorFlow Compression 的核心功能，还内置了专业的评估脚本，能够公平地对比“学习型”压缩模型与传统编解码器（如 JPEG、H.264 等）在率失真性能上的差异。\n\n此外，CompressAI 提供了从数据加载、模型训练到多 GPU 分布式加速的完整示例代码，支持用户快速搭建自己的训练流水线或开发创新模型。无论是想要复现前沿论文成果，还是试图优化特定场景下的压缩效率，CompressAI 都能以友好的接口和完善的文档，帮助用户高效地开展研究工作。","\u003C!-- ![ID-CompressAI-logo](assets\u002FID-compressAI-logo-750x140.svg =750x140) -->\n\u003Ca href=\"url\">\u003Cimg src=\"docs\u002Fsource\u002F_static\u002Flogo.svg\" align=\"center\">\u003C\u002Fa>\n\n[![License](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002FInterDigitalInc\u002FCompressAI?color=blue)](https:\u002F\u002Fgithub.com\u002FInterDigitalInc\u002FCompressAI\u002Fblob\u002Fmaster\u002FLICENSE)\n[![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fcompressai?color=brightgreen)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fcompressai\u002F)\n[![Downloads](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FInterDigitalInc_CompressAI_readme_4a81fc74760c.png)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fcompressai\u002F#files)\n\nCompressAI (_compress-ay_) is a PyTorch library and evaluation platform for\nend-to-end compression research.\n\nCompressAI currently provides:\n\n* custom operations, layers and models for deep learning based data compression\n* a partial port of the official [TensorFlow compression](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Fcompression) library\n* pre-trained end-to-end compression models for learned image compression\n* evaluation scripts to compare learned models against classical image\u002Fvideo\n  compression codecs\n\n![PSNR performances plot on Kodak](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FInterDigitalInc_CompressAI_readme_e0d3b0a76ea1.png)\n\n\n> **Note**: Multi-GPU support is now experimental.\n\n## Installation\n\nCompressAI supports python 3.8+ and PyTorch 1.7+.\n\n**pip**:\n\n```bash\npip install compressai\n```\n\n> **Note**: wheels are available for Linux and MacOS.\n\n**From source**:\n\nA C++17 compiler, a recent version of pip (19.0+), and common python packages\nare also required (see `setup.py` for the full list).\n\nTo get started locally and install the development version of CompressAI, run\nthe following commands in a [virtual environment](https:\u002F\u002Fdocs.python.org\u002F3.6\u002Flibrary\u002Fvenv.html):\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FInterDigitalInc\u002FCompressAI compressai\ncd compressai\npip install -U pip && pip install -e .\n```\n\nFor a custom installation, you can also run one of the following commands:\n* `pip install -e '.[dev]'`: install the packages required for development (testing, linting, docs)\n* `pip install -e '.[tutorials]'`: install the packages required for the tutorials (notebooks)\n\n> **Note**: Docker images will be released in the future. Conda environments are not\nofficially supported.\n\n## Documentation\n\n* [Installation](https:\u002F\u002Finterdigitalinc.github.io\u002FCompressAI\u002Finstallation.html)\n* [CompressAI API](https:\u002F\u002Finterdigitalinc.github.io\u002FCompressAI\u002F)\n* [Training your own model](https:\u002F\u002Finterdigitalinc.github.io\u002FCompressAI\u002Ftutorials\u002Ftutorial_train.html)\n* [List of available models (model zoo)](https:\u002F\u002Finterdigitalinc.github.io\u002FCompressAI\u002Fzoo.html)\n\n## Usage\n\n### Examples\n\nScript and notebook examples can be found in the `examples\u002F` directory.\n\nTo encode\u002Fdecode images with the provided pre-trained models, run the\n`codec.py` example:\n\n```bash\npython3 examples\u002Fcodec.py --help\n```\n\nAn examplary training script with a rate-distortion loss is provided in\n`examples\u002Ftrain.py`. You can replace the model used in the training script\nwith your own model implemented within CompressAI, and then run the script for a\nsimple training pipeline:\n\n```bash\npython3 examples\u002Ftrain.py -d \u002Fpath\u002Fto\u002Fmy\u002Fimage\u002Fdataset\u002F --epochs 300 -lr 1e-4 --batch-size 16 --cuda --save\n```\n\nTo run the same training script on 2 GPUs with Distributed Data Parallel, use\n`torchrun`:\n\n```bash\nCUDA_VISIBLE_DEVICES=0,1 torchrun --standalone --nproc_per_node=2 examples\u002Ftrain.py -d \u002Fpath\u002Fto\u002Fmy\u002Fimage\u002Fdataset\u002F --epochs 300 -lr 1e-4 --batch-size 16 --cuda --save\n```\n\n> **Note:** `--batch-size` is per process, so the effective global batch size is\n> `2 x --batch-size` when using 2 GPUs.\n\n> **Note:** the training example uses a custom [ImageFolder](https:\u002F\u002Finterdigitalinc.github.io\u002FCompressAI\u002Fdatasets.html#imagefolder) structure.\n\nFor video training, `examples\u002Ftrain_video.py` can be launched the same way:\n\n```bash\nCUDA_VISIBLE_DEVICES=0,1 torchrun --standalone --nproc_per_node=2 examples\u002Ftrain_video.py -d \u002Fpath\u002Fto\u002Fmy\u002Fvideo\u002Fdataset\u002F --epochs 300 -lr 1e-4 --batch-size 16 --cuda --save\n```\n\n> **Note:** for `examples\u002Ftrain_video.py`, `--batch-size` is also per process, so\n> the effective global batch size is `2 x --batch-size` when using 2 GPUs.\n\nA jupyter notebook illustrating the usage of a pre-trained model for learned image\ncompression is also provided in the `examples` directory:\n\n```bash\npip install -U ipython jupyter ipywidgets matplotlib\njupyter notebook examples\u002F\n```\n\n### Evaluation\n\nTo evaluate a trained model on your own dataset, CompressAI provides an\nevaluation script:\n\n```bash\npython3 -m compressai.utils.eval_model checkpoint \u002Fpath\u002Fto\u002Fimages\u002Ffolder\u002F -a $ARCH -p $MODEL_CHECKPOINT...\n```\n\nTo evaluate provided pre-trained models:\n\n```bash\npython3 -m compressai.utils.eval_model pretrained \u002Fpath\u002Fto\u002Fimages\u002Ffolder\u002F -a $ARCH -q $QUALITY_LEVELS...\n```\n\nTo plot results from bench\u002Feval_model simulations (requires matplotlib by default):\n\n```bash\npython3 -m compressai.utils.plot --help\n```\n\nTo evaluate traditional codecs:\n\n```bash\npython3 -m compressai.utils.bench --help\npython3 -m compressai.utils.bench bpg --help\npython3 -m compressai.utils.bench vtm --help\n```\n\nFor video, similar tests can be run, CompressAI only includes ssf2020 for now:\n\n```bash\npython3 -m compressai.utils.video.eval_model checkpoint \u002Fpath\u002Fto\u002Fvideo\u002Ffolder\u002F -a ssf2020 -p $MODEL_CHECKPOINT...\npython3 -m compressai.utils.video.eval_model pretrained \u002Fpath\u002Fto\u002Fvideo\u002Ffolder\u002F -a ssf2020 -q $QUALITY_LEVELS...\npython3 -m compressai.utils.video.bench x265 --help\npython3 -m compressai.utils.video.bench VTM --help\npython3 -m compressai.utils.video.plot --help\n```\n\n## Tests\n\nRun tests with `pytest`:\n\n```bash\npytest -sx --cov=compressai --cov-append --cov-report term-missing tests\n```\n\nSlow tests can be skipped with the `-m \"not slow\"` option.\n\n\n## License\n\nCompressAI is licensed under the BSD 3-Clause Clear License\n\n## Contributing\n\nWe welcome feedback and contributions. Please open a GitHub issue to report\nbugs, request enhancements or if you have any questions.\n\nBefore contributing, please read the CONTRIBUTING.md file.\n\n## Authors\n\n* Jean Bégaint, Fabien Racapé, Simon Feltman and Hyomin Choi, InterDigital AI Lab.\n\n## Citation\n\nIf you use this project, please cite the relevant original publications for the\nmodels and datasets, and cite this project as:\n\n```\n@article{begaint2020compressai,\n\ttitle={CompressAI: a PyTorch library and evaluation platform for end-to-end compression research},\n\tauthor={B{\\'e}gaint, Jean and Racap{\\'e}, Fabien and Feltman, Simon and Pushparaja, Akshay},\n\tyear={2020},\n\tjournal={arXiv preprint arXiv:2011.03029},\n}\n```\n\nFor any work related to the variable bitrate models, please cite\n```\n@article{kamisli2024dcc_vbrlic,\n\ttitle={Variable-Rate Learned Image Compression with Multi-Objective Optimization and Quantization-Reconstruction Offsets},\n\tauthor={Kamisli, Fatih and Racap{\\'e}, Fabien and Choi, Hyomin},\n\tyear={2024},\n\tbooktitle={2024 Data Compression Conference (DCC)},\n\teprint={2402.18930},\n}\n```\n\n## Related links\n * Tensorflow compression library by _Ballé et al._: https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Fcompression\n * Range Asymmetric Numeral System code from _Fabian 'ryg' Giesen_: https:\u002F\u002Fgithub.com\u002Frygorous\u002Fryg_rans\n * BPG image format by _Fabrice Bellard_: https:\u002F\u002Fbellard.org\u002Fbpg\n * HEVC HM reference software: https:\u002F\u002Fhevc.hhi.fraunhofer.de\n * VVC VTM reference software: https:\u002F\u002Fvcgit.hhi.fraunhofer.de\u002Fjvet\u002FVVCSoftware_VTM\n * AOM AV1 reference software: https:\u002F\u002Faomedia.googlesource.com\u002Faom\n * Z. Cheng et al. 2020: https:\u002F\u002Fgithub.com\u002FZhengxueCheng\u002FLearned-Image-Compression-with-GMM-and-Attention\n * Kodak image dataset: http:\u002F\u002Fr0k.us\u002Fgraphics\u002Fkodak\u002F\n","\u003C!-- ![ID-CompressAI-logo](assets\u002FID-compressAI-logo-750x140.svg =750x140) -->\n\u003Ca href=\"url\">\u003Cimg src=\"docs\u002Fsource\u002F_static\u002Flogo.svg\" align=\"center\">\u003C\u002Fa>\n\n[![许可证](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002FInterDigitalInc\u002FCompressAI?color=blue)](https:\u002F\u002Fgithub.com\u002FInterDigitalInc\u002FCompressAI\u002Fblob\u002Fmaster\u002FLICENSE)\n[![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fcompressai?color=brightgreen)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fcompressai\u002F)\n[![下载量](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FInterDigitalInc_CompressAI_readme_4a81fc74760c.png)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fcompressai\u002F#files)\n\nCompressAI (_compress-ay_) 是一个用于端到端压缩研究的 PyTorch 库和评估平台。\n\n目前，CompressAI 提供：\n\n* 用于基于深度学习的数据压缩的自定义操作、层和模型\n* 官方 [TensorFlow compression](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Fcompression) 库的部分移植\n* 预训练的端到端压缩模型，用于学习型图像压缩\n* 用于将学习型模型与经典图像\u002F视频压缩编解码器进行比较的评估脚本\n\n![Kodak 数据集上的 PSNR 性能图](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FInterDigitalInc_CompressAI_readme_e0d3b0a76ea1.png)\n\n\n> **注意**：多 GPU 支持目前仍处于实验阶段。\n\n## 安装\n\nCompressAI 支持 Python 3.8 及以上版本和 PyTorch 1.7 及以上版本。\n\n**通过 pip**：\n\n```bash\npip install compressai\n```\n\n> **注意**：适用于 Linux 和 macOS 的预编译二进制包已提供。\n\n**从源代码安装**：\n\n还需要 C++17 编译器、较新版本的 pip（19.0 及以上）以及常见的 Python 包（完整列表请参见 `setup.py` 文件）。\n\n要在本地开始使用并安装 CompressAI 的开发版本，请在 [虚拟环境](https:\u002F\u002Fdocs.python.org\u002F3.6\u002Flibrary\u002Fvenv.html) 中运行以下命令：\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FInterDigitalInc\u002FCompressAI compressai\ncd compressai\npip install -U pip && pip install -e .\n```\n\n对于自定义安装，您还可以运行以下命令之一：\n* `pip install -e '.[dev]'`：安装开发所需的包（测试、代码风格检查、文档等）\n* `pip install -e '.[tutorials]'`：安装教程所需的包（Notebook 等）\n\n> **注意**：未来将发布 Docker 镜像。Conda 环境目前未被官方支持。\n\n## 文档\n\n* [安装指南](https:\u002F\u002Finterdigitalinc.github.io\u002FCompressAI\u002Finstallation.html)\n* [CompressAI API](https:\u002F\u002Finterdigitalinc.github.io\u002FCompressAI\u002F)\n* [训练您自己的模型](https:\u002F\u002Finterdigitalinc.github.io\u002FCompressAI\u002Ftutorials\u002Ftutorial_train.html)\n* [可用模型列表（模型库）](https:\u002F\u002Finterdigitalinc.github.io\u002FCompressAI\u002Fzoo.html)\n\n## 使用\n\n### 示例\n\n脚本和 Notebook 示例可在 `examples\u002F` 目录中找到。\n\n要使用提供的预训练模型对图像进行编码\u002F解码，请运行 `codec.py` 示例：\n\n```bash\npython3 examples\u002Fcodec.py --help\n```\n\n`examples\u002Ftrain.py` 中提供了一个使用率失真损失的示例训练脚本。您可以将该脚本中使用的模型替换为您在 CompressAI 中实现的自定义模型，然后运行该脚本来完成一个简单的训练流程：\n\n```bash\npython3 examples\u002Ftrain.py -d \u002Fpath\u002Fto\u002Fmy\u002Fimage\u002Fdataset\u002F --epochs 300 -lr 1e-4 --batch-size 16 --cuda --save\n```\n\n要在 2 个 GPU 上使用分布式数据并行运行相同的训练脚本，请使用 `torchrun`：\n\n```bash\nCUDA_VISIBLE_DEVICES=0,1 torchrun --standalone --nproc_per_node=2 examples\u002Ftrain.py -d \u002Fpath\u002Fto\u002Fmy\u002Fimage\u002Fdataset\u002F --epochs 300 -lr 1e-4 --batch-size 16 --cuda --save\n```\n\n> **注意**：`--batch-size` 是每个进程的批次大小，因此在使用 2 个 GPU 时，实际的全局批次大小为 `2 x --batch-size`。\n\n> **注意**：该训练示例使用了自定义的 [ImageFolder](https:\u002F\u002Finterdigitalinc.github.io\u002FCompressAI\u002Fdatasets.html#imagefolder) 数据结构。\n\n对于视频训练，可以以相同的方式启动 `examples\u002Ftrain_video.py`：\n\n```bash\nCUDA_VISIBLE_DEVICES=0,1 torchrun --standalone --nproc_per_node=2 examples\u002Ftrain_video.py -d \u002Fpath\u002Fto\u002Fmy\u002Fvideo\u002Fdataset\u002F --epochs 300 -lr 1e-4 --batch-size 16 --cuda --save\n```\n\n> **注意**：对于 `examples\u002Ftrain_video.py`，`--batch-size` 同样是每个进程的批次大小，因此在使用 2 个 GPU 时，实际的全局批次大小为 `2 x --batch-size`。\n\n`examples` 目录中还提供了一个 Jupyter Notebook，演示如何使用预训练模型进行学习型图像压缩：\n\n```bash\npip install -U ipython jupyter ipywidgets matplotlib\njupyter notebook examples\u002F\n```\n\n### 评估\n\n要对您自己的数据集上的训练模型进行评估，CompressAI 提供了一个评估脚本：\n\n```bash\npython3 -m compressai.utils.eval_model checkpoint \u002Fpath\u002Fto\u002Fimages\u002Ffolder\u002F -a $ARCH -p $MODEL_CHECKPOINT...\n```\n\n要评估提供的预训练模型：\n\n```bash\npython3 -m compressai.utils.eval_model pretrained \u002Fpath\u002Fto\u002Fimages\u002Ffolder\u002F -a $ARCH -q $QUALITY_LEVELS...\n```\n\n要绘制 bench\u002Feval_model 模拟的结果（默认需要 matplotlib）：\n\n```bash\npython3 -m compressai.utils.plot --help\n```\n\n要评估传统编解码器：\n\n```bash\npython3 -m compressai.utils.bench --help\npython3 -m compressai.utils.bench bpg --help\npython3 -m compressai.utils.bench vtm --help\n```\n\n对于视频，也可以进行类似的测试，目前 CompressAI 仅包含 ssf2020：\n\n```bash\npython3 -m compressai.utils.video.eval_model checkpoint \u002Fpath\u002Fto\u002Fvideo\u002Ffolder\u002F -a ssf2020 -p $MODEL_CHECKPOINT...\npython3 -m compressai.utils.video.eval_model pretrained \u002Fpath\u002Fto\u002Fvideo\u002Ffolder\u002F -a ssf2020 -q $QUALITY_LEVELS...\npython3 -m compressai.utils.video.bench x265 --help\npython3 -m compressai.utils.video.bench VTM --help\npython3 -m compressai.utils.video.plot --help\n```\n\n## 测试\n\n使用 `pytest` 运行测试：\n\n```bash\npytest -sx --cov=compressai --cov-append --cov-report term-missing tests\n```\n\n可以通过 `-m \"not slow\"` 选项跳过耗时的测试。\n\n\n## 许可证\n\nCompressAI 采用 BSD 3-Clause Clear License 许可。\n\n## 贡献\n\n我们欢迎反馈和贡献。如需报告 bug、请求功能增强或有任何疑问，请在 GitHub 上提交 issue。\n\n在贡献之前，请阅读 CONTRIBUTING.md 文件。\n\n## 作者\n\n* Jean Bégaint、Fabien Racapé、Simon Feltman 和 Hyomin Choi，InterDigital AI 实验室。\n\n## 引用\n\n如果您使用本项目，请引用相关模型和数据集的原始论文，并按以下格式引用本项目：\n\n```\n@article{begaint2020compressai,\n\ttitle={CompressAI: a PyTorch library and evaluation platform for end-to-end compression research},\n\tauthor={B{\\'e}gaint, Jean and Racap{\\'e}, Fabien and Feltman, Simon and Pushparaja, Akshay},\n\tyear={2020},\n\tjournal={arXiv preprint arXiv:2011.03029},\n}\n```\n\n对于与可变比特率模型相关的任何工作，请引用：\n\n```\n@article{kamisli2024dcc_vbrlic,\n\ttitle={Variable-Rate Learned Image Compression with Multi-Objective Optimization and Quantization-Reconstruction Offsets},\n\tauthor={Kamisli, Fatih and Racap{\\'e}, Fabien and Choi, Hyomin},\n\tyear={2024},\n\tbooktitle={2024 Data Compression Conference (DCC)},\n\teprint={2402.18930},\n}\n```\n\n## 相关链接\n * _Ballé 等人_ 的 TensorFlow 压缩库：https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Fcompression\n * _Fabian 'ryg' Giesen_ 的范围非对称数制编码：https:\u002F\u002Fgithub.com\u002Frygorous\u002Fryg_rans\n * _Fabrice Bellard_ 的 BPG 图像格式：https:\u002F\u002Fbellard.org\u002Fbpg\n * HEVC HM 参考软件：https:\u002F\u002Fhevc.hhi.fraunhofer.de\n * VVC VTM 参考软件：https:\u002F\u002Fvcgit.hhi.fraunhofer.de\u002Fjvet\u002FVVCSoftware_VTM\n * AOM AV1 参考软件：https:\u002F\u002Faomedia.googlesource.com\u002Faom\n * Z. Cheng 等人，2020 年：https:\u002F\u002Fgithub.com\u002FZhengxueCheng\u002FLearned-Image-Compression-with-GMM-and-Attention\n * 柯达图像数据集：http:\u002F\u002Fr0k.us\u002Fgraphics\u002Fkodak\u002F","# CompressAI 快速上手指南\n\nCompressAI 是一个基于 PyTorch 的端到端压缩研究与评估平台，提供深度学习数据压缩所需的自定义操作、层、模型以及预训练模型。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**：Linux 或 MacOS（官方提供 wheel 包支持）。\n*   **Python 版本**：3.8 及以上。\n*   **PyTorch 版本**：1.7 及以上。\n*   **编译器**：若从源码安装，需要支持 C++17 的编译器。\n*   **其他依赖**：较新版本的 pip (19.0+)。\n\n> **注意**：目前多 GPU 支持处于实验阶段；Conda 环境非官方支持。\n\n## 安装步骤\n\n### 方式一：使用 pip 安装（推荐）\n\n这是最简单的安装方式，适用于大多数用户。\n\n```bash\npip install compressai\n```\n\n> **提示**：国内用户如遇下载缓慢，可添加清华或阿里镜像源加速：\n> `pip install compressai -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`\n\n### 方式二：从源码安装（开发版）\n\n如果您需要修改源码或参与开发，建议使用虚拟环境进行安装：\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FInterDigitalInc\u002FCompressAI compressai\ncd compressai\npip install -U pip && pip install -e .\n```\n\n如需安装开发工具链（测试、文档等）或教程依赖（Notebook），可分别运行：\n*   `pip install -e '.[dev]'`\n*   `pip install -e '.[tutorials]'`\n\n## 基本使用\n\n### 1. 图像编解码示例\n\n使用预训练模型对图像进行编码和解码，可以直接运行自带的 `codec.py` 脚本查看帮助信息：\n\n```bash\npython3 examples\u002Fcodec.py --help\n```\n\n### 2. 模型训练示例\n\nCompressAI 提供了基于率失真损失（rate-distortion loss）的训练脚本。以下命令演示了如何在一个自定义图像数据集上启动训练：\n\n```bash\npython3 examples\u002Ftrain.py -d \u002Fpath\u002Fto\u002Fmy\u002Fimage\u002Fdataset\u002F --epochs 300 -lr 1e-4 --batch-size 16 --cuda --save\n```\n\n**参数说明：**\n*   `-d`: 图像数据集路径（需符合 ImageFolder 结构）。\n*   `--epochs`: 训练轮数。\n*   `-lr`: 学习率。\n*   `--batch-size`: 单进程批次大小。\n*   `--cuda`: 启用 GPU 加速。\n*   `--save`: 保存检查点。\n\n**多 GPU 训练：**\n若需使用多张显卡（例如 2 张），请使用 `torchrun`：\n\n```bash\nCUDA_VISIBLE_DEVICES=0,1 torchrun --standalone --nproc_per_node=2 examples\u002Ftrain.py -d \u002Fpath\u002Fto\u002Fmy\u002Fimage\u002Fdataset\u002F --epochs 300 -lr 1e-4 --batch-size 16 --cuda --save\n```\n> **注意**：多卡模式下，全局有效 batch size = `GPU 数量` × `--batch-size`。\n\n### 3. 模型评估示例\n\n评估已训练的模型或预训练模型在指定数据集上的性能：\n\n**评估自定义模型检查点：**\n```bash\npython3 -m compressai.utils.eval_model checkpoint \u002Fpath\u002Fto\u002Fimages\u002Ffolder\u002F -a $ARCH -p $MODEL_CHECKPOINT\n```\n\n**评估官方预训练模型：**\n```bash\npython3 -m compressai.utils.eval_model pretrained \u002Fpath\u002Fto\u002Fimages\u002Ffolder\u002F -a $ARCH -q $QUALITY_LEVELS\n```\n\n**绘制评估结果图表：**\n```bash\npython3 -m compressai.utils.plot --help\n```\n\n更多详细用法（如视频压缩、传统编解码器对比）请参考官方文档或运行对应脚本的 `--help` 命令。","某多媒体初创公司的算法团队正在研发一款面向移动端的智能相册应用，急需在保持高清画质的前提下大幅降低图片存储与传输带宽成本。\n\n### 没有 CompressAI 时\n- **研发门槛极高**：团队需从零复现复杂的端到端压缩论文公式，手动编写自定义卷积层与熵估计模块，耗时数月且极易出错。\n- **评估标准混乱**：缺乏统一框架对比自研模型与传统编解码器（如 JPEG、WebP）的性能，难以量化率失真（Rate-Distortion）优势。\n- **训练流程繁琐**：缺少现成的预训练模型作为基线，每次实验都要从头训练，且难以高效利用多 GPU 进行分布式加速。\n- **工程落地困难**：深度学习压缩算子未封装优化，导致推理速度慢，无法满足移动端实时解码的需求。\n\n### 使用 CompressAI 后\n- **快速原型开发**：直接调用库中内置的自定义层与成熟模型架构，将新算法的验证周期从数月缩短至数天。\n- **权威性能对标**：利用内置评估脚本，一键在 Kodak 等标准数据集上生成 PSNR 曲线，直观证明自研模型比传统 codec 节省 30% 码率。\n- **高效训练迭代**：加载官方提供的预训练模型进行微调，并通过 `torchrun` 轻松实现多卡并行训练，显著提升实验效率。\n- **平滑部署集成**：基于 PyTorch 生态无缝导出模型，结合库中优化的推理逻辑，顺利将高压缩比算法集成至移动端应用。\n\nCompressAI 通过提供标准化的研究基线与全链路工具链，让团队得以专注于核心算法创新而非重复造轮子，加速了新一代图像压缩技术的商业落地。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FInterDigitalInc_CompressAI_e0d3b0a7.png","InterDigitalInc","InterDigital","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FInterDigitalInc_43680254.jpg","",null,"https:\u002F\u002Fgithub.com\u002FInterDigitalInc",[79,83,87,91,95,98],{"name":80,"color":81,"percentage":82},"Python","#3572A5",89.3,{"name":84,"color":85,"percentage":86},"C++","#f34b7d",9.5,{"name":88,"color":89,"percentage":90},"Shell","#89e051",0.7,{"name":92,"color":93,"percentage":94},"Makefile","#427819",0.2,{"name":96,"color":97,"percentage":94},"CMake","#DA3434",{"name":99,"color":100,"percentage":101},"Dockerfile","#384d54",0.1,1556,272,"2026-04-13T14:48:57","BSD-3-Clause-Clear","Linux, macOS","非必需，但训练和评估建议使用支持 CUDA 的 NVIDIA GPU；支持多卡分布式训练（实验性），具体显存和 CUDA 版本未说明","未说明",{"notes":110,"python":111,"dependencies":112},"官方不支持 Conda 环境；Docker 镜像计划未来发布；多 GPU 支持目前处于实验阶段；从源码安装需要 C++17 编译器；Windows 系统未提供预编译轮子（wheels），可能需从源码编译。","3.8+",[113,114,115],"torch>=1.7","C++17 编译器","pip>=19.0",[14],[118,119,120,121,122,123,124],"compression","deep-learning","python","pytorch","machine-learning","deep-neural-networks","neural-network","2026-03-27T02:49:30.150509","2026-04-14T05:00:09.362023",[128,133,138,143,148,153],{"id":129,"question_zh":130,"answer_zh":131,"source_url":132},32553,"加载保存的检查点（checkpoint）时出现形状不匹配错误（RuntimeError: output with shape ... doesn't match the broadcast shape），如何解决？","该问题通常是由于参数定义中使用了 `set` 导致参数顺序不一致引起的。在 PyTorch 中，优化器依赖参数的顺序与模型定义一致。建议修改 `configure_optimizers` 函数，避免使用 `set` 来返回参数列表，而是直接使用列表或元组以保持 `net.named_parameters()` 返回的原始顺序。如果必须排序，可以使用 `sorted`，但需注意未来 PyTorch 内部变更的风险。维护者指出当前实现是为了便于内部代码库维护，但社区建议遵循标准 PyTorch 惯例，移除 `set` 的使用以确保兼容性。","https:\u002F\u002Fgithub.com\u002FInterDigitalInc\u002FCompressAI\u002Fissues\u002F34",{"id":134,"question_zh":135,"answer_zh":136,"source_url":137},32554,"运行时报错 'ModuleNotFoundError: No module named compressai._CXX' 是什么原因？","此错误表明缺少 C++ 模块扩展。这通常发生在仅安装了 Python 包但未正确编译 C++ 扩展时。解决方法是确保在源码目录下运行 `pip install .\u002Fcompressai`（注意路径包含 `.\u002F`），而不是直接 `pip install compressai`。这将触发本地构建过程，编译必要的 C++ 扩展模块。如果仍然报错，请检查是否已安装必要的构建工具（如 gcc, g++, python-dev 等）。","https:\u002F\u002Fgithub.com\u002FInterDigitalInc\u002FCompressAI\u002Fissues\u002F26",{"id":139,"question_zh":140,"answer_zh":141,"source_url":142},32555,"JointAutoregressiveHierarchicalPriors 模型中存在上下文预测掩码（mask）未生效的 Bug，导致压缩与解压缩不一致，如何修复？","在 `JointAutoregressiveHierarchicalPriors._compress_ar` 方法中，`self.context_prediction.weight` 在卷积操作时未应用掩码，导致与 `_decompress_ar` 行为不一致。修复方法是在卷积前手动将权重与掩码相乘。具体代码修改如下：\n`masked_weight = self.context_prediction.weight * self.context_prediction.mask`\n`ctx_p = F.conv2d(y_crop, masked_weight, bias=self.context_prediction.bias)`\n维护者已确认该问题并采纳了此修复方案。此外，需注意在保存模型前先进行评估（eval），以免优化器覆盖权重导致问题复现。","https:\u002F\u002Fgithub.com\u002FInterDigitalInc\u002FCompressAI\u002Fissues\u002F25",{"id":144,"question_zh":145,"answer_zh":146,"source_url":147},32556,"如何使用评估脚本（eval_model）测试自己训练好的模型？","首先使用 `train.py` 训练模型并保存检查点，例如：`python3 train.py -d $DATASET --epochs 300 -lr 1e-4 --batch-size 16 --cuda --save`。然后使用评估脚本加载检查点进行评测：`python3 -m compressai.utils.eval_model checkpoint \u002Fpath\u002Fto\u002Fimages\u002Ffolder\u002F -a bmshj2018-factorized -p checkpoint.pth.tar`。注意 `-a` 参数需指定与训练时相同的架构名称（如 `bmshj2018-factorized`），`-p` 指定检查点路径。如果遇到加载错误，请确保检查点文件完整且架构定义与训练时一致。","https:\u002F\u002Fgithub.com\u002FInterDigitalInc\u002FCompressAI\u002Fissues\u002F39",{"id":149,"question_zh":150,"answer_zh":151,"source_url":152},32557,"CompressAI 是否支持 DistributedDataParallel (DDP) 或 DataParallel 进行分布式训练？","截至当前版本，CompressAI 尚未正式支持 `DistributedDataParallel` (DDP) 或 `DataParallel`。虽然示例代码中包含 `CustomDataParallel`，但在使用原生 `DataParallel` 时会因参数字典键值问题报错（KeyError）。维护者表示将在未来重新考虑添加 DDP 支持，但目前暂无具体时间计划（ETA）。建议用户暂时使用单卡训练，或自行修改代码以适配多卡环境。","https:\u002F\u002Fgithub.com\u002FInterDigitalInc\u002FCompressAI\u002Fissues\u002F30",{"id":154,"question_zh":155,"answer_zh":156,"source_url":142},32558,"为什么在 MaskedConv2d 中反向传播时梯度未被正确掩码？","在 `MaskedConv2d` 中，`self.weight` 在前向传播时被掩码处理（`self.weight.data *= self.mask`），但在反向传播时，PyTorch 会计算未掩码权重的梯度，导致梯度更新不正确。这是因为 `forward` 函数调用的是 `super().forward(x)`，它使用的是原始未掩码的权重进行梯度计算，而 `self.weight.data` 的修改不影响梯度图。解决方法是确保在每次前向传播前重新应用掩码，或在自定义 backward 函数中手动处理梯度掩码。维护者建议在保存模型前调用 `eval()` 以避免权重被优化器意外覆盖。",[]]