[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-jiny2001--dcscn-super-resolution":3,"tool-jiny2001--dcscn-super-resolution":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 真正成长为懂上",149489,2,"2026-04-10T11:32:46",[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":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":73,"owner_website":80,"owner_url":81,"languages":82,"stars":91,"forks":92,"last_commit_at":93,"license":94,"difficulty_score":32,"env_os":95,"env_gpu":96,"env_ram":97,"env_deps":98,"category_tags":108,"github_topics":109,"view_count":32,"oss_zip_url":79,"oss_zip_packed_at":79,"status":17,"created_at":115,"updated_at":116,"faqs":117,"releases":147},6379,"jiny2001\u002Fdcscn-super-resolution","dcscn-super-resolution","A tensorflow implementation of \"Fast and Accurate Image Super Resolution by Deep CNN with Skip Connection and Network in Network\", a deep learning based Single-Image Super-Resolution (SISR) model.","dcscn-super-resolution 是一个基于 TensorFlow 实现的深度学习图像超分辨率工具，旨在将低分辨率图片快速、准确地还原为高清图像。它主要解决了传统插值算法（如双三次插值）导致的图像模糊和细节丢失问题，通过人工智能技术从单张低清图片中重建出丰富的高频细节。\n\n这款工具非常适合计算机视觉研究人员、AI 开发者以及需要批量提升图像质量的设计师使用。对于希望深入理解或改进单图像超分辨率（SISR）模型的技术人员来说，它提供了一个结构清晰且高效的参考实现。\n\ndcscn-super-resolution 的核心亮点在于其独特的网络架构设计。它结合了深度卷积神经网络（Deep CNN）、残差连接（Skip Connection）以及“网络中的网络”（Network in Network）结构，能够同时捕捉图像的局部特征与全局信息。此外，该工具还集成了像素重排（Pixel Shuffler）、转置卷积、自集成（Self Ensemble）以及深度可分离卷积等先进技术。这些特性不仅显著提升了图像复原的精度（PSNR），还有效降低了模型复杂度，使其在保持轻量级的同时，性能优于","dcscn-super-resolution 是一个基于 TensorFlow 实现的深度学习图像超分辨率工具，旨在将低分辨率图片快速、准确地还原为高清图像。它主要解决了传统插值算法（如双三次插值）导致的图像模糊和细节丢失问题，通过人工智能技术从单张低清图片中重建出丰富的高频细节。\n\n这款工具非常适合计算机视觉研究人员、AI 开发者以及需要批量提升图像质量的设计师使用。对于希望深入理解或改进单图像超分辨率（SISR）模型的技术人员来说，它提供了一个结构清晰且高效的参考实现。\n\ndcscn-super-resolution 的核心亮点在于其独特的网络架构设计。它结合了深度卷积神经网络（Deep CNN）、残差连接（Skip Connection）以及“网络中的网络”（Network in Network）结构，能够同时捕捉图像的局部特征与全局信息。此外，该工具还集成了像素重排（Pixel Shuffler）、转置卷积、自集成（Self Ensemble）以及深度可分离卷积等先进技术。这些特性不仅显著提升了图像复原的精度（PSNR），还有效降低了模型复杂度，使其在保持轻量级的同时，性能优于许多同类深度学习方法。无论是用于学术研究还是实际工程部署，它都是一个兼具速度与精度的优秀选择。","\n# Fast and Accurate Image Super Resolution by Deep CNN with Skip Connection and Network in Network\n\nby [Jin Yamanaka](https:\u002F\u002Fgithub.com\u002Fjiny2001), Shigesumi Kuwashima and [Takio Kurita](http:\u002F\u002Fhome.hiroshima-u.ac.jp\u002Ftkurita\u002Fprofile-e.html)\n\n\n## Overview (Ver 2.)\n\nThis is a tensorflow implementation of [\"Fast and Accurate Image Super Resolution by Deep CNN with Skip Connection and Network in Network\"](https:\u002F\u002Farxiv.org\u002Fabs\u002F1707.05425), a deep learning based Single-Image Super-Resolution (SISR) model. We named it **DCSCN**. If you are checking the paper's code and results, please check [ver1 branch](https:\u002F\u002Fgithub.com\u002Fjiny2001\u002Fdcscn-super-resolution\u002Ftree\u002Fver1).\n\nThe model structure is like below. We use Deep CNN with Residual Net, Skip Connection and Network in Network. A combination of Deep CNNs and Skip connection layers is used as a feature extractor for image features on both local and global area. Parallelized 1x1 CNNs, like the one called Network in Network, is also used for image reconstruction.\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjiny2001_dcscn-super-resolution_readme_d63e6ede19bb.png\" width=\"800\">\n\nAs a ver2, we also implemented these features.\n\n* __Pixel Shuffler__ from [\"Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network\"\n](https:\u002F\u002Farxiv.org\u002Fabs\u002F1609.05158)\n\n* __Transposed-CNN__ (optional) from [\"Fully Convolutional Networks for Semantic Segmentation\"](https:\u002F\u002Farxiv.org\u002Fabs\u002F1411.4038)\n\n* __Self Ensemble__ from [\"Seven ways to improve example-based single image super resolution\"](https:\u002F\u002Farxiv.org\u002Fabs\u002F1511.02228)\n\n* __Clipping Normalization__ (Gradient clipping)\n\n* Dynamically load training images (optional)\n\n* Add extra layers \u002F Update default parameters for better PSNR result\n\n* __Depthwise Separable Convolutions__ from [\"Xception: Deep Learning with Depthwise Separable Convolutions\"](https:\u002F\u002Farxiv.org\u002Fabs\u002F1610.02357). Added by [Chew Jing Wei](https:\u002F\u002Fgithub.com\u002Ftehtea)\nDepthwise separable convolutions reduce the complexity of your model because it splits the computation\nof a traditional convolutional layer into two steps. The first step is to perform a depthwise convolution, meaning each input \nchannel is convolved in isolation of other channels, then the second step is to perform a pointwise convolution, where the stacked output\nof each depthwise filter is convolved by a 1x1 filter which determines the final number of output channels in that layer. For a more complete yet beginner-friendly explanation, please see https:\u002F\u002Ftowardsdatascience.com\u002Fa-basic-introduction-to-separable-convolutions-b99ec3102728\n\n## Sample result\n\n| Input image (orange) and x4 bicubic | Our DCSCN output |\n|:-------:|:-------:|\n| \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjiny2001_dcscn-super-resolution_readme_fffdaa377f87.png\" width=\"380\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjiny2001_dcscn-super-resolution_readme_e0f2961b433d.png\" width=\"380\"> |\n\nOur model, DCSCN was much lighter than other Deep Learning based SISR models which is [ver 1](https:\u002F\u002Fgithub.com\u002Fjiny2001\u002Fdcscn-super-resolution\u002Ftree\u002Fver1). As a ver2, we use larger model and recent technics to get a better image restoration performace.\n\n\n## Requirements\n\npython >= 3.5\ntensorflow >= 2.0.0, scipy, numpy, pillow, imageio, and scikit-image\n\n\n## Result of PSNR\n\nThe sample result of default parameter is here. The model is trained by DIV2k with 150,000 48x48 images for one epoch.\n\n| Dataset | Scale | Bicubic | c-DCSCN (ver1) | DRCN | VDSR | DCSCN (ver2) | DRRN |\n|:-------:|:-------:|:-------:|:----:|:----:|:----:|:----:|:----:|\n| set5 | x2 | 33.66 | 37.15 | 37.63 | 37.53 | 37.79 | 37.74 |\n|  | x3 | 30.39 | 33.09 | 33.82 | 33.66 | 34.06 | 34.03 |\n|  | x4 | 28.42 | 30.85 | 31.53 | 31.35 | 31.72 | 31.68 |\n| set14 | x2 | 30.24 | 32.74 | 33.04 | 33.03 | 33.25 | 33.23 |\n|  | x3 | 27.55 | 29.47 | 29.76 | 29.77 | 29.95 | 29.96 |\n|  | x4 | 26.00 | 27.76 | 28.02 | 28.01 | 28.25 | 28.21 |\n| bsd100 | x2 | 29.56 | 31.61 | 31.85 | 31.90 | 32.00 | 32.05 |\n|  | x3 | 27.21 | 28.52 | 28.80 | 28.82 | 28.89 | 28.95 |\n|  | x4 | 25.96 | 27.06 | 27.23 | 27.29 | 27.35 | 27.38 |\n\nResults and model will be uploaded in some days!!\n\n## Evaluate\n\nLearned weights for some parameters are included in this GitHub. Execute **evaluate.py** with these args below and you get results in **output** directory. When you want to evaluate with other parameters, try training first then evaluate with same parameters as training have done. Results will be logged at log.txt, please check.\n\nSome pre-trained models are included.\n\n```\n# evaluating set14 dataset\npython3 evaluate.py --test_dataset=set14 --save_results=true\n\n# evaluating set5 dataset with small model\npython3 evaluate.py --test_dataset=set5 --save_results=true --layers=8 --filters=96\n\n# evaluating all(set5,set14,bsd100) dataset\npython3 evaluate.py --test_dataset=all\n\n# evaluate our compact version of DCSCN (c-DCSCN)\npython3 evaluate.py --scale=2 --layers=7 --filters=32 --min_filters=8 --filters_decay_gamma=1.2 --nin_filters=24 --nin_filters2=8 --reconstruct_layers=0 --self_ensemble=1 --batch_image_size=32 --pixel_shuffler_filters=1 --test_dataset=all\n```\n\n## Apply to your own image\n\nPlace your image file in this project directory. And then run \"sr.py --file 'your_image_file'\" to apply Super Resolution. Results will be generated in **output** directory. Please note you should use same args which you used for training.\n\nIf you want to apply this model on your image001.png file, try those.\n\n```\n# apply super resolution on image001.jpg (then see results at output directory)\npython3 sr.py --file=your_file.png\n\n# apply super resolution with small model\npython3 sr.py --file=your_file.png --layers=8 --filters=96\n```\n\n## How to train with your own dataset\n\nYou can train with any datasets. Put your image files as a training dataset into the directory under **data** directory, then specify with --dataset arg. Since There are some important hyper paramters to train, please check [args.py](https:\u002F\u002Fgithub.com\u002Fjiny2001\u002Fdcscn-super-resolution\u002Fblob\u002Fmaster\u002Fhelper\u002Fargs.py) to use other training parameters.\n\nOnce training parameters has been given, **\"model name\"** will be defined by the parameters. For ex, when you use default parameters, **\"model name\"** would be like **\"dcscn_L12_F196to48_NIN_A64_PS_R1F32\"** and this name represents model structure.\n\n```\n# training for x2 with bsd200 dataset\npython3 train.py --dataset=bsd200 --training_images=80000\n\n# training for x3 scale with your own dataset\npython3 train.py --scale=3 --dataset=[your own data directory]\n\n# training for x2 with transposed CNN instead of using Pixel Shuffler layer for up-sampling\npython3 train.py --dataset=bsd200 --training_images=80000 --pixel_shuffler=false\n```\n\n* Each training and evaluation summary will be added to **log.txt**.\n* Model will be saved under **models\u002F\"model name\".ckpt**\n* Evaluation result images would be generated under **output\u002F\"model name\"\u002Fdata\u002F[dataset directory name]**\n* When you use evaluate.py \u002F sr.py, please use completely same args with training so that the script can load your own learned **\"model name\".ckpt**.\n\n\n### Using small model for training\u002Ftest (for CPU)\n\nIn case 1)you're using CPU, 2)training data is small or 3)just want to test if it works, I recommend you to use smaller model. And 8 layers with 96 filters model has enough performance for my DCSCN. When you're using CPU, 4-6 layers with 32-64 filters would be a good starting point.\n\n```\n# training for x2 with smaller model\npython3 train.py --dataset=bsd200 --layers=8 --filters=96 --training_images=30000\n\n# training for x2 with tiny model for test\npython3 train.py --dataset=set5 --layers=4 --filters=32 --use_nin=false --training_images=10000\n```\n\nWe propose compact verison of DCSCN (c-DCSCN) in my paper. When you want to try training with this model, use these option below. (x2 scale)\n```\npython3 train.py --scale=2 --layers=7 --filters=32 --min_filters=8 --filters_decay_gamma=1.2 --nin_filters=24 --nin_filters2=8 --reconstruct_layers=0 --self_ensemble=1 --dataset=yang_bsd_8 --training_images=228688 --batch_image_size=32 --build_batch=True --do_benchmark=True --pixel_shuffler_filters=1\n```\n\n\n\n### Speeding up training\n\nPlease note loading\u002Fconverting batch images for each training is a bit heavy process since there will be a lot of iterations. Here are some options. You can use those option to reduce training time significantly.\n\n1. Use \"convert_y.py\" to convert your dataset images to Y-channel monochrome bitmap.\n\nIf your training data is compressed like PNG or jpeg and the image resolution is larger, you must convert it before. Especially for DIV2K dataset, you can save a big time for decompressing and converting image process.\nAlso in this mode, each input batch image may be flipped horizontally by the probability of 50%.\n\n2. Use \"--build_batch True\" option for smaller dataset\n\nIf your dataset is small enough to store in CPU memory, please use this. It will split source images into batch images and save to reuse before the training. When you're using HDD(not SSD) and the dataset is not large like (Yang91 + BSD200) augmented by 8 methods, this option is nice. It will avoid loading\u002Fconverting process for each batch.\n\nIn this case, batch image positions are adjusted and limited to be on the grid with the half of batch_image_size. However, as far as I experimented, that doesn't affect to PSNR performance so much.\n\n### How can I set --training_images parameter?\n\n--training_images is, the number of patches trained in one epoch. So, usually, it would be better to be same as the number of input training patch images. When you use build_batch=True, the trainer will create a patch images under **\"batch_data\"** before training so that you can see how much batch images are in the train data. \n\nHowever, it really depends on the image type\u002Fvariance and model complexity. You can begin with very small value like 1,000 and if the result is not enough, you can increase it until 100,000 to 200,000.\n\n\n# Important parameters\n\n| Parameter arg | Name | Default | Explanation |\n|:-------:|:-------:|:----:|:----:|\n| layers | Num CNN layers | 12 | Number of layers of feature-extraction CNNs |\n| filters | Num of first CNN filters | 196 | Number of filters of the first feature-extraction CNNs |\n| min_filters | Num of last CNN filters | 48 | Number of filters of the last feature-extraction CNNs |\n| filters_decay_gamma | Decay Gamma | 1.5 | Number of CNN filters are decayed from [filters] to [min_filters] by this gamma on each layers |\n| pixel_shuffler | Pixel Shuffler | True | Use Pixel Shuffler as up-sampling layer. If it's False, use transposed CNN as up-sampling layer. |\n| self_ensemble | Self Ensemble | 8 | Apply SR for 1-8 flipped\u002Frotate images and then use mean image as result. |\n| training_images | Batch images for training epoch | 24000 | This number of batch images are used for training one epoch. I usually use 100,000 batch images for each 10 epochs for each Learning Rate. |\n| dropout_rate | Dropout rate | 0.8 | Output nodes should be kept by this probability. Should be 1 >= drop out > 0. If 1, don't use dropout. |\n| initializer | Initialize method | he | Initialize method of each weight. Can be one of [uniform, stddev, xavier, he, identity, zero]. |\n| activator | Activator function | prelu | Type of activator functions for each CNN. Can be one of [relu, leaky_relu, prelu, sigmoid, tanh] |\n| optimizer | Optimizer function | adam | Method of optimizer. Can be one of [gd, momentum, adadelta, adagrad, adam, rmsprop] |\n| batch_image_size | Image size for each Batch | 48 | Each training image will be splitted this size. |\n| batch_num | Image num for each batch | 20 | Number of batch images for one training step. |\n| clipping_norm | value for gradient clipping | 5 | Norm for gradient clipping. If it's \u003C= 0 we don't use gradient clipping. |\n\nAlso learning late and other model parameters are still important.\n\nWe'll train [ __training_images__ \u002F __batch_num__ ] steps for each epoch. Learning rate will be started from __initial_lr__. After [lr_decay_epoch] epochs has done, learning rate will be decayed by __lr_decay__. And when the current learning rate gets lower than __end_lr__, then training will be finished.\n\nUsually you can control how much iterate the training batch by adjusting __training_images__ and __lr_decay_epoch__. Please check arg.py for other params.\n\n## Data augmentation\n\nTo get a better performance, data augmentation is needed. You can use **augmentation.py** to build an augmented dataset. The arg, augment_level = 4, means it will add right-left, top-bottom and right-left and top-bottom fillped images to make 4 times bigger dataset. And there **yang91_4** directory will be generated as an augmented dataset.\n\nTo have better model, you should use larger training data like (BSD200 + Yang91) x (8 augment) dataset.\n\n```\n# build 4x augmented dataset for yang91 dataset (will add flipped images)\npython3 augmentation.py --dataset=yang91 --augment_level=4\n\n# build 8x augmented dataset for yang91 dataset (will add flipped and rotated images)\npython3 augmentation.py --dataset=yang91 --augment_level=8\n\n# train with augmented data\npython3 train.py --dataset=yang91_4\n```\n\n## How to calculate PSNR \u002F SSIM\n\nRGB image is converted to YCbCr image. And then trained and applied only for Y channel.\n\nFor PSNR, by the default, result and original image are shaved by 'scale' pixels from each border, rounded to integer and then PSNR and SSIM are calculated.\nI use SSIM index calculation procedure from scikit-image. Parameters are here. (win_size=11, gaussian_weights=True, multichannel=True, K1=0.01, K2=0.03, sigma=1.5, data_range=255)\n(9\u002F16\u002F2018 modified)\n\n## Visualization\n\nDuring the training, tensorboard log is available under **tf_log** directory.\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjiny2001_dcscn-super-resolution_readme_f6d075dfc7f0.png\" width=\"400\">\n\nYou can check test PSNR transition during training. Also mean \u002F std \u002F histogram of every weights\u002Fbiases and gradients are logged at tensorboard.\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjiny2001_dcscn-super-resolution_readme_007d7b2085e0.png\" width=\"800\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjiny2001_dcscn-super-resolution_readme_48a891503e25.png\" width=\"800\">\n","# 基于跳跃连接与网络内网络的深度CNN实现快速且准确的图像超分辨率\n\n作者：[Jin Yamanaka](https:\u002F\u002Fgithub.com\u002Fjiny2001)、Shigesumi Kuwashima 和 [Takio Kurita](http:\u002F\u002Fhome.hiroshima-u.ac.jp\u002Ftkurita\u002Fprofile-e.html)\n\n\n## 概述（版本2）\n\n这是对论文《基于跳跃连接与网络内网络的深度CNN实现快速且准确的图像超分辨率》（arXiv:1707.05425）的TensorFlow实现，该论文提出了一种基于深度学习的单幅图像超分辨率（SISR）模型。我们将其命名为**DCSCN**。如果您正在查看论文中的代码和结果，请参阅[ver1分支](https:\u002F\u002Fgithub.com\u002Fjiny2001\u002Fdcscn-super-resolution\u002Ftree\u002Fver1)。\n\n模型结构如下所示。我们使用了带有残差网络、跳跃连接和网络内网络的深度CNN。深度CNN与跳跃连接层的组合被用作提取局部和全局图像特征的特征提取器。同时，类似于“网络内网络”的并行化1×1卷积网络也被用于图像重建。\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjiny2001_dcscn-super-resolution_readme_d63e6ede19bb.png\" width=\"800\">\n\n作为版本2，我们还实现了以下功能：\n\n* 来自论文《利用高效的亚像素卷积神经网络进行实时单幅图像和视频超分辨率》（arXiv:1609.05158）的__像素洗牌__  \n* 来自论文《用于语义分割的全卷积网络》（arXiv:1411.4038）的__转置卷积__（可选）  \n* 来自论文《改进基于示例的单幅图像超分辨率的七种方法》（arXiv:1511.02228）的__自集成__  \n* __裁剪归一化__（梯度裁剪）  \n* 动态加载训练图像（可选）  \n* 添加额外层或更新默认参数以获得更好的PSNR结果  \n* 来自论文《Xception：深度可分离卷积的深度学习》（arXiv:1610.02357）的__深度可分离卷积__。由[Chew Jing Wei](https:\u002F\u002Fgithub.com\u002Ftehtea)添加。深度可分离卷积通过将传统卷积层的计算分为两个步骤来降低模型复杂度。第一步是进行深度卷积，即每个输入通道独立地与其他通道隔离进行卷积；第二步则是进行逐点卷积，即将每个深度滤波器的输出堆叠起来，再通过一个1×1的滤波器确定该层最终的输出通道数。如需更完整且适合初学者的解释，请参阅https:\u002F\u002Ftowardsdatascience.com\u002Fa-basic-introduction-to-separable-convolutions-b99ec3102728。\n\n## 示例结果\n\n| 输入图像（橙色）与x4双三次插值 | 我们的DCSCN输出 |\n|:-------:|:-------:|\n| \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjiny2001_dcscn-super-resolution_readme_fffdaa377f87.png\" width=\"380\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjiny2001_dcscn-super-resolution_readme_e0f2961b433d.png\" width=\"380\"> |\n\n与基于深度学习的其他SISR模型相比，我们的DCSCN模型要轻量得多，这一点在[版本1](https:\u002F\u002Fgithub.com\u002Fjiny2001\u002Fdcscn-super-resolution\u002Ftree\u002Fver1)中已经体现。而在版本2中，我们采用了更大的模型和最新的技术，以获得更好的图像恢复性能。\n\n\n## 环境要求\n\nPython >= 3.5  \nTensorFlow >= 2.0.0, scipy, numpy, pillow, imageio 和 scikit-image\n\n\n## PSNR结果\n\n以下是使用默认参数的示例结果。该模型使用DIV2k数据集进行了训练，每轮包含15万张48×48的图像。\n\n| 数据集 | 缩放倍数 | 双三次插值 | c-DCSCN（版本1） | DRCN | VDSR | DCSCN（版本2） | DRRN |\n|:-------:|:-------:|:-------:|:----:|:----:|:----:|:----:|:----:|\n| set5 | x2 | 33.66 | 37.15 | 37.63 | 37.53 | 37.79 | 37.74 |\n|  | x3 | 30.39 | 33.09 | 33.82 | 33.66 | 34.06 | 34.03 |\n|  | x4 | 28.42 | 30.85 | 31.53 | 31.35 | 31.72 | 31.68 |\n| set14 | x2 | 30.24 | 32.74 | 33.04 | 33.03 | 33.25 | 33.23 |\n|  | x3 | 27.55 | 29.47 | 29.76 | 29.77 | 29.95 | 29.96 |\n|  | x4 | 26.00 | 27.76 | 28.02 | 28.01 | 28.25 | 28.21 |\n| bsd100 | x2 | 29.56 | 31.61 | 31.85 | 31.90 | 32.00 | 32.05 |\n|  | x3 | 27.21 | 28.52 | 28.80 | 28.82 | 28.89 | 28.95 |\n|  | x4 | 25.96 | 27.06 | 27.23 | 27.29 | 27.35 | 27.38 |\n\n结果和模型将在几天内上传！！\n\n## 评估\n\n本GitHub仓库包含了部分参数的预训练权重。请使用以下参数执行**evaluate.py**，结果将保存在**output**目录中。如果您希望使用其他参数进行评估，建议先进行训练，然后再使用与训练时相同的参数进行评估。评估日志将记录在log.txt文件中，请查阅。\n\n其中包含了一些预训练模型：\n\n```\n# 评估set14数据集\npython3 evaluate.py --test_dataset=set14 --save_results=true\n\n# 评估set5数据集并使用小型模型\npython3 evaluate.py --test_dataset=set5 --save_results=true --layers=8 --filters=96\n\n# 评估所有数据集（set5、set14、bsd100）\npython3 evaluate.py --test_dataset=all\n\n# 评估我们的紧凑版DCSCN（c-DCSCN）\npython3 evaluate.py --scale=2 --layers=7 --filters=32 --min_filters=8 --filters_decay_gamma=1.2 --nin_filters=24 --nin_filters2=8 --reconstruct_layers=0 --self_ensemble=1 --batch_image_size=32 --pixel_shuffler_filters=1 --test_dataset=all\n```\n\n## 应用于您自己的图像\n\n将您的图像文件放置在项目目录中。然后运行“sr.py --file 'your_image_file'”以应用超分辨率处理。结果将生成在**output**目录中。请注意，您应使用与训练时相同的参数。\n\n例如，如果您想对image001.png应用此模型，可以尝试以下操作：\n\n```\n# 对image001.jpg应用超分辨率（结果将在output目录中显示）\npython3 sr.py --file=your_file.png\n\n# 使用小型模型应用超分辨率\npython3 sr.py --file=your_file.png --layers=8 --filters=96\n```\n\n## 如何使用您自己的数据集进行训练\n\n您可以使用任何数据集进行训练。将您的图像文件作为训练数据放入**data**目录下的相应文件夹中，然后通过--dataset参数指定。由于训练过程中有一些重要的超参数需要设置，请参阅[args.py](https:\u002F\u002Fgithub.com\u002Fjiny2001\u002Fdcscn-super-resolution\u002Fblob\u002Fmaster\u002Fhelper\u002Fargs.py)，以了解如何使用其他训练参数。\n\n一旦确定了训练参数，模型名称将根据这些参数自动定义。例如，使用默认参数时，模型名称可能为“dcscn_L12_F196to48_NIN_A64_PS_R1F32”，该名称代表了模型的具体结构。\n\n```\n# 使用bsd200数据集进行x2倍缩放的训练\npython3 train.py --dataset=bsd200 --training_images=80000\n\n# 使用您自己的数据集进行x3倍缩放的训练\npython3 train.py --scale=3 --dataset=[您自己的数据目录]\n\n# 使用转置卷积代替像素洗牌层进行上采样，以实现2倍放大\npython3 train.py --dataset=bsd200 --training_images=80000 --pixel_shuffler=false\n```\n\n* 每次训练和评估的摘要都会被记录到 **log.txt** 中。\n* 模型将保存在 **models\u002F\"模型名称\".ckpt** 下。\n* 评估结果图像会生成在 **output\u002F\"模型名称\"\u002Fdata\u002F[数据集目录名]** 目录下。\n* 当你使用 evaluate.py \u002F sr.py 脚本时，请确保使用的参数与训练时完全一致，这样脚本才能加载你自己训练好的 **\"模型名称\".ckpt** 文件。\n\n\n### 使用小型模型进行训练\u002F测试（适用于CPU）\n\n如果出现以下情况：1) 你使用的是CPU；2) 训练数据量较小；或3) 只是想测试一下是否能正常工作，我建议你使用更小的模型。对于我的DCSCN模型来说，8层、每层96个滤波器的配置已经具备足够的性能。而在CPU环境下，4–6层、每层32–64个滤波器的配置则是一个不错的起点。\n\n```\n# 使用小型模型进行2倍放大训练\npython3 train.py --dataset=bsd200 --layers=8 --filters=96 --training_images=30000\n\n# 使用微型模型进行测试性2倍放大训练\npython3 train.py --dataset=set5 --layers=4 --filters=32 --use_nin=false --training_images=10000\n```\n\n在我的论文中，我们提出了一种紧凑版的DCSCN（c-DCSCN）。如果你想尝试用这个模型进行训练，可以使用以下选项。（2倍缩放）\n```\npython3 train.py --scale=2 --layers=7 --filters=32 --min_filters=8 --filters_decay_gamma=1.2 --nin_filters=24 --nin_filters2=8 --reconstruct_layers=0 --self_ensemble=1 --dataset=yang_bsd_8 --training_images=228688 --batch_image_size=32 --build_batch=True --do_benchmark=True --pixel_shuffler_filters=1\n```\n\n\n\n### 加快训练速度\n\n请注意，每次训练都需要加载和转换批次图像，这一过程较为耗时，尤其是在迭代次数较多的情况下。以下是一些优化选项，可以帮助显著缩短训练时间：\n\n1. 使用 “convert_y.py” 将你的数据集图像转换为Y通道单色位图。\n\n如果你的训练数据是以PNG或JPEG等压缩格式存储的，并且图像分辨率较高，那么在训练之前必须先进行转换。特别是对于DIV2K数据集，这样做可以大大节省解压和图像转换的时间。此外，在这种模式下，每个输入批次图像有50%的概率会被水平翻转。\n\n2. 对于较小的数据集，可以使用 “--build_batch True” 选项。\n\n如果你的数据集足够小，能够完全存放在CPU内存中，就可以使用此选项。它会提前将源图像分割成批次图像并保存下来，以便在训练过程中重复使用。如果你使用的是HDD（而非SSD），并且数据集规模不大（例如Yang91 + BSD200通过8种方式增强后的数据集），那么这个选项非常有用。它可以避免每次训练时都重新加载和转换图像的过程。\n\n在这种情况下，批次图像的位置会被调整并限制在以半批图像尺寸为网格的范围内。不过，根据我的实验，这并不会对PSNR性能产生太大影响。\n\n### 如何设置 --training_images 参数？\n\n--training_images 参数表示一个epoch内训练的图像块数量。通常情况下，它的值应与输入训练图像块的总数相同。当你使用 build_batch=True 时，训练程序会在训练前在 **\"batch_data\"** 目录下生成一批图像块，这样你就能清楚地看到训练数据中有多少个批次图像。\n\n然而，具体的数值还需要根据图像类型、多样性以及模型复杂度来决定。你可以从非常小的值开始，比如1,000，如果效果不够理想，再逐步增加到10万至20万。\n\n# 重要参数\n\n| 参数名 | 名称 | 默认值 | 说明 |\n|:-------:|:-------:|:----:|:----:|\n| layers | CNN层数 | 12 | 特征提取CNN的层数 |\n| filters | 第一层CNN滤波器数量 | 196 | 第一层特征提取CNN的滤波器数量 |\n| min_filters | 最后一层CNN滤波器数量 | 48 | 最后一层特征提取CNN的滤波器数量 |\n| filters_decay_gamma | 滤波器衰减系数 | 1.5 | 每层的CNN滤波器数量会按照该系数从[filters]衰减到[min_filters] |\n| pixel_shuffler | 像素洗牌层 | True | 是否使用像素洗牌层作为上采样层。若为False，则使用转置卷积作为上采样层。 |\n| self_ensemble | 自集成 | 8 | 对1–8张翻转\u002F旋转后的图像分别进行超分辨率处理，然后取平均图像作为最终结果。 |\n| training_images | 每个训练epoch的批次图像数 | 24000 | 这个数值决定了一个epoch内用于训练的批次图像数量。我通常会为每个学习率设置10个epoch，每个epoch使用10万批次图像。 |\n| dropout_rate | Dropout率 | 0.8 | 输出节点保留的概率。取值范围为1 ≥ drop out > 0。若为1，则不使用Dropout。 |\n| initializer | 初始化方法 | he | 各权重的初始化方法。可选值包括[uniform, stddev, xavier, he, identity, zero]。 |\n| activator | 激活函数 | prelu | 每层CNN的激活函数类型。可选值包括[relu, leaky_relu, prelu, sigmoid, tanh]。 |\n| optimizer | 优化器函数 | adam | 优化器的方法。可选值包括[gd, momentum, adadelta, adagrad, adam, rmsprop]。 |\n| batch_image_size | 每个批次的图像尺寸 | 48 | 每张训练图像都会被分割成这个尺寸的小块。 |\n| batch_num | 每个批次的图像数量 | 20 | 一次训练步骤中使用的批次图像数量。 |\n| clipping_norm | 梯度裁剪阈值 | 5 | 梯度裁剪的范数。若小于等于0，则不进行梯度裁剪。 |\n\n此外，学习率和其他模型参数也非常重要。\n我们将按照 [ __training_images__ \u002F __batch_num__ ] 步骤进行每个epoch的训练。初始学习率设为 __initial_lr__。经过 [lr_decay_epoch] 个epoch后，学习率将按 __lr_decay__ 的比例衰减。当当前学习率低于 __end_lr__ 时，训练即告结束。\n\n通常可以通过调整 __training_images__ 和 __lr_decay_epoch__ 来控制训练的迭代次数。更多参数请参考 arg.py 文件。\n\n## 数据增强\n\n为了获得更好的性能，数据增强是必不可少的。你可以使用 **augmentation.py** 脚本来构建增强后的数据集。其中，参数 augment_level = 4 表示将添加左右翻转、上下翻转以及同时左右和上下翻转的图像，从而使数据集扩大4倍。此时会生成名为 **yang91_4** 的增强数据集目录。\n\n为了得到更好的模型，你应该使用更大的训练数据，比如 (BSD200 + Yang91) 经过8种方式增强后的数据集。\n\n```\n# 为yang91数据集构建4倍增强数据集（仅添加翻转图像）\npython3 augmentation.py --dataset=yang91 --augment_level=4\n\n# 为yang91数据集构建8倍增强数据集（添加翻转和旋转图像）\npython3 augmentation.py --dataset=yang91 --augment_level=8\n\n# 使用增强后的数据进行训练\npython3 train.py --dataset=yang91_4\n```\n\n## 如何计算 PSNR \u002F SSIM\n\n将 RGB 图像转换为 YCbCr 图像，然后仅对 Y 通道进行训练和应用。\n\n对于 PSNR，默认情况下，会从结果图像和原始图像的每条边沿裁剪掉 ‘scale’ 像素，四舍五入取整后，再计算 PSNR 和 SSIM。\n我使用的是 scikit-image 中的 SSIM 指标计算流程。参数如下：（win_size=11, gaussian_weights=True, multichannel=True, K1=0.01, K2=0.03, sigma=1.5, data_range=255）\n(2018年9月16日 修改)\n\n## 可视化\n\n在训练过程中，TensorBoard 日志会保存在 **tf_log** 目录下。\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjiny2001_dcscn-super-resolution_readme_f6d075dfc7f0.png\" width=\"400\">\n\n您可以在 TensorBoard 中查看训练过程中测试 PSNR 的变化趋势。此外，所有权重、偏置以及梯度的均值、标准差和直方图也会被记录到 TensorBoard 中。\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjiny2001_dcscn-super-resolution_readme_007d7b2085e0.png\" width=\"800\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjiny2001_dcscn-super-resolution_readme_48a891503e25.png\" width=\"800\">","# DCSCN 超分辨率快速上手指南\n\nDCSCN (Deep CNN with Skip Connection and Network in Network) 是一个基于深度学习的单图像超分辨率 (SISR) 模型。它以轻量级结构实现了快速且准确的图像放大，支持多种先进特性（如 Pixel Shuffler、自集成等）。\n\n## 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **操作系统**: Linux, macOS 或 Windows\n*   **Python 版本**: >= 3.5 (推荐 3.6+)\n*   **核心依赖**:\n    *   TensorFlow >= 2.0.0\n    *   SciPy\n    *   NumPy\n    *   Pillow\n    *   ImageIO\n    *   Scikit-image\n\n**国内加速建议**：\n安装 Python 依赖时，建议使用清华或阿里镜像源以加快下载速度：\n```bash\npip install tensorflow scipy numpy pillow imageio scikit-image -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n## 安装步骤\n\n1.  **克隆项目代码**\n    从 GitHub 获取最新源码：\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002Fjiny2001\u002Fdcscn-super-resolution.git\n    cd dcscn-super-resolution\n    ```\n\n2.  **验证依赖**\n    确保上述 `pip install` 命令执行成功。本项目主要依赖纯 Python 库和 TensorFlow，无需额外编译 C++ 扩展。\n\n## 基本使用\n\n本部分介绍如何使用预训练模型对单张图片进行超分辨率处理。\n\n### 1. 准备图片\n将您需要处理的低分辨率图片（例如 `input.jpg` 或 `input.png`）放置在项目根目录下。\n\n### 2. 执行超分辨率\n运行 `sr.py` 脚本。默认情况下，脚本会加载与默认参数匹配的预训练权重。\n\n**最简单的使用示例（默认模型）：**\n```bash\npython3 sr.py --file=input.jpg\n```\n*执行成功后，高清结果图将生成在 `output` 目录中。*\n\n**使用小型模型（适合 CPU 或快速测试）：**\n如果您的设备性能有限，可以使用层数更少、滤波器更少的轻量级模型：\n```bash\npython3 sr.py --file=input.jpg --layers=8 --filters=96\n```\n\n### 3. 查看结果\n处理完成后，进入 `output` 文件夹即可查看放大后的高清图片。\n\n> **注意**：如果您后续打算自己训练模型，在使用 `sr.py` 或 `evaluate.py` 时，必须传入与训练时完全一致的参数（如 `--layers`, `--filters`, `--scale` 等），以便正确加载对应的 `.ckpt` 权重文件。","某数字档案馆正在对一批珍贵的低分辨率历史照片进行数字化修复，以便在高清显示屏上展出。\n\n### 没有 dcscn-super-resolution 时\n- **细节模糊丢失**：传统的双三次插值（Bicubic）放大算法仅靠数学估算填充像素，导致老照片中的文字边缘和人物五官严重模糊，无法辨认关键信息。\n- **伪影干扰严重**：强行放大后图像出现明显的锯齿和块状噪点，破坏了历史影像的质感，需要人工逐张修图，耗时极长。\n- **算力与效果难平衡**：现有的其他深度学习超分模型虽然效果尚可，但参数量巨大、推理速度慢，难以在有限的服务器资源下批量处理数万张图片。\n- **纹理重建能力弱**：对于衣物纹理、建筑砖墙等高频细节，传统方法完全无法还原，只能得到一片平滑的色块。\n\n### 使用 dcscn-super-resolution 后\n- **高频细节精准还原**：利用其独特的跳跃连接（Skip Connection）和网络内网络（Network in Network）架构，成功恢复了照片中原本模糊的报纸文字和发丝细节，清晰度显著提升。\n- **画面自然无伪影**：结合 Pixel Shuffler 亚像素卷积技术，生成的 4 倍放大图像边缘平滑自然，有效消除了锯齿感，保留了胶片特有的颗粒质感。\n- **轻量高效批量处理**：相比同类重型模型，dcscn-super-resolution 结构更轻量，在保持高 PSNR（峰值信噪比）的同时大幅提升了推理速度，使大规模批量自动化修复成为可能。\n- **复杂纹理智能重构**：借助深度可分离卷积技术，模型能更敏锐地捕捉局部与全局特征，将原本模糊的砖墙和布料纹理“猜”得栩栩如生。\n\ndcscn-super-resolution 以轻量级的架构实现了媲美重型模型的修复效果，让低清历史影像在保留真实质感的前提下重获高清新生。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjiny2001_dcscn-super-resolution_007d7b20.png","jiny2001","Jin Yamanaka","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fjiny2001_d9f740ef.jpg","real-time devices, computer vision, distributed system and robotics engineer.\r\ntwitter: Jiny2001","Fujitsu Research","Palo Alto, CA, US ",null,"https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fjin-yamanaka-1866062","https:\u002F\u002Fgithub.com\u002Fjiny2001",[83,87],{"name":84,"color":85,"percentage":86},"Python","#3572A5",99.9,{"name":88,"color":89,"percentage":90},"Dockerfile","#384d54",0.1,714,219,"2026-02-14T05:56:18","MIT","未说明","非必需（支持 CPU 运行，但建议使用 GPU 加速训练；未指定具体型号、显存大小或 CUDA 版本）","未说明（小数据集可存入内存以加速，建议根据数据集大小调整）",{"notes":99,"python":100,"dependencies":101},"该工具基于 TensorFlow 2.0+ 实现。虽然可以在 CPU 上运行（推荐使用较小的模型参数，如 4-6 层），但在处理大规模数据集或默认大模型时建议使用 GPU。对于小数据集，可使用 '--build_batch True' 选项将数据预处理后载入内存以显著加快训练速度。训练前可能需要将图像转换为 Y 通道单色位图以优化加载性能。",">=3.5",[102,103,104,105,106,107],"tensorflow>=2.0.0","scipy","numpy","pillow","imageio","scikit-image",[15,14],[110,111,112,113,114],"deep-learning","computer-vision","super-resolution","tensorflow","python","2026-03-27T02:49:30.150509","2026-04-11T03:26:05.499330",[118,123,128,133,138,143],{"id":119,"question_zh":120,"answer_zh":121,"source_url":122},28864,"如何在移动端将训练好的 ckpt 文件转换为冻结的推理图（.pb 格式）？需要知道哪些输入和输出节点？","要将模型部署到移动端，需要使用 TensorFlowInferenceInterface。虽然具体节点名称未在对话中直接列出，但用户确认成功构建了应用。需要注意的是，该模型在移动端处理非正方形图像（如 256*510）时可能会出现伪影（如水平线条），而在 PC 上正常。建议目前仅使用正方形图像或单通道（Y 通道\u002F黑白图像）进行测试以获得最佳效果。","https:\u002F\u002Fgithub.com\u002Fjiny2001\u002Fdcscn-super-resolution\u002Fissues\u002F38",{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},28865,"如何配置以使用多个 GPU 进行训练？为什么指定所有 GPU 后无法运行其他任务？","当指定使用所有 GPU（如 4 个）时，代码会占用所有显存，导致无法运行其他任务。解决方案是分割使用：例如在一个训练任务中指定使用 GPU 0 和 1，同时在另一个训练任务中指定使用 GPU 2 和 3。此外，可以通过设置 `sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))` 来日志记录哪个设备被分配给了哪个计算图，以验证配置是否生效。","https:\u002F\u002Fgithub.com\u002Fjiny2001\u002Fdcscn-super-resolution\u002Fissues\u002F19",{"id":129,"question_zh":130,"answer_zh":131,"source_url":132},28866,"c-DCSCN 模型在版本 1 和版本 2 之间有什么区别？是否使用了自集成（Self Ensemble）？","c-DCSCN 模型在版本 1 和版本 2 中具有相同的模型结构。主要区别在于自集成（Self Ensemble）的设置：在版本 2 的代码中训练 c-DCSCN 时，自集成功能是被禁用的。你可以在评估 c-DCSCN 的示例代码中看到选项 `--self_ensemble=1`（仅使用默认的一个图像集），这意味着在训练和评估过程中均未使用自集成，从而保持推理速度快。相比之下，普通的 DSDCN 模型在版本 2 中可能添加了自集成*8 以及更多的滤波器和通道。","https:\u002F\u002Fgithub.com\u002Fjiny2001\u002Fdcscn-super-resolution\u002Fissues\u002F108",{"id":134,"question_zh":135,"answer_zh":136,"source_url":137},28867,"SELU 激活函数是否可以替代 PReLU？在训练稳定性和梯度裁剪方面有什么建议？","实验表明 SELU 是一个很好的 PReLU 替代品，且在没有梯度裁剪的情况下学习速度更快。关于梯度裁剪：对于 PReLU，梯度裁剪（例如值为 5.0）能显著加快收敛速度；而对于 SELU，有时不需要梯度裁剪。如果在训练早期遇到不稳定性，可以尝试将初始学习率设为较大值（如 5e-3）并配合较小的梯度裁剪值（如前几个 epoch 设为 0.5）。注意，如果完全不使用梯度裁剪，早期层的权重和偏置梯度有时会变为 0。","https:\u002F\u002Fgithub.com\u002Fjiny2001\u002Fdcscn-super-resolution\u002Fissues\u002F29",{"id":139,"question_zh":140,"answer_zh":141,"source_url":142},28868,"如何修改代码以同时输出双三次插值（Bicubic）结果和 DCSCN 超分辨率结果进行对比？","如果你使用的是 `sr.py` 脚本，需要在 `DCSCN.py` 文件的第 545 行附近添加特定代码行（原回答中代码被截断，但指出了修改位置）。通过修改该文件，可以确保输出不仅包含超分辨率结果，还包含用于对比的双三次插值结果（通常涉及 YCbCr 图像处理流程的调整）。","https:\u002F\u002Fgithub.com\u002Fjiny2001\u002Fdcscn-super-resolution\u002Fissues\u002F68",{"id":144,"question_zh":145,"answer_zh":146,"source_url":122},28869,"在移动端使用非正方形图像输入时出现伪影（如水平线条）是什么原因？","这是一个已知现象。当输入图像为正方形（如 256*256）时，模型在移动端表现良好；但如果输入矩形图像（如 256*510），输出可能会包含伪影（类似水平线条），而这种情况在 PC 端不会发生。目前的建议是暂时仅使用正方形图像或单通道（Y 通道）图像进行移动端推理，直到进一步适配非正方形输入。",[]]