[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-LouieYang--deep-photo-styletransfer-tf":3,"tool-LouieYang--deep-photo-styletransfer-tf":62},[4,18,26,35,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,2,"2026-04-10T11:39:34",[14,15,13],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":32,"last_commit_at":41,"category_tags":42,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[43,13,15,14],"插件",{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":10,"last_commit_at":50,"category_tags":51,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[52,15,13,14],"语言模型",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"status":17},4292,"Deep-Live-Cam","hacksider\u002FDeep-Live-Cam","Deep-Live-Cam 是一款专注于实时换脸与视频生成的开源工具，用户仅需一张静态照片，即可通过“一键操作”实现摄像头画面的即时变脸或制作深度伪造视频。它有效解决了传统换脸技术流程繁琐、对硬件配置要求极高以及难以实时预览的痛点，让高质量的数字内容创作变得触手可及。\n\n这款工具不仅适合开发者和技术研究人员探索算法边界，更因其极简的操作逻辑（仅需三步：选脸、选摄像头、启动），广泛适用于普通用户、内容创作者、设计师及直播主播。无论是为了动画角色定制、服装展示模特替换，还是制作趣味短视频和直播互动，Deep-Live-Cam 都能提供流畅的支持。\n\n其核心技术亮点在于强大的实时处理能力，支持口型遮罩（Mouth Mask）以保留使用者原始的嘴部动作，确保表情自然精准；同时具备“人脸映射”功能，可同时对画面中的多个主体应用不同面孔。此外，项目内置了严格的内容安全过滤机制，自动拦截涉及裸露、暴力等不当素材，并倡导用户在获得授权及明确标注的前提下合规使用，体现了技术发展与伦理责任的平衡。",88924,"2026-04-06T03:28:53",[14,15,13,61],"视频",{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":77,"owner_location":78,"owner_email":79,"owner_twitter":76,"owner_website":76,"owner_url":80,"languages":81,"stars":86,"forks":87,"last_commit_at":88,"license":76,"difficulty_score":89,"env_os":90,"env_gpu":91,"env_ram":90,"env_deps":92,"category_tags":101,"github_topics":76,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":102,"updated_at":103,"faqs":104,"releases":145},8497,"LouieYang\u002Fdeep-photo-styletransfer-tf","deep-photo-styletransfer-tf","Tensorflow (Python API) implementation of Deep Photo Style Transfer","deep-photo-styletransfer-tf 是一款基于 TensorFlow 实现的深度学习工具，专注于将一张照片的艺术风格自然迁移到另一张照片上。它解决了传统风格迁移算法在处理真实摄影作品时，容易出现色彩失真、纹理模糊或光影不协调的问题，能够生成视觉效果更加逼真、细节保留更完整的风格化图像。\n\n这款工具特别适合研究人员、开发者以及对图像算法感兴趣的设计师使用。用户只需提供内容图片、风格图片及其对应的分割掩码，即可通过命令行轻松完成风格转换。其技术亮点在于完整复现了原论文中的 L-BFGS-B 优化器，并兼容 Adam 优化器以适应不同版本的 TensorFlow；同时，项目摆脱了对 MATLAB 的依赖，利用自动微分机制简化了计算流程，并支持 CUDA 加速以提升运行效率。需要注意的是，该软件目前仅限学术研究与非商业用途，是探索高质量照片风格迁移技术的优秀开源参考。","# deep-photo-styletransfer-tf\n\nThis is a pure Tensorflow implementation of [Deep Photo Styletransfer](https:\u002F\u002Farxiv.org\u002Fabs\u002F1703.07511), the torch implementation could be found [here](https:\u002F\u002Fgithub.com\u002Fluanfujun\u002Fdeep-photo-styletransfer)\n\nThis implementation support [L-BFGS-B](https:\u002F\u002Fwww.tensorflow.org\u002Fapi_docs\u002Fpython\u002Ftf\u002Fcontrib\u002Fopt\u002FScipyOptimizerInterface) (which is what the original authors used) and [Adam](https:\u002F\u002Fwww.tensorflow.org\u002Fapi_docs\u002Fpython\u002Ftf\u002Ftrain\u002FAdamOptimizer) in case the ScipyOptimizerInterface incompatible when Tensorflow upgrades to higher version.\n\nThis implementation may seem to be a little bit simpler thanks to Tensorflow's [automatic differentiation](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FAutomatic_differentiation)\n\nAdditionally, there is no dependency on MATLAB thanks to another [repository](https:\u002F\u002Fgithub.com\u002Fmartinbenson\u002Fdeep-photo-styletransfer\u002Fblob\u002Fmaster\u002Fdeep_photo.py) computing Matting Laplacian Sparse Matrix. Below is example of transferring the photo style to another photograph.\n\n\u003Cp align=\"center\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_9db4127ce4df.png\" width=\"512\"\u002F>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_13320b412efe.png\" width=\"290\"\u002F>\n\u003C\u002Fp>\n\n## Disclaimer\n**This software is published for academic and non-commercial use only.**\n\n## Setup\n### Dependencies\n* [Tensorflow](https:\u002F\u002Fwww.tensorflow.org\u002F)\n* [Numpy](www.numpy.org\u002F)\n* [Pillow](https:\u002F\u002Fpypi.python.org\u002Fpypi\u002FPillow\u002F)\n* [Scipy](https:\u002F\u002Fwww.scipy.org\u002F)\n* [PyCUDA](https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Fpycuda) (used in smooth local affine, tested on CUDA 8.0)\n\n***It is recommended to use [Anaconda Python](https:\u002F\u002Fwww.continuum.io\u002Fanaconda-overview), since you only need to install Tensorflow and PyCUDA manually to setup. The CUDA is optional but really recommended***\n\n### Download the VGG-19 model weights\nThe VGG-19 model of tensorflow is adopted from [VGG Tensorflow](https:\u002F\u002Fgithub.com\u002Fmachrisaa\u002Ftensorflow-vgg) with few modifications on the class interface. The VGG-19 model weights is stored as .npy file and could be download from [Google Drive](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F0BxvKyd83BJjYY01PYi1XQjB5R0E\u002Fview?usp=sharing&resourcekey=0-Q2AewV9J7IYVNUDSnwPuCA) or [BaiduYun Pan](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1o9weflK). After downloading, copy the weight file to the **.\u002Fproject\u002Fvgg19** directory\n\n## Usage\n### Basic Usage\nYou need to specify the path of content image, style image, content image segmentation, style image segmentation and then run the command\n\n```\npython deep_photostyle.py --content_image_path \u003Cpath_to_content_image> --style_image_path \u003Cpath_to_style_image> --content_seg_path \u003Cpath_to_content_segmentation> --style_seg_path \u003Cpath_to_style_segmentation> --style_option 2\n```\n\n*Example:*\n```\npython deep_photostyle.py --content_image_path .\u002Fhttps:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_6ee3806c3f8e.png --style_image_path .\u002Fhttps:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_9a3587d9bbf5.png --content_seg_path .\u002Fexamples\u002Fsegmentation\u002Fin11.png --style_seg_path .\u002Fexamples\u002Fsegmentation\u002Ftar11.png --style_option 2\n```\n\n### Other Options\n\n`--style_option` specifies three different ways of style transferring. `--style_option 0` is to generate segmented intermediate result like torch file **neuralstyle_seg.lua** in torch. `--style_option 1` uses this intermediate result to generate final result like torch file **deepmatting_seg.lua**. `--style_option 2` combines these two steps as a one line command to generate the final result directly.\n\n`--content_weight` specifies the weight of the content loss (default=5), `--style_weight` specifies the weight of the style loss (default=100), `--tv_weight` specifies the weight of variational loss (default=1e-3) and `--affine_weight` specifies the weight of affine loss (default=1e4). You can change the values of these weight and play with them to create different photos.\n\n`--serial` specifies the folder that you want to store the temporary result **out_iter_XXX.png**. The default value of it is `.\u002F`. You can simply `mkdir result` and set `--serial .\u002Fresult` to store them. **Again, the temporary results are simply clipping the image into [0, 255] without smoothing. Since for now, the smoothing operations need pycuda and pycuda will have conflict with tensorflow when using single GPU**\n\nRun `python deep_photostyle.py --help` to see a list of all options\n\n### Image Segmentation\nThis repository doesn't offer image segmentation script and simply use the segmentation image from the [torch version](https:\u002F\u002Fgithub.com\u002Fluanfujun\u002Fdeep-photo-styletransfer). The mask colors used are also the same as them. You could specify your own segmentation model and mask color to customize your own style transfer.\n\n\n## Examples\nHere are more results from tensorflow algorithm (from left to right are input, style, torch results and tensorflow results)\n\n\u003Cp align=\"center\">\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_28ce743afdc2.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_3120049d4424.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_cce76fd9c85e.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_6ed68cc57112.png' height='140' width='210'\u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_26cc1b968813.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_35b0f497e0dc.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_b38864592e96.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_a963510a3025.png' height='140' width='210'\u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_06147c990a5b.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_1e6053702534.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_12aa82a5981c.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_340ce766b331.png' height='140' width='210'\u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_88365c0c5a03.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_e10a7ed5e6f5.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_e41f0d3f00f7.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_c1b488b0565a.png' height='140' width='210'\u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_39f6a52833a2.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_583f4ea5aad4.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_b1f1a7b052a1.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_a98cba1f7416.png' height='140' width='210'\u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_6ee3806c3f8e.png' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_9a3587d9bbf5.png' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_8eb02f410f29.png' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_cc50b7e65681.png' width='210'\u002F>\n\u003C\u002Fp>\n\n## Acknowledgement\n\n* This work was done when Yang Liu was a research intern at *Alibaba-Zhejiang University Joint Research Institute of Frontier Technologies*, under the supervision of [Prof. Mingli Song](http:\u002F\u002Fperson.zju.edu.cn\u002Fen\u002Fmsong) and [Yongcheng Jing](http:\u002F\u002Fyongchengjing.com\u002F).\n\n* Our tensorflow implementation basically follows the [torch code](https:\u002F\u002Fgithub.com\u002Fluanfujun\u002Fdeep-photo-styletransfer).\n\n* We use [martinbenson](https:\u002F\u002Fgithub.com\u002Fmartinbenson)'s [python code](https:\u002F\u002Fgithub.com\u002Fmartinbenson\u002Fdeep-photo-styletransfer\u002Fblob\u002Fmaster\u002Fdeep_photo.py) to compute Matting Laplacian.\n\n## Citation\nIf you find this code useful for your research, please cite:\n```\n@misc{YangPhotoStyle2017,\n  author = {Yang Liu},\n  title = {deep-photo-style-transfer-tf},\n  publisher = {GitHub},\n  organization={Alibaba-Zhejiang University Joint Research Institute of Frontier Technologies},\n  year = {2017},\n  howpublished = {\\url{https:\u002F\u002Fgithub.com\u002FLouieYang\u002Fdeep-photo-styletransfer-tf}}\n}\n```\n\n## Contact\nFeel free to contact me if there is any question (Yang Liu lyng_95@zju.edu.cn).\n","# 深度照片风格迁移-tf\n\n这是一个纯 TensorFlow 实现的 [深度照片风格迁移](https:\u002F\u002Farxiv.org\u002Fabs\u002F1703.07511)，其 PyTorch 实现可参见 [这里](https:\u002F\u002Fgithub.com\u002Fluanfujun\u002Fdeep-photo-styletransfer)。\n\n该实现支持 [L-BFGS-B](https:\u002F\u002Fwww.tensorflow.org\u002Fapi_docs\u002Fpython\u002Ftf\u002Fcontrib\u002Fopt\u002FScipyOptimizerInterface)（即原作者所使用的优化器）和 [Adam](https:\u002F\u002Fwww.tensorflow.org\u002Fapi_docs\u002Fpython\u002Ftf\u002Ftrain\u002FAdamOptimizer)，以应对 TensorFlow 升级到更高版本时 ScipyOptimizerInterface 可能出现的兼容性问题。\n\n得益于 TensorFlow 的 [自动微分](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FAutomatic_differentiation)，此实现显得更为简洁。\n\n此外，由于另一个 [仓库](https:\u002F\u002Fgithub.com\u002Fmartinbenson\u002Fdeep-photo-styletransfer\u002Fblob\u002Fmaster\u002Fdeep_photo.py) 已经计算好了 Matting Laplacian 稀疏矩阵，因此本项目不再依赖 MATLAB。以下是将一张照片的风格迁移到另一张照片的示例：\n\n\u003Cp align=\"center\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_9db4127ce4df.png\" width=\"512\"\u002F>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_13320b412efe.png\" width=\"290\"\u002F>\n\u003C\u002Fp>\n\n## 免责声明\n**本软件仅用于学术研究和非商业用途。**\n\n## 安装\n### 依赖项\n* [TensorFlow](https:\u002F\u002Fwww.tensorflow.org\u002F)\n* [NumPy](www.numpy.org\u002F)\n* [Pillow](https:\u002F\u002Fpypi.python.org\u002Fpypi\u002FPillow\u002F)\n* [SciPy](https:\u002F\u002Fwww.scipy.org\u002F)\n* [PyCUDA](https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Fpycuda)（用于平滑局部仿射变换，已在 CUDA 8.0 上测试过）\n\n***建议使用 [Anaconda Python](https:\u002F\u002Fwww.continuum.io\u002Fanaconda-overview)，因为只需手动安装 TensorFlow 和 PyCUDA 即可完成配置。CUDA 并非必需，但强烈推荐使用***\n\n### 下载 VGG-19 模型权重\n本项目采用的 TensorFlow 版 VGG-19 模型源自 [VGG Tensorflow](https:\u002F\u002Fgithub.com\u002Fmachrisaa\u002Ftensorflow-vgg)，并对类接口做了一些小修改。VGG-19 模型权重以 .npy 文件形式存储，可从 [Google Drive](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F0BxvKyd83BJjYY01PYi1XQjB5R0E\u002Fview?usp=sharing&resourcekey=0-Q2AewV9J7IYVNUDSnwPuCA) 或 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1o9weflK) 下载。下载后，请将权重文件复制到 **.\u002Fproject\u002Fvgg19** 目录下。\n\n## 使用方法\n### 基本用法\n您需要指定内容图像路径、风格图像路径、内容图像分割掩码路径、风格图像分割掩码路径，然后运行以下命令：\n\n```\npython deep_photostyle.py --content_image_path \u003C内容图像路径 > --style_image_path \u003C 风格图像路径 > --content_seg_path \u003C 内容分割掩码路径 > --style_seg_path \u003C 风格分割掩码路径 > --style_option 2\n```\n\n*示例：*\n```\npython deep_photostyle.py --content_image_path .\u002Fhttps:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_6ee3806c3f8e.png --style_image_path .\u002Fhttps:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_9a3587d9bbf5.png --content_seg_path .\u002Fexamples\u002Fsegmentation\u002Fin11.png --style_seg_path .\u002Fexamples\u002Fsegmentation\u002Ftar11.png --style_option 2\n```\n\n### 其他选项\n\n`--style_option` 指定三种不同的风格迁移方式。`--style_option 0` 会生成类似于 PyTorch 文件 **neuralstyle_seg.lua** 的分割中间结果；`--style_option 1` 则利用该中间结果生成最终结果，类似 PyTorch 文件 **deepmatting_seg.lua**；而 `--style_option 2` 将这两个步骤合并为一条命令，直接生成最终结果。\n\n`--content_weight` 指定内容损失的权重（默认值为 5），`--style_weight` 指定风格损失的权重（默认值为 100），`--tv_weight` 指定变分损失的权重（默认值为 1e-3），`--affine_weight` 指定仿射损失的权重（默认值为 1e4）。您可以调整这些权重的值，尝试不同的组合以创作出独特的作品。\n\n`--serial` 指定用于存储临时结果 **out_iter_XXX.png** 的文件夹。默认值为 `.\u002F`。您可以简单地创建一个 `result` 文件夹，并设置 `--serial .\u002Fresult` 来保存这些临时结果。**需要注意的是，这些临时结果只是将图像像素值截断到 [0, 255] 范围内，未进行平滑处理。目前，平滑操作需要使用 PyCUDA，而 PyCUDA 在单 GPU 环境下与 TensorFlow 存在冲突。**\n\n运行 `python deep_photostyle.py --help` 可查看所有选项列表。\n\n### 图像分割\n本项目并未提供图像分割脚本，而是直接使用来自 [PyTorch 版本](https:\u002F\u002Fgithub.com\u002Fluanfujun\u002Fdeep-photo-styletransfer) 的分割图像。所使用的掩码颜色也与 PyTorch 版本一致。您也可以指定自己的分割模型和掩码颜色，以定制个性化的风格迁移效果。\n\n## 示例\n以下是 TensorFlow 算法生成的更多结果（从左至右依次为输入图像、风格图像、PyTorch 结果和 TensorFlow 结果）：\n\n\u003Cp align=\"center\">\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_28ce743afdc2.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_3120049d4424.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_cce76fd9c85e.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_6ed68cc57112.png' height='140' width='210'\u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_26cc1b968813.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_35b0f497e0dc.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_b38864592e96.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_a963510a3025.png' height='140' width='210'\u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_06147c990a5b.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_1e6053702534.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_12aa82a5981c.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_340ce766b331.png' height='140' width='210'\u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_88365c0c5a03.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_e10a7ed5e6f5.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_e41f0d3f00f7.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_c1b488b0565a.png' height='140' width='210'\u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_39f6a52833a2.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_583f4ea5aad4.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_b1f1a7b052a1.png' height='140' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_a98cba1f7416.png' height='140' width='210'\u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_6ee3806c3f8e.png' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_9a3587d9bbf5.png' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_8eb02f410f29.png' width='210'\u002F>\n    \u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_readme_cc50b7e65681.png' width='210'\u002F>\n\u003C\u002Fp>\n\n## 致谢\n\n* 本工作完成于刘洋在*阿里巴巴-浙江大学前沿技术联合研究中心*担任研究实习生期间，在[宋明利教授](http:\u002F\u002Fperson.zju.edu.cn\u002Fen\u002Fmsong)和[景永成](http:\u002F\u002Fyongchengjing.com\u002F)的指导下进行。\n\n* 我们的TensorFlow实现基本遵循了[PyTorch代码](https:\u002F\u002Fgithub.com\u002Fluanfujun\u002Fdeep-photo-styletransfer)。\n\n* 我们使用[martinbenson](https:\u002F\u002Fgithub.com\u002Fmartinbenson)的[Python代码](https:\u002F\u002Fgithub.com\u002Fmartinbenson\u002Fdeep-photo-styletransfer\u002Fblob\u002Fmaster\u002Fdeep_photo.py)来计算抠图拉普拉斯算子。\n\n## 引用\n如果您发现此代码对您的研究有所帮助，请引用：\n```\n@misc{YangPhotoStyle2017,\n  author = {刘洋},\n  title = {deep-photo-style-transfer-tf},\n  publisher = {GitHub},\n  organization={阿里巴巴-浙江大学前沿技术联合研究中心},\n  year = {2017},\n  howpublished = {\\url{https:\u002F\u002Fgithub.com\u002FLouieYang\u002Fdeep-photo-styletransfer-tf}}\n}\n```\n\n## 联系方式\n如有任何问题，欢迎随时与我联系（刘洋 lyng_95@zju.edu.cn）。","# deep-photo-styletransfer-tf 快速上手指南\n\n## 环境准备\n\n### 系统要求\n- **操作系统**：Linux \u002F macOS (Windows 需自行配置 CUDA 环境)\n- **Python**：推荐 Python 3.6+\n- **GPU**：可选，但强烈建议配备 NVIDIA GPU 以加速计算（需安装 CUDA，测试版本为 CUDA 8.0）\n\n### 前置依赖\n本项目依赖以下核心库：\n- TensorFlow\n- NumPy\n- Pillow\n- SciPy\n- PyCUDA (用于平滑局部仿射变换，若无需此功能或遇到冲突可忽略，但会影响最终平滑效果)\n\n> **推荐方案**：使用 [Anaconda](https:\u002F\u002Fwww.continuum.io\u002Fanaconda-overview) 管理环境。国内用户可使用清华源加速安装：\n> ```bash\n> conda config --add channels https:\u002F\u002Fmirrors.tuna.tsinghua.edu.cn\u002Fanaconda\u002Fpkgs\u002Fmain\u002F\n> ```\n\n## 安装步骤\n\n1. **创建并激活虚拟环境**（可选但推荐）\n   ```bash\n   conda create -n photo_style python=3.6\n   conda activate photo_style\n   ```\n\n2. **安装基础依赖**\n   ```bash\n   pip install numpy pillow scipy\n   # 如果使用国内镜像\n   # pip install -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple numpy pillow scipy\n   ```\n\n3. **安装 TensorFlow**\n   根据是否有 GPU 选择安装版本：\n   ```bash\n   # CPU 版本\n   pip install tensorflow==1.x\n   # GPU 版本 (需确保已安装对应版本的 CUDA 和 cuDNN)\n   pip install tensorflow-gpu==1.x\n   ```\n   *注：本项目基于 TensorFlow 1.x 开发，建议使用 1.12-1.15 版本以保证 `tf.contrib` 模块可用。*\n\n4. **安装 PyCUDA** (可选，用于最佳平滑效果)\n   ```bash\n   pip install pycuda\n   ```\n\n5. **下载预训练模型权重**\n   下载 VGG-19 模型权重文件 (`imagenet-vgg-verydeep-19.npy`)。\n   - **下载地址**：\n     - [Google Drive](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F0BxvKyd83BJjYY01PYi1XQjB5R0E\u002Fview?usp=sharing)\n     - [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1o9weflK) (提取码请参考原项目页面)\n   \n   下载完成后，将文件放入项目目录：\n   ```bash\n   mkdir -p .\u002Fproject\u002Fvgg19\n   cp imagenet-vgg-verydeep-19.npy .\u002Fproject\u002Fvgg19\u002F\n   ```\n\n## 基本使用\n\n使用前请准备好四张图片：\n1. **内容图像** (Content Image)\n2. **风格图像** (Style Image)\n3. **内容图像分割掩码** (Content Segmentation)\n4. **风格图像分割掩码** (Style Segmentation)\n*(分割掩码可从原 Torch 项目获取或使用自定义分割模型生成)*\n\n运行以下命令进行风格迁移：\n\n```bash\npython deep_photostyle.py --content_image_path .\u002Fexamples\u002Finput\u002Fin11.png --style_image_path .\u002Fexamples\u002Fstyle\u002Ftar11.png --content_seg_path .\u002Fexamples\u002Fsegmentation\u002Fin11.png --style_seg_path .\u002Fexamples\u002Fsegmentation\u002Ftar11.png --style_option 2\n```\n\n### 参数说明\n- `--style_option 2`：一键完成所有步骤并直接生成最终结果（推荐）。\n  - `0`: 仅生成分割中间结果。\n  - `1`: 使用中间结果生成最终结果。\n- `--serial .\u002Fresult`：(可选) 指定临时结果保存文件夹。\n\n生成的最终图片将默认保存在当前目录下。","一位独立游戏开发者需要为复古风格的角色扮演游戏快速生成大量具有统一手绘油画质感的场景背景图。\n\n### 没有 deep-photo-styletransfer-tf 时\n- 设计师必须手动在 Photoshop 中逐张调整滤镜和笔触，处理一张高分辨率背景图耗时超过 2 小时，严重拖慢开发进度。\n- 简单的风格滤镜往往导致画面细节丢失，角色轮廓模糊，无法区分前景物体与背景纹理，后期修图成本极高。\n- 缺乏对局部语义的理解，天空的色彩风格错误地渲染到了地面建筑上，导致画面逻辑混乱，需要人工蒙版反复修补。\n- 难以批量复用风格，每次更换参考图都需要重新调整参数，无法保证整个游戏关卡视觉风格的高度一致性。\n\n### 使用 deep-photo-styletransfer-tf 后\n- 开发者只需提供内容图和风格参考图，配合分割掩码运行一行命令，即可在数分钟内自动生成高质量的艺术化背景，效率提升数十倍。\n- 基于深度学习的算法完美保留了原图的几何结构和边缘细节，确保游戏角色和交互元素清晰可辨，无需二次修图。\n- 利用语义分割引导传输，工具能精准地将油画的笔触仅应用于天空或草地等特定区域，彻底解决了色彩串扰问题。\n- 通过微调 `content_weight` 和 `style_weight` 参数，可轻松将同一套油画风格批量应用到上百张不同场景图中，确保美术风格统一。\n\ndeep-photo-styletransfer-tf 将原本繁琐的手工艺术加工转化为自动化的代码流程，让小型团队也能以极低成本实现电影级的视觉风格迁移。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLouieYang_deep-photo-styletransfer-tf_9db4127c.png","LouieYang","Yang Liu","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FLouieYang_8dd836ce.jpg",null,"Qwen 🚀","Hangzhou, China","lyng_95@zju.edu.cn","https:\u002F\u002Fgithub.com\u002FLouieYang",[82],{"name":83,"color":84,"percentage":85},"Python","#3572A5",100,808,183,"2026-03-21T11:20:15",4,"未说明","可选但强烈推荐。需要 NVIDIA GPU 以支持 PyCUDA（测试环境为 CUDA 8.0）。若使用单张 GPU，PyCUDA 可能与 TensorFlow 冲突，导致部分平滑操作无法运行。",{"notes":93,"python":94,"dependencies":95},"1. 建议使用 Anaconda 管理环境，只需手动安装 TensorFlow 和 PyCUDA。2. 需预先下载 VGG-19 模型权重文件 (.npy) 并放置于 .\u002Fproject\u002Fvgg19 目录。3. 该工具依赖外部提供的图像分割掩码图，仓库本身不包含分割脚本。4. 软件仅限学术和非商业用途。5. 临时结果默认不经过平滑处理，因为平滑操作依赖的 PyCUDA 在单 GPU 模式下可能与 TensorFlow 冲突。","未说明 (推荐使用 Anaconda Python)",[96,97,98,99,100],"Tensorflow","Numpy","Pillow","Scipy","PyCUDA",[15],"2026-03-27T02:49:30.150509","2026-04-18T00:50:34.282927",[105,110,115,120,125,130,135,140],{"id":106,"question_zh":107,"answer_zh":108,"source_url":109},38035,"运行时报错 'ImportError: No module named vgg19.vgg' 如何解决？","该问题通常是由于缺少 __init__.py 文件导致 Python 无法将目录识别为包。解决方法是在 vgg19 目录下创建一个空的 __init__.py 文件。重新克隆仓库通常也能解决此问题，因为最新版本已包含该文件。","https:\u002F\u002Fgithub.com\u002FLouieYang\u002Fdeep-photo-styletransfer-tf\u002Fissues\u002F3",{"id":111,"question_zh":112,"answer_zh":113,"source_url":114},38036,"如何在没有提供分割掩码（segmentation masks）的情况下进行风格迁移？","可以传入一个与输入图像尺寸相同的空白图片（如全黑 PNG）作为掩码参数。虽然效果可能略差，但程序可以正常运行。也可以修改代码，当未提供掩码时自动使用 np.zeros_like 生成空白掩码。","https:\u002F\u002Fgithub.com\u002FLouieYang\u002Fdeep-photo-styletransfer-tf\u002Fissues\u002F12",{"id":116,"question_zh":117,"answer_zh":118,"source_url":119},38037,"如何批量处理多张图片而不遇到 'GraphDef cannot be larger than 2GB' 错误？","不要直接在 Python 代码中使用 for 循环调用算法，这会导致计算图累积过大。建议编写一个 Shell 脚本，在循环中多次独立调用 python 命令。示例脚本如下：\nfor i in {1..10}\ndo\n    python deep_photostyle.py \\\n        --content_image_path .\u002Fexamples\u002Finput\u002F$i.png \\\n        --style_image_path .\u002Fexamples\u002Fstyle\u002Ftar11.png \\\n        --content_seg_path .\u002Fexamples\u002Fsegmentation\u002F$i.png \\\n        --style_seg_path .\u002Fexamples\u002Fsegmentation\u002Ftar11.png \\\n        --style_option 2\ndone","https:\u002F\u002Fgithub.com\u002FLouieYang\u002Fdeep-photo-styletransfer-tf\u002Fissues\u002F14",{"id":121,"question_zh":122,"answer_zh":123,"source_url":124},38038,"Windows 10 下运行报错 'TypeError: No registered converter was able to produce a C++ rvalue of type unsigned int...' 怎么办？","这是 Windows 环境下 pyCUDA 类型转换的问题。需要在 smooth_local_affine.py 文件中，将传递给 CUDA 内核函数的浮点型参数（如 epsilon, radius 等）显式转换为整数类型（如 np.int32 或 int）后再传入，以匹配 C++ 端的 unsigned int 类型要求。","https:\u002F\u002Fgithub.com\u002FLouieYang\u002Fdeep-photo-styletransfer-tf\u002Fissues\u002F7",{"id":126,"question_zh":127,"answer_zh":128,"source_url":129},38039,"程序运行时无故中断或卡住，且显示 TensorFlow 警告信息，如何解决？","这通常与 TensorFlow 版本或 L-BFGS-B 优化器有关。尝试将 TensorFlow 版本更新或降级到 1.4.1 版本通常可以解决此问题。同时请检查您的 CUDA 版本是否与 TensorFlow 兼容。","https:\u002F\u002Fgithub.com\u002FLouieYang\u002Fdeep-photo-styletransfer-tf\u002Fissues\u002F21",{"id":131,"question_zh":132,"answer_zh":133,"source_url":134},38040,"无法从 Google Drive 下载 VGG 权重文件（无权限或直接下载链接失效）怎么办？","如果原始链接无法直接下载，可以尝试使用维护者提供的备用分享链接获取权重文件。例如使用包含 resourcekey 参数的新链接进行下载。","https:\u002F\u002Fgithub.com\u002FLouieYang\u002Fdeep-photo-styletransfer-tf\u002Fissues\u002F32",{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},38041,"该项目支持实时风格迁移吗？","不支持。该项目基于迭代优化方法，需要针对每对（内容，风格）图像进行多次迭代计算，并且依赖分割图，因此无法实现实时风格迁移或“每个风格一个模型”的快速推理模式。","https:\u002F\u002Fgithub.com\u002FLouieYang\u002Fdeep-photo-styletransfer-tf\u002Fissues\u002F1",{"id":141,"question_zh":142,"answer_zh":143,"source_url":144},38042,"如果想修改损失函数并从头训练新模型，应该修改哪个文件？","主要的逻辑和损失函数定义位于 photo_style.py 文件中。您可以在此文件中修改相关的损失项并重新运行训练流程。","https:\u002F\u002Fgithub.com\u002FLouieYang\u002Fdeep-photo-styletransfer-tf\u002Fissues\u002F23",[]]