[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-CSAILVision--gandissect":3,"tool-CSAILVision--gandissect":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":79,"owner_email":79,"owner_twitter":79,"owner_website":80,"owner_url":81,"languages":82,"stars":111,"forks":112,"last_commit_at":113,"license":114,"difficulty_score":115,"env_os":116,"env_gpu":117,"env_ram":118,"env_deps":119,"category_tags":126,"github_topics":127,"view_count":23,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":135,"updated_at":136,"faqs":137,"releases":163},3733,"CSAILVision\u002Fgandissect","gandissect","Pytorch-based tools for visualizing and understanding the neurons of a GAN.  https:\u002F\u002Fgandissect.csail.mit.edu\u002F","gandissect 是一款基于 PyTorch 的开源工具，旨在“解剖”生成对抗网络（GAN），帮助人们直观地理解其内部神经元是如何工作的。它解决了 GAN 长期被视为“黑盒”的难题，通过将网络内部的抽象单元与人类可识别的概念（如树木、窗户、云朵等）进行关联，让用户能够清晰地看到哪些神经元控制了图像中的特定物体或属性。\n\n这款工具特别适合 AI 研究人员、开发者以及对生成模型原理感兴趣的设计师使用。借助 gandissect，用户不仅可以可视化分析 GAN 不同层级的特征表示，还能诊断并修复生成图像中的伪影，甚至通过激活或抑制特定神经元来直接编辑图像内容，例如从会议室照片中移除椅子，或在风景画中增添窗户。\n\n其核心技术亮点在于将复杂的神经网络激活映射为语义明确的视觉概念，并提供了静态分析报告与交互式演示（如 GANPaint）两种使用方式。无论是为了学术研究模型的可解释性，还是为了探索创意图像编辑的新可能，gandissect 都提供了一套强大且易用的解决方案，让深奥的算法逻辑变得触手可及。","# GANDissect \u003Ca href=\"http:\u002F\u002Fgandissect.res.ibm.com\u002Fganpaint.html?project=churchoutdoor&layer=layer4\">\u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FCSAILVision_gandissect_readme_5639b7c549ca.gif' align=\"right\" height=\"259\">\u003C\u002Fa>\n\n[**Project**](https:\u002F\u002Fgandissect.csail.mit.edu\u002F) | [**Demo**](http:\u002F\u002Fgandissect.res.ibm.com\u002Fganpaint.html?project=churchoutdoor&layer=layer4) | [**Paper**](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1811.10597.pdf) | [**Video**](http:\u002F\u002Ftiny.cc\u002Fgandissect) \u003Cbr>\n\n[GAN Dissection](https:\u002F\u002Fgandissect.csail.mit.edu\u002F) is a way to inspect the internal representations of a generative adversarial network (GAN) to understand how internal units align with human-interpretable concepts. It is part of [NetDissect](https:\u002F\u002Fnetdissect.csail.mit.edu\u002F).\n\nThis repo allows you to dissect a GAN model. It provides the dissection results as a static summary or as an interactive visualization. Try our interactive [GANPaint demo](http:\u002F\u002Fgandissect.res.ibm.com\u002Fganpaint.html?project=churchoutdoor&layer=layer4) to interact with GANs and draw images. \n\n## Overview\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FCSAILVision_gandissect_readme_5fbff42c54ca.jpg\" width=\"800px\" clear=\"both\" \u002F>\n\n[Visualizing and Understanding Generative Adversarial Networks](http:\u002F\u002Fgandissect.csail.mit.edu) \u003Cbr>\n[David Bau](http:\u002F\u002Fpeople.csail.mit.eduÂ\u002Fdavidbau\u002Fhome\u002F), [Jun-Yan Zhu](http:\u002F\u002Fpeople.csail.mit.edu\u002Fjunyanz\u002F), [Hendrik Strobelt](http:\u002F\u002Fhendrik.strobelt.com\u002F), [Bolei Zhou](http:\u002F\u002Fpeople.csail.mit.edu\u002Fbzhou\u002F), [Joshua B. Tenenbaum](http:\u002F\u002Fweb.mit.edu\u002Fcocosci\u002Fjosh.html), [William T. Freeman](https:\u002F\u002Fbillf.mit.edu\u002F), [Antonio Torralba](http:\u002F\u002Fweb.mit.edu\u002Ftorralba\u002Fwww\u002F) \u003Cbr>\nMIT CSAIL, MIT-IBM Watson AI Lab, CUHK, IBM Research \u003Cbr>\nIn arXiv, 2018.\n\n\n## Analysis and Applications\n### Interpretable Units in GANs\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FCSAILVision_gandissect_readme_b83cd5228bed.png\" width=\"800px\"\u002F>\n\n### Analyzing different layers\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FCSAILVision_gandissect_readme_b03aeb5542eb.png\" width=\"800px\"\u002F>\n\n\n### Diagnosing and improving GANs\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FCSAILVision_gandissect_readme_655dcb12385a.jpg\" width=\"800px\"\u002F>\n\n### Removing objects from conference rooms\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FCSAILVision_gandissect_readme_881d9fa97ead.jpg\" width=\"800px\"\u002F>\n\n### Removing windows from different natural scenes\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FCSAILVision_gandissect_readme_cce77e87867b.jpg\" width=\"800px\"\u002F>\n\n### Inserting new objects into images\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FCSAILVision_gandissect_readme_76463e45b2a3.jpg\" width=\"800px\"\u002F>\n\n\n## Release history\nv 0.9 alpha  - Nov 26,  2018 \u003Cbr>\n\n\n## Getting Started\nLet's set up the environment and dissect a `churchoutdoor` GAN. This requires some CUDA-enabled GPU and some disk space.\n\n### Setup\n\nTo install everything needed from this repo, have `conda` available,\nand run:\n\n```\nscript\u002Fsetup_env.sh      # Create a conda environment with dependencies\nscript\u002Fmake_dirs.sh      # Create the dataset and dissect directories\nscript\u002Fdownload_data.sh  # Download support data and demo GANs\nsource activate netd     # Enter the conda environment\npip install -v -e .      # Link the local netdissect package into the env\n```\n\nDetails.  The code depends on python 3, Pytorch 4.1, and several other\npackages.  For conda users, `script\u002Fenvironment.yml` provides the details\nof the dependencies.  For pip users, `setup.py` lists everything needed.\n\nData.  The `download_data.sh` script downloads the segmentation dataset\nused to dissect classifiers, the segmentation network used to dissect GANs,\nand several example GAN models to dissect.  The downloads will go into\nthe directories `dataset\u002F` and `models\u002F`.  If you do not wish to download\nthe example networks, `python -m netdissect --download` will download\njust the data and models needed for netdissect itself.\n\n\n### Dissecting a GAN\n\nGAN example: to dissect three layers of the LSUN living room progressive\nGAN trained by Karras:\n\n```\npython -m netdissect \\\n   --gan \\\n   --model \"netdissect.proggan.from_pth_file('models\u002Fkarras\u002Flivingroom_lsun.pth')\" \\\n   --outdir \"dissect\u002Flivingroom\" \\\n   --layer layer1 layer4 layer7 \\\n   --size 1000\n```\n\nThe result is a static HTML page at `dissect\u002Flivingroom\u002Fdissect.html`, and\na JSON file of metrics at `dissect\u002Flivingroom\u002Fdissect.json`.\n\nYou can test your own model: the `--model` argument is a fully-qualified\npython function or constructor for loading the GAN to test.  The\n`--layer` names are fully-qualified (`state_dict`-style) names for layers.\n\nBy default, a scene-based segmentation is used but a different segmenter class\ncan be substituted by supplying an alternate class constructor to\n`--segmenter`.  See `netdissect\u002Fsegmenter.py` for the segmenter base class.\n\n## Running a GAN editing server (alpha)\n\n\nOnce a GAN is dissected, you can run a web server that provides an API\nthat generates images with (optional) interventions.\n\n```\npython -m netdissect.server --address 0.0.0.0\n```\n\u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FCSAILVision_gandissect_readme_d13fa5251ae6.png' width='40%' align='right' style=\"padding:3px;\">\n\n\n\nThe editing UI (right) is served at [http:\u002F\u002Flocalhost:5001\u002F](http:\u002F\u002Flocalhost:5001\u002F) .\n\nOther URLs:\n\n- [http:\u002F\u002Flocalhost:5001\u002Fapi\u002Fui](http:\u002F\u002Flocalhost:5001\u002Fapi\u002Fui) is the OpenAPI\u002Fswagger UI for directly\n    testing GAN interventions.\n- [http:\u002F\u002Flocalhost:5001\u002Fdata\u002Flivingroom\u002Fdissect.html](http:\u002F\u002Flocalhost:5001\u002Fdata\u002Flivingroom\u002Fdissect.html) static net\n    dissection reports.\n- [http:\u002F\u002Flocalhost:5001\u002Fdata\u002Flivingroom\u002Fedit.html](http:\u002F\u002Flocalhost:5001\u002Fdata\u002Flivingroom\u002Fedit.html) a dissection-based\n    interface for testing interventions.\n- TODO: [http:\u002F\u002Flocalhost:5001\u002Fganpaint.html](http:\u002F\u002Flocalhost:5001\u002Fganpaint.html) will serve GANpaint\n\n\n## Advanced Level\n\n### Dissecting a classifier (NetDissect)\n\nClassifier example: to dissect three layers of the pretrained `alexnet` in `torchvision`:\n```bash\npython -m netdissect \\\n   --model \"torchvision.models.alexnet(pretrained=True)\" \\\n   --layers features.6:conv3 features.8:conv4 features.10:conv5 \\\n   --imgsize 227 \\\n   --outdir dissect\u002Falexnet-imagenet\n```\n\nNo special web server for a classifier.\n\n### Command Line Details\n\nDocumentation for the netdissect command-line utility.\n\n```\nusage: python -m netdissect [-h] [--model MODEL] [--pthfile PTHFILE]\n                            [--outdir OUTDIR] [--layers LAYERS [LAYERS ...]]\n                            [--segments SEGMENTS] [--segmenter SEGMENTER]\n                            [--download] [--imgsize IMGSIZE]\n                            [--netname NETNAME] [--meta META [META ...]]\n                            [--examples EXAMPLES] [--size SIZE]\n                            [--batch_size BATCH_SIZE]\n                            [--num_workers NUM_WORKERS]\n                            [--quantile_threshold {[0-1],iqr}] [--no-labels]\n                            [--maxiou] [--covariance] [--no-images]\n                            [--no-report] [--no-cuda] [--gen] [--gan]\n                            [--perturbation PERTURBATION] [--add_scale_offset]\n                            [--quiet]\n```\n\noptional arguments:\n\n```\n  -h, --help            show this help message and exit\n  --model MODEL         constructor for the model to test\n  --pthfile PTHFILE     filename of the .pth file for the model\n  --outdir OUTDIR       directory for dissection output\n  --layers LAYERS [LAYERS ...]\n                        space-separated list of layer names to dissect, in the\n                        form layername[:reportedname]\n  --segments SEGMENTS   directory containing segmentation dataset\n  --segmenter SEGMENTER\n                        constructor for a segmenter class\n  --download            downloads Broden dataset if needed\n  --imgsize IMGSIZE     input image size to use\n  --netname NETNAME     name for the network in generated reports\n  --meta META [META ...]\n                        json files of metadata to add to report\n  --examples EXAMPLES   number of image examples per unit\n  --size SIZE           dataset subset size to use\n  --batch_size BATCH_SIZE\n                        batch size for a forward pass\n  --num_workers NUM_WORKERS\n                        number of DataLoader workers\n  --quantile_threshold {[0-1],iqr}\n                        quantile to use for masks\n  --no-labels           disables labeling of units\n  --maxiou              enables maxiou calculation\n  --covariance          enables covariance calculation\n  --no-images           disables generation of unit images\n  --no-report           disables generation report summary\n  --no-cuda             disables CUDA usage\n  --gen                 test a generator model (e.g., a GAN)\n  --gan                 synonym for --gen\n  --perturbation PERTURBATION\n                        the filename of perturbation attack to apply\n  --add_scale_offset    offsets masks according to stride and padding\n  --quiet               silences console output\n```\n\n### API, for classifiers\n\nIt can be used from code as a function, as follows:\n\n1. Load up the convolutional model you wish to dissect, and call\n   `imodel = InstrumentedModel(model)` and then\n   `imodel.retain_layers([layernames,..])` to instrument the model.\n2. Load the segmentation dataset using the BrodenDataset class;\n   use the `transform_image` argument to normalize images to\n   be suitable for the model, and the `size` argument to truncate the dataset.\n3. Choose a directory in which to write the output, and call\n   `dissect(outdir, imodel, dataset)`.\n\nA quick approximate dissection can be done by reducing the `size`\nof the `BrodenDataset`.  Generating example images can be time-consuming\nand the number of images can be set via `examples_per_unit`.\n\nExample:\n\n```\n    from netdissect import InstrumentedModel, dissect\n    from netdissect import BrodenDataset\n\n    model = InstrumentedModel(load_my_model())\n    model.eval()\n    model.cuda()\n    model.retain_layers(['conv1', 'conv2', 'conv3', 'conv4', 'conv5'])\n    bds = BrodenDataset('dataset\u002Fbroden1_227',\n            transform_image=transforms.Compose([\n                transforms.ToTensor(),\n                transforms.Normalize(IMAGE_MEAN, IMAGE_STDEV)]),\n            size=10000)\n    dissect('result\u002Fdissect', model, bds,\n            batch_size=100,\n            examples_per_unit=10)\n```\n\nThe Broden dataset is oriented towards semantic objects, parts, material, colors, etc that are found in natural scene photographs.\nIf you want to analyze your model with a different semantic segmentation, you can substitute a different segmentation dataset and supply a `segrunner`, an argument that describes how to get segmentations and RGB images from the dataset.  See `ClassifierSegRunner` for the details.\n\n### API, for generators\n\nSimilarly:\n\n1. Load up the generator model wish to dissect, and call\n   `retain_layers(model, [layernames,..])` to instrument the model.\n2. Create a dataset of z input samples for testing.  If your model\n   uses a uniform normal distribution, z_dataset_for_model will make one.\n3. Choose a directory in which to write the output, and call\n   `dissect(outdir, model, dataset, segrunner=GeneratorSegRunner())`.\n\nThe time for the dissection is proportional to the number of samples\nin the dataset.\n\n```\n    from netdissect import InstrumentedModel, dissect\n    from netdissect import z_dataset_for_model, GeneratorSegRunner\n\n    model = InstrumentedModel(load_my_model())\n    model.eval()\n    model.cuda()\n    model.retain_layers(model, ['layer3', 'layer4', 'layer5'])\n    zds = z_dataset_for_model(size, model)\n    dissect('result\u002Fgandissect', model, zds,\n            segrunner=GeneratorSegRunner(),\n            batch_size=100,\n            examples_per_unit=10)\n```\n\nThe `GeneratorSegRunner` defaults to a running a semantic segmentation network oriented towards semantic objects, parts, and materials found in natural scene photographs.  To use a different semantic segmentation, you can supply a custom `Segmenter` subclass to the constructor of `GeneratorSegRunner`.\n\n## Citation\nIf you use this code for your research, please cite our [paper](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1811.10597.pdf):\n```\n@inproceedings{bau2019gandissect,\n title={GAN Dissection: Visualizing and Understanding Generative Adversarial Networks},\n author={Bau, David and Zhu, Jun-Yan and Strobelt, Hendrik and Zhou, Bolei and Tenenbaum, Joshua B. and Freeman, William T. and Torralba, Antonio},\n booktitle={Proceedings of the International Conference on Learning Representations (ICLR)},\n year={2019}\n}\n```\n","# GANDissect \u003Ca href=\"http:\u002F\u002Fgandissect.res.ibm.com\u002Fganpaint.html?project=churchoutdoor&layer=layer4\">\u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FCSAILVision_gandissect_readme_5639b7c549ca.gif' align=\"right\" height=\"259\">\u003C\u002Fa>\n\n[**项目**](https:\u002F\u002Fgandissect.csail.mit.edu\u002F) | [**演示**](http:\u002F\u002Fgandissect.res.ibm.com\u002Fganpaint.html?project=churchoutdoor&layer=layer4) | [**论文**](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1811.10597.pdf) | [**视频**](http:\u002F\u002Ftiny.cc\u002Fgandissect) \u003Cbr>\n\n[GAN Dissection](https:\u002F\u002Fgandissect.csail.mit.edu\u002F) 是一种检查生成对抗网络（GAN）内部表示的方法，以理解其内部单元如何与人类可解释的概念相对应。它是 [NetDissect](https:\u002F\u002Fnetdissect.csail.mit.edu\u002F) 的一部分。\n\n这个仓库允许你解剖一个 GAN 模型，并将解剖结果以静态摘要或交互式可视化的方式呈现。尝试我们的交互式 [GANPaint 演示](http:\u002F\u002Fgandissect.res.ibm.com\u002Fganpaint.html?project=churchoutdoor&layer=layer4)，与 GAN 互动并绘制图像。\n\n## 概述\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FCSAILVision_gandissect_readme_5fbff42c54ca.jpg\" width=\"800px\" clear=\"both\" \u002F>\n\n[生成对抗网络的可视化与理解](http:\u002F\u002Fgandissect.csail.mit.edu) \u003Cbr>\n[David Bau](http:\u002F\u002Fpeople.csail.mit.eduÂ\u002Fdavidbau\u002Fhome\u002F)、[Jun-Yan Zhu](http:\u002F\u002Fpeople.csail.mit.edu\u002Fjunyanz\u002F)、[Hendrik Strobelt](http:\u002F\u002Fhendrik.strobelt.com\u002F)、[Bolei Zhou](http:\u002F\u002Fpeople.csail.mit.edu\u002Fbzhou\u002F)、[Joshua B. Tenenbaum](http:\u002F\u002Fweb.mit.edu\u002Fcocosci\u002Fjosh.html)、[William T. Freeman](https:\u002F\u002Fbillf.mit.edu\u002F)、[Antonio Torralba](http:\u002F\u002Fweb.mit.edu\u002Ftorralba\u002Fwww\u002F) \u003Cbr>\nMIT CSAIL、MIT-IBM Watson AI Lab、香港中文大学、IBM 研究院 \u003Cbr>\n发表于 arXiv，2018年。\n\n\n## 分析与应用\n### GAN 中可解释的单元\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FCSAILVision_gandissect_readme_b83cd5228bed.png\" width=\"800px\"\u002F>\n\n### 分析不同层\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FCSAILVision_gandissect_readme_b03aeb5542eb.png\" width=\"800px\"\u002F>\n\n\n### 诊断和改进 GAN\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FCSAILVision_gandissect_readme_655dcb12385a.jpg\" width=\"800px\"\u002F>\n\n### 从会议室中移除物体\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FCSAILVision_gandissect_readme_881d9fa97ead.jpg\" width=\"800px\"\u002F>\n\n### 从不同自然场景中移除窗户\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FCSAILVision_gandissect_readme_cce77e87867b.jpg\" width=\"800px\"\u002F>\n\n### 在图像中插入新物体\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FCSAILVision_gandissect_readme_76463e45b2a3.jpg\" width=\"800px\"\u002F>\n\n\n## 发布历史\nv 0.9 alpha - 2018年11月26日 \u003Cbr>\n\n\n## 快速入门\n让我们设置环境并解剖一个 `churchoutdoor` GAN。这需要一块支持 CUDA 的 GPU 和一定的磁盘空间。\n\n### 设置\n\n要从本仓库安装所有必需的软件，请确保已安装 `conda`，然后运行：\n\n```\nscript\u002Fsetup_env.sh      # 创建包含依赖项的 conda 环境\nscript\u002Fmake_dirs.sh      # 创建数据集和解剖目录\nscript\u002Fdownload_data.sh  # 下载支持数据和演示用 GAN\nsource activate netd     # 进入 conda 环境\npip install -v -e .      # 将本地 netdissect 包链接到环境中\n```\n\n详细信息。该代码依赖于 Python 3、PyTorch 4.1 以及其他几个包。对于 conda 用户，`script\u002Fenvironment.yml` 提供了详细的依赖关系。对于 pip 用户，`setup.py` 列出了所有必需的依赖项。\n\n数据。`download_data.sh` 脚本会下载用于解剖分类器的分割数据集、用于解剖 GAN 的分割网络，以及若干用于解剖的示例 GAN 模型。这些文件将被下载到 `dataset\u002F` 和 `models\u002F` 目录中。如果你不想下载示例网络，可以使用 `python -m netdissect --download` 命令仅下载 netdissect 本身所需的数据和模型。\n\n\n### 解剖一个 GAN\n\nGAN 示例：解剖由 Karras 训练的 LSUN 客厅渐进式 GAN 的三层：\n\n```\npython -m netdissect \\\n   --gan \\\n   --model \"netdissect.proggan.from_pth_file('models\u002Fkarras\u002Flivingroom_lsun.pth')\" \\\n   --outdir \"dissect\u002Flivingroom\" \\\n   --layer layer1 layer4 layer7 \\\n   --size 1000\n```\n\n结果会在 `dissect\u002Flivingroom\u002Fdissect.html` 生成一个静态 HTML 页面，并在 `dissect\u002Flivingroom\u002Fdissect.json` 生成一个包含指标的 JSON 文件。\n\n你可以测试自己的模型：`--model` 参数是一个完全限定的 Python 函数或构造函数，用于加载要测试的 GAN。`--layer` 参数是完全限定的层名（类似于 `state_dict` 样式）。\n\n默认情况下，使用基于场景的分割，但可以通过向 `--segmenter` 提供替代的类构造函数来替换不同的分割器类。有关分割器基类的信息，请参阅 `netdissect\u002Fsegmenter.py`。\n\n## 运行 GAN 编辑服务器（alpha）\n\n一旦 GAN 被解剖，你就可以运行一个提供 API 的 Web 服务器，该服务器可以根据（可选）干预生成图像。\n\n```\npython -m netdissect.server --address 0.0.0.0\n```\n\u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FCSAILVision_gandissect_readme_d13fa5251ae6.png' width='40%' align='right' style=\"padding:3px;\">\n\n\n\n编辑界面（右）将在 [http:\u002F\u002Flocalhost:5001\u002F](http:\u002F\u002Flocalhost:5001\u002F) 提供服务。\n\n其他 URL：\n\n- [http:\u002F\u002Flocalhost:5001\u002Fapi\u002Fui](http:\u002F\u002Flocalhost:5001\u002Fapi\u002Fui) 是 OpenAPI\u002FSwagger 界面，用于直接测试 GAN 干预。\n- [http:\u002F\u002Flocalhost:5001\u002Fdata\u002Flivingroom\u002Fdissect.html](http:\u002F\u002Flocalhost:5001\u002Fdata\u002Flivingroom\u002Fdissect.html) 是静态的网络解剖报告。\n- [http:\u002F\u002Flocalhost:5001\u002Fdata\u002Flivingroom\u002Fedit.html](http:\u002F\u002Flocalhost:5001\u002Fdata\u002Flivingroom\u002Fedit.html) 是一个基于解剖的界面，用于测试干预。\n- 待办事项：[http:\u002F\u002Flocalhost:5001\u002Fganpaint.html](http:\u002F\u002Flocalhost:5001\u002Fganpaint.html) 将提供 GANpaint 服务。\n\n\n## 高级用法\n\n### 解剖一个分类器（NetDissect）\n\n分类器示例：解剖 torchvision 中预训练的 `alexnet` 的三层：\n```bash\npython -m netdissect \\\n   --model \"torchvision.models.alexnet(pretrained=True)\" \\\n   --layers features.6:conv3 features.8:conv4 features.10:conv5 \\\n   --imgsize 227 \\\n   --outdir dissect\u002Falexnet-imagenet\n```\n\n分类器不需要特殊的 Web 服务器。\n\n### 命令行详细说明\n\nnetdissect 命令行工具的文档。\n\n```\n用法：python -m netdissect [-h] [--model MODEL] [--pthfile PTHFILE]\n                            [--outdir OUTDIR] [--layers LAYERS [LAYERS ...]]\n                            [--segments SEGMENTS] [--segmenter SEGMENTER]\n                            [--download] [--imgsize IMGSIZE]\n                            [--netname NETNAME] [--meta META [META ...]]\n                            [--examples EXAMPLES] [--size SIZE]\n                            [--batch_size BATCH_SIZE]\n                            [--num_workers NUM_WORKERS]\n                            [--quantile_threshold {[0-1],iqr}] [--no-labels]\n                            [--maxiou] [--covariance] [--no-images]\n                            [--no-report] [--no-cuda] [--gen] [--gan]\n                            [--perturbation PERTURBATION] [--add_scale_offset]\n                            [--quiet]\n```\n\n可选参数：\n\n```\n  -h, --help            显示此帮助信息并退出\n  --model MODEL         用于测试的模型构造函数\n  --pthfile PTHFILE     模型 .pth 文件的文件名\n  --outdir OUTDIR       解剖输出的目录\n  --layers LAYERS [LAYERS ...]\n                        以空格分隔的要解剖的层名称列表，格式为 layername[:reportedname]\n  --segments SEGMENTS   包含分割数据集的目录\n  --segmenter SEGMENTER\n                        分割类的构造函数\n  --download            如果需要，则下载 Broden 数据集\n  --imgsize IMGSIZE     使用的输入图像大小\n  --netname NETNAME     生成报告中网络的名称\n  --meta META [META ...]\n                        要添加到报告中的元数据 JSON 文件\n  --examples EXAMPLES   每个单元的图像示例数量\n  --size SIZE           使用的数据集子集大小\n  --batch_size BATCH_SIZE\n                        前向传播的批量大小\n  --num_workers NUM_WORKERS\n                        DataLoader 工作线程的数量\n  --quantile_threshold {[0-1],iqr}\n                        用于掩码的分位数\n  --no-labels           禁用单元标注\n  --maxiou              启用 MaxIOU 计算\n  --covariance          启用协方差计算\n  --no-images           禁用单元图像的生成\n  --no-report           禁用报告摘要的生成\n  --no-cuda             禁用 CUDA 的使用\n  --gen                 测试生成器模型（例如 GAN）\n  --gan                 --gen 的同义词\n  --perturbation PERTURBATION\n                        要应用的扰动攻击文件名\n  --add_scale_offset    根据步幅和填充偏移掩码\n  --quiet               静音控制台输出\n```\n\n### API，适用于分类器\n\n该工具也可以在代码中作为函数使用，具体步骤如下：\n\n1. 加载您希望解剖的卷积神经网络模型，并调用 `imodel = InstrumentedModel(model)`，然后通过 `imodel.retain_layers([layernames,..])` 对模型进行插桩。\n2. 使用 BrodenDataset 类加载分割数据集；通过 `transform_image` 参数对图像进行归一化以适应模型要求，并通过 `size` 参数截断数据集。\n3. 选择一个用于写入输出的目录，然后调用 `dissect(outdir, imodel, dataset)`。\n\n可以通过减小 `BrodenDataset` 的 `size` 来快速进行近似解剖。生成示例图像可能耗时较长，可通过 `examples_per_unit` 设置每单位生成的图像数量。\n\n示例：\n\n```\n    from netdissect import InstrumentedModel, dissect\n    from netdissect import BrodenDataset\n\n    model = InstrumentedModel(load_my_model())\n    model.eval()\n    model.cuda()\n    model.retain_layers(['conv1', 'conv2', 'conv3', 'conv4', 'conv5'])\n    bds = BrodenDataset('dataset\u002Fbroden1_227',\n            transform_image=transforms.Compose([\n                transforms.ToTensor(),\n                transforms.Normalize(IMAGE_MEAN, IMAGE_STDEV)]),\n            size=10000)\n    dissect('result\u002Fdissect', model, bds,\n            batch_size=100,\n            examples_per_unit=10)\n```\n\nBroden 数据集主要针对自然场景照片中的语义对象、部件、材质、颜色等。如果您想使用不同的语义分割来分析模型，可以替换其他分割数据集，并提供一个 `segrunner` 参数，该参数描述了如何从数据集中获取分割结果和 RGB 图像。详细信息请参阅 `ClassifierSegRunner`。\n\n### API，适用于生成器\n\n同样地：\n\n1. 加载您希望解剖的生成器模型，并调用 `retain_layers(model, [layernames,..])` 对模型进行插桩。\n2. 创建用于测试的 z 输入样本数据集。如果您的模型使用均匀正态分布，z_dataset_for_model 可以生成这样的数据集。\n3. 选择一个用于写入输出的目录，然后调用 `dissect(outdir, model, dataset, segrunner=GeneratorSegRunner())`。\n\n解剖所需的时间与数据集中样本的数量成正比。\n\n```\n    from netdissect import InstrumentedModel, dissect\n    from netdissect import z_dataset_for_model, GeneratorSegRunner\n\n    model = InstrumentedModel(load_my_model())\n    model.eval()\n    model.cuda()\n    model.retain_layers(model, ['layer3', 'layer4', 'layer5'])\n    zds = z_dataset_for_model(size, model)\n    dissect('result\u002Fgandissect', model, zds,\n            segrunner=GeneratorSegRunner(),\n            batch_size=100,\n            examples_per_unit=10)\n```\n\n`GeneratorSegRunner` 默认运行一个面向自然场景照片中语义对象、部件和材质的语义分割网络。若需使用其他语义分割，可在 `GeneratorSegRunner` 的构造函数中传入自定义的 `Segmenter` 子类。\n\n## 引用\n如果您在研究中使用此代码，请引用我们的论文：\n```\n@inproceedings{bau2019gandissect,\n title={GAN Dissection: Visualizing and Understanding Generative Adversarial Networks},\n author={Bau, David and Zhu, Jun-Yan and Strobelt, Hendrik and Zhou, Bolei and Tenenbaum, Joshua B. and Freeman, William T. and Torralba, Antonio},\n booktitle={Proceedings of the International Conference on Learning Representations (ICLR)},\n year={2019}\n}\n```","# GANDissect 快速上手指南\n\nGANDissect 是一个用于可视化及理解生成对抗网络（GAN）内部表示的工具。它能帮助开发者分析 GAN 内部单元如何与人类可理解的概念（如物体、纹理、颜色等）对齐，并支持对生成图像进行交互式编辑。\n\n## 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **操作系统**: Linux (推荐) 或 macOS\n*   **GPU**: 需要支持 CUDA 的 NVIDIA GPU（用于加速模型推理和解剖分析）\n*   **磁盘空间**: 建议预留至少 10GB 空间，用于下载数据集和预训练模型\n*   **前置依赖**:\n    *   Python 3.x\n    *   Conda (推荐使用 Miniconda 或 Anaconda 管理环境)\n    *   PyTorch (代码依赖 PyTorch，安装脚本会自动配置兼容版本)\n\n> **注意**：国内用户若遇到 `conda` 或 `pip` 下载缓慢的问题，建议在运行安装脚本前配置清华源或中科大源。\n\n## 安装步骤\n\n本项目推荐使用 Conda 进行环境隔离和依赖管理。请按顺序执行以下命令：\n\n1.  **克隆仓库并进入目录**\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002FCSAILVision\u002Fgandissect.git\n    cd gandissect\n    ```\n\n2.  **创建康达环境并安装依赖**\n    运行官方提供的设置脚本，它将自动创建名为 `netd` 的环境并安装所需包：\n    ```bash\n    script\u002Fsetup_env.sh\n    ```\n\n3.  **创建数据目录结构**\n    ```bash\n    script\u002Fmake_dirs.sh\n    ```\n\n4.  **下载数据与示例模型**\n    下载用于解剖分析的分割数据集、分割网络以及示例 GAN 模型（如 LSUN 教堂、卧室等）：\n    ```bash\n    script\u002Fdownload_data.sh\n    ```\n    > *提示：如果网络受限，此步骤可能耗时较长。若仅需核心功能而不需要示例模型，可后续按需下载。*\n\n5.  **激活环境并链接本地包**\n    ```bash\n    source activate netd\n    pip install -v -e .\n    ```\n\n## 基本使用\n\n安装完成后，您可以立即对预训练的 GAN 模型进行“解剖”分析。以下示例将分析一个生成卧室场景的 Progressive GAN 模型的三个层级。\n\n### 运行解剖分析\n\n在激活的 `netd` 环境中执行以下命令：\n\n```bash\npython -m netdissect \\\n   --gan \\\n   --model \"netdissect.proggan.from_pth_file('models\u002Fkarras\u002Flivingroom_lsun.pth')\" \\\n   --outdir \"dissect\u002Flivingroom\" \\\n   --layer layer1 layer4 layer7 \\\n   --size 1000\n```\n\n**参数说明：**\n*   `--gan`: 指定目标为生成器模型。\n*   `--model`: 加载模型的 Python 函数路径。\n*   `--outdir`: 输出结果目录。\n*   `--layer`: 指定要分析的网络层名称（需与模型 state_dict 一致）。\n*   `--size`: 用于分析的采样图片数量（数量越大结果越准，但耗时越长）。\n\n### 查看结果\n\n命令执行完毕后，将在 `dissect\u002Flivingroom\u002F` 目录下生成以下文件：\n*   `dissect.html`: 静态 HTML 报告，包含各层级单元与语义概念的对应关系可视化。\n*   `dissect.json`: 包含详细量化指标的 JSON 文件。\n\n您可以直接在浏览器中打开 `dissect\u002Flivingroom\u002Fdissect.html` 查看分析结果。\n\n### （可选）启动交互式编辑服务\n\n如果您希望体验类似 GANpaint 的交互式图像编辑功能，可以启动本地 Web 服务器：\n\n```bash\npython -m netdissect.server --address 0.0.0.0\n```\n\n启动后，访问 `http:\u002F\u002Flocalhost:5001\u002F` 即可使用可视化界面，通过勾选语义标签来实时修改生成图像中的内容（如添加\u002F移除窗户、树木等）。","某游戏美术团队正在利用生成对抗网络（GAN）批量构建虚拟城市景观，但在生成的教堂图像中，窗户经常错位或出现不自然的伪影，严重影响场景可用性。\n\n### 没有 gandissect 时\n- 开发人员只能像“盲人摸象”一样随机调整潜在向量，无法定位具体是哪个神经元控制了“窗户”的生成。\n- 遇到画面伪影时，缺乏诊断手段，往往需要重新训练整个模型或耗费数天尝试不同的网络架构。\n- 想要移除画面中多余的物体（如错误的门窗），只能依赖后期 PS 手工修图，无法从模型源头进行干预。\n- 团队内部难以沟通模型内部逻辑，因为黑盒特性导致无法向非技术人员解释生成结果偏差的原因。\n\n### 使用 gandissect 后\n- 通过可视化分析，团队迅速定位到第 4 层中特定的一组神经元专门负责“窗户”概念，实现了精准控制。\n- 利用工具的诊断功能，直接识别并抑制了产生伪影的异常神经元，无需重新训练即可显著提升画质。\n- 借助交互式演示，开发者可以直接“关闭”控制特定物体的神经元，在生成阶段就自动移除不需要的窗户或添加新元素。\n- 生成的静态分析报告将抽象的神经元与人类可理解的概念（如门、树、砖墙）对应，让美术与算法团队能基于共同语言高效协作。\n\ngandissect 将 GAN 从不可控的黑盒变成了可解释、可编辑的透明系统，极大降低了生成式内容的调试与定制成本。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FCSAILVision_gandissect_5fbff42c.jpg","CSAILVision","MIT CSAIL Computer Vision","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FCSAILVision_527c4791.jpg","",null,"https:\u002F\u002Fei.csail.mit.edu\u002F","https:\u002F\u002Fgithub.com\u002FCSAILVision",[83,87,91,95,99,103,107],{"name":84,"color":85,"percentage":86},"Python","#3572A5",79.4,{"name":88,"color":89,"percentage":90},"Jupyter Notebook","#DA5B0B",8,{"name":92,"color":93,"percentage":94},"HTML","#e34c26",6.7,{"name":96,"color":97,"percentage":98},"Cuda","#3A4E3A",3.4,{"name":100,"color":101,"percentage":102},"Shell","#89e051",1.7,{"name":104,"color":105,"percentage":106},"C","#555555",0.7,{"name":108,"color":109,"percentage":110},"C++","#f34b7d",0.2,1766,279,"2026-02-23T14:30:02","MIT",4,"Linux","必需 NVIDIA GPU (支持 CUDA)，具体型号和显存大小未说明，但需运行大型 GAN 模型和分割网络","未说明",{"notes":120,"python":121,"dependencies":122},"该项目为 2018 年发布的早期版本 (v0.9 alpha)，依赖较旧版本的 PyTorch (0.4.1)。建议使用 conda 创建环境并运行提供的脚本 (setup_env.sh, download_data.sh) 来安装依赖和下载数据集及预训练模型。主要功能包括对 GAN 内部单元的可解释性分析、静态报告生成以及运行交互式 Web 编辑服务器。","3.x",[123,124,125],"PyTorch 0.4.1","conda","netdissect",[13,14],[128,129,130,131,132,133,134],"pytorch","gan","image-manipulation","deep-learning","interactive-visualizations","generative-adversarial-network","interpretable-ml","2026-03-27T02:49:30.150509","2026-04-06T05:17:36.414556",[138,143,148,153,158],{"id":139,"question_zh":140,"answer_zh":141,"source_url":142},17102,"如何支持 PyTorch 1.0.1 版本？遇到 'torch.utils.ffi is deprecated' 错误怎么办？","该问题已修复。项目计划迁移至支持 PyTorch 1.0.1。目前使用的语义图像分割依赖 PyTorch 0.4，待其升级到 PyTorch 1 后，本项目也会同步升级。代码已更新以兼容 PyTorch 1.0+。","https:\u002F\u002Fgithub.com\u002FCSAILVision\u002Fgandissect\u002Fissues\u002F9",{"id":144,"question_zh":145,"answer_zh":146,"source_url":147},17103,"运行时报错 'CUDA error: out of memory'（显存不足），即使将 batch_size 设为 1 也无法解决，该怎么办？","可以尝试以下方法减少显存占用：1. 指定更少的层进行剖析（dissect）；2. 优先选择表示较小（如分辨率较低）的层进行剖析，这些层通常也更有研究价值且占用显存更少。如果问题仍未解决，可提供更多计算阶段的细节以便进一步排查。","https:\u002F\u002Fgithub.com\u002FCSAILVision\u002Fgandissect\u002Fissues\u002F8",{"id":149,"question_zh":150,"answer_zh":151,"source_url":152},17104,"ablate.py 中使用的 GanImageSegmenter 代码在哪里？","原 ablate.py 文件已被新版本 evalablate.py 取代并删除。目前使用的是 UnifiedParsingSegmenter 作为新的图像分割器。相关代码已更新以支持 PyTorch 1.0+，请在最新代码库中查看 evalablate.py 及相关注释。","https:\u002F\u002Fgithub.com\u002FCSAILVision\u002Fgandissect\u002Fissues\u002F7",{"id":154,"question_zh":155,"answer_zh":156,"source_url":157},17105,"如何训练自己的数据集？","可以参考 https:\u002F\u002Fgithub.com\u002FCSAILVision\u002Fsemantic-segmentation-pytorch 仓库，其中提供了训练语义分割模型的示例代码和流程。","https:\u002F\u002Fgithub.com\u002FCSAILVision\u002Fgandissect\u002Fissues\u002F6",{"id":159,"question_zh":160,"answer_zh":161,"source_url":162},17106,"GANPaint 能否对非 GAN 生成的真实图像进行编辑（绘画）？","目前不支持。这是一个自然的扩展方向，但需要训练一个与生成器匹配的编码器（encoder）才能实现。如果您尝试实现，欢迎反馈结果。","https:\u002F\u002Fgithub.com\u002FCSAILVision\u002Fgandissect\u002Fissues\u002F4",[]]