code: 抽取并发布 15 章配套代码#2
Open
luwill wants to merge 4 commits into
Open
Conversation
将早期 v1.0 简介替换为面向 15 章配套代码库的索引页, 新增 code/ 目录结构、各章代码索引表、抽取/验证流水线说明, 保留 Scripts/ 兼容历史链接。
按章组织 code/chXX/,每章含 README + inventory + 源代码。 - ch01: 环境配置与 PyTorch/OpenCV 调用示例 (Python×2 + C++×1) - ch02: 传统分割算法 C++ 实现 (Canny / Otsu / 区域生长 / 分水岭 / GrabCut) - ch03: 分割网络基础组件 (SegNet 编码器 / ViT / 残差块 / 深监督) - ch04: FCN-8s 与 U-Net 等典型编解码网络 PyTorch 实现 - ch05: DeepLab 与 PSPNet 中 PPM 模块 - ch06: 注意力机制与 Transformer 分割组件 - ch07: 3D 卷积示例 - ch08–10: 综述性章节,无独立代码 - ch11: 数据集下载脚本 每个文件在 header 中标注源稿行号;inventory.md 列出全章 fenced block 与抽取后文件的映射;README 以"可独立运行 / 教学片段 / 语法骨架"区分文件状态,对源稿不做修改以保持与书稿一致。
- ch12 工程实战(27 文件):预处理、Dataset、训练循环、推理 API、Web 部署,含 1 yaml + 3 shell 脚本。 - ch13 医学影像分割实战(22 文件):含 ICH 出血分割训练流水线 与 LibTorch C++ 推理示例(2 cpp + 2 CMakeLists)。 - ch14 遥感与工业缺陷分割实战(13 文件)。 - ch15 总结章无代码,保留 inventory 说明。 每章 README 给出依赖列表与文件状态分类(可独立运行 / 教学片段 / 语法骨架);ch12/13/14 大模型权重需读者自行下载, 本仓库不包含权重。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
将《深度学习图像分割》15 章修订稿中的代码抽取出来,按章组织到
code/chXX/目录,作为本书的配套代码库。改动概览
code/:每章一个子目录,含:README.md:章节概览 + 依赖 + 文件状态分类inventory.md:源稿全部 fenced block 的盘点(按源稿行号定位).gitignore:忽略__pycache__/、模型权重、CMake build 等。Scripts/:保留不动(与code/ch02/cpp/内容重合,作为历史链接兼容)。各章文件数
共 88 个代码文件 + 15 个 inventory + 15 个章节 README。
抽取与验证流水线
抽取脚本与验证脚本不进入本仓库(保留在
book-review/scripts/),保证仓库面向读者干净。验证结果
.py文件,66/68 通过py_compile;25/68 通过 pyflakes 无告警。def __init__(self, ...):与 module-top-levelreturn),忠于书稿不修改,README 标注为"语法骨架"。.cpp(ch02×5、ch13×2、ch01×1),本地未装 OpenCV/LibTorch,未做编译验证;内容与源稿逐字一致。文件状态分类
每章 README 中表格按以下四类标注:
已知限制
.github/workflows/msbuild.yml是早期 MSBuild CI(无 .sln),与本 PR 无关,若失败为既有状态。测试计划
python3 -m py_compile全部 68 个 .py(66 通过;2 个教学骨架已标注)python3 -m pyflakes全部 68 个 .py(结果在每章 README 中分类)后续工作(不在此 PR 内)
requirements.txt/environment.yml。