[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-neeru1207--AI_Sudoku":3,"tool-neeru1207--AI_Sudoku":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 真正成长为懂上",144730,2,"2026-04-07T23:26:32",[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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107888,"2026-04-06T11:32:50",[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},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":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"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",[35,15,13,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":76,"owner_twitter":76,"owner_website":77,"owner_url":78,"languages":79,"stars":84,"forks":85,"last_commit_at":86,"license":87,"difficulty_score":32,"env_os":88,"env_gpu":89,"env_ram":89,"env_deps":90,"category_tags":96,"github_topics":97,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":118,"updated_at":119,"faqs":120,"releases":121},5401,"neeru1207\u002FAI_Sudoku","AI_Sudoku","GUI based Smart Sudoku Solver that tries to extract a sudoku puzzle from a photo and solve it","AI_Sudoku 是一款基于图形界面（GUI）的智能数独求解器，旨在通过拍照自动识别并解决数独难题。它主要解决了用户面对纸质或图片形式数独时，手动输入数字繁琐且容易出错的痛点，实现了从“拍摄照片”到“获取答案”的一站式自动化处理。\n\n这款工具非常适合普通数独爱好者使用，无需具备编程背景，只需简单操作即可轻松解题；同时，由于其开源特性及内置的多种算法选项，也适合开发者和技术研究人员学习图像识别与逻辑求解的结合应用。\n\nAI_Sudoku 的技术亮点在于其完整的图像处理流水线：首先利用高斯模糊等技术对照片进行预处理以去除噪声，随后通过机器学习算法提取数字。值得一提的是，项目支持在卷积神经网络（CNN）和 K 近邻算法（KNN）之间切换，实测表明 KNN 在此场景下具有更高的识别准确率。此外，软件在识别后允许用户人工校对修正数字，确保最终解题结果的可靠性，让技术真正服务于便捷的生活体验。","# AI_Sudoku\n[![forthebadge made-with-python](http:\u002F\u002FForTheBadge.com\u002Fimages\u002Fbadges\u002Fmade-with-python.svg)](https:\u002F\u002Fwww.python.org\u002F) \n[![forthebadge cc-0](http:\u002F\u002FForTheBadge.com\u002Fimages\u002Fbadges\u002Fcc-0.svg)](http:\u002F\u002FForTheBadge.com)\n\nGUI Smart Sudoku Solver that tries to extract a sudoku puzzle from a photo and solve it.\n\n## Table Of Contents:\n\n[Installation](https:\u002F\u002Fgithub.com\u002Fneeru1207\u002FAI_Sudoku\u002Fblob\u002Fmaster\u002FREADME.md#installation)\n\n[Usage](https:\u002F\u002Fgithub.com\u002Fneeru1207\u002FAI_Sudoku\u002Fblob\u002Fmaster\u002FREADME.md#usage)\n\n[Working](https:\u002F\u002Fgithub.com\u002Fneeru1207\u002FAI_Sudoku\u002Fblob\u002Fmaster\u002FREADME.md#working)\n\n  * [Image Preprocessing](https:\u002F\u002Fgithub.com\u002Fneeru1207\u002FAI_Sudoku\u002Fblob\u002Fmaster\u002FREADME.md#image-preprocessing)\n  * [Recognition](https:\u002F\u002Fgithub.com\u002Fneeru1207\u002FAI_Sudoku\u002Fblob\u002Fmaster\u002FREADME.md#recognition)\n\n[ToDo](https:\u002F\u002Fgithub.com\u002Fneeru1207\u002FAI_Sudoku\u002Fblob\u002Fmaster\u002FREADME.md#todo)\n\n[Contributing](https:\u002F\u002Fgithub.com\u002Fneeru1207\u002FAI_Sudoku\u002Fblob\u002Fmaster\u002FREADME.md#contributing)\n\n## Installation\n\n1. Download and install Python3 from [here](https:\u002F\u002Fwww.python.org\u002Fdownloads\u002F)\n2. I recommend using [virtualenv](https:\u002F\u002Fvirtualenv.pypa.io\u002Fen\u002Flatest\u002F). Download virtualenv by opening a terminal and typing:\n    ```bash\n    pip install virtualenv\n    ```\n3. Create a virtual environment with the name sudokuenv.\n\n   * Windows\n   ```bash\n   virtualenv sudokuenv\n   cd sudokuenv\u002FScripts\n   activate\n   ```\n   * Linux:\n   ```bash\n   source sudokuenv\u002Fbin\u002Factivate\n    ```\n4. Clone this repository, extract it if you downloaded a .zip or .tar file and cd into the cloned repository.\n\n    * For Example:\n    ```bash\n    cd A:\\AI_Sudoku-master\n    ```\n5. Install the required packages by typing:\n   ```bash\n   pip install -r requirements.txt\n   ```\n## Usage\n* Before running the application, know that you can set the **modeltype** variable in **Run.py** to either \"CNN\" or \"KNN\" to choose the Convolutional Neural Network or the K Nearest Neighbours Algorithm for Recognition. By default it is set to \"KNN\" and I got a way higher accuracy using KNN itself, so I would recommend that you don't change it.\n    ```Python\n    '''Run this file to run the application'''\n    from MainUI import MainUI\n    from CNN import CNN\n    from KNN import KNN\n    import os\n    # Change the model type variable value to \"CNN\" to use the Convolutional Neural Network\n    # Change the model type variable value to \"KNN\" to use the K Nearest Neighbours Classifier\n    modeltype = \"KNN\"\n    ```\n* Type the below command to run the Application. You *need* to be connected to the Internet and it might take 5-10 minutes to create the **knn.sav** file so please wait patiently. This delay is only during the first run as once created, the application will use the local file\n    ```bash\n    python Run.py\n    ```\n* The GUI Homepage that opens up as soon as you run the application.\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_c6747384b90f.png)\n\n* You need to select an image of a Sudoku Puzzle through the GUI Home Page.\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_077f6da2b136.png)\n\n* Once you press **Next**, a number of stages of image processing take place which are displayed by the GUI leading up to recognition. Here are snapshots of two of the stages:\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_0b523b7182b1.png)\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_490fb004f4ae.png)\n\n* For recognition, a **CNN** or **KNN** can be used. This option can be toggled as mentioned in the first point. Once recognized, the board is displayed and you can rectify any wrongly recognized entries in the board.\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_e15246b6c2ea.png)\n\n* Finally click on **reveal solution** to display the solution.\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_329b40df1d55.png)\n    \n\n## Working\n\n### Image Preprocessing\n\n* **Gaussian Blurring** Blurring using a Gaussian function. This is to reduce noise and detail.\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_0b523b7182b1.png)\n\n* **Adaptive Gaussian Thresholding** Adaptive thresholding with a Gaussian Function to account for different illuminations in different parts of the image.\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_7298edf2b64f.png)\n\n* **Inverting** to make the digits and lines white while making the background black.\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_0ceba578fe6b.png)\n\n* **Dilation** with a plus shaped 3X3 Kernel to fill out any cracks in the board lines and thicken the board lines.\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_490fb004f4ae.png)\n\n* **Flood Filling** Since the board will probably be the largest blob a.k.a connected component with the largest area, floodfilling from different seed points and finding all connected components followed by finding the largest floodfilled area region will give the board. \n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_65378c7b49c1.png)\n\n* The **largest blob** a.k.a the board is found after the previous step. Let's call this the outerbox\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_eea76cf48d87.png)\n\n* **Eroding** the grid a bit to undo the effects of the dilation on the outerbox that we did earlier.\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_0616c26ba597.png)\n\n* **Hough Line Transform** to find all the lines in the detected outerbox.\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_6657dcc8ca8b.png)\n\n* **Merging** related lines. The lines found by the Hough Transform that are close to each other are fused together.\n\n* **Finding the Extreme lines** . We find the border lines by choosing the nearest line from the top with slope almost 0 as the upper edge, the nearest line from the bottom with slope almost 0 as the lower edge, the nearest line from the left with slope almost infinity as the left edge and the nearest line from the right with slope almost infinity as the right edge.\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_b2e064d733ed.png)\n\n* **Finding the four intersection points**. The four intersection points of these lines are found and plotted along with the lines.\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_563ab33d2b68.png)\n\n* **Warping perspective**. We find the perspective matrix using the end points, correct the perspective and crop the board out of the original image.\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_17ccdebb687f.png)\n\n* **Thresholding and Inverting the grid**. The cropped image from the previous step is adaptive thresholded and inverted.\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_d412feed24b9.png)\n\n* **Slicing** the grid into 81 slices to get images of each cell of the Sudoku board.\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_d94d866a2cd0.png)\n\n* **Blackfilling and centering the number**. Any white patches other than the number are removed by floodfilling with black from the outer layer points as seeds. Then the approximate bounding box of the number is found and centered in the image.\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_e8f4df3a92ce.png)\n\n### Recognition\n\n#### Convolutional Neural Network\n\nRead about CNNs [here](https:\u002F\u002Ftowardsdatascience.com\u002Fa-comprehensive-guide-to-convolutional-neural-networks-the-eli5-way-3bd2b1164a53)\n* **Layers** A Convolution Layer, a Max Pooling layer flattened into a hidden layer followed by some Dropout Regularization, another hidden layer and finally the output layer. Each of the inner layer uses *ReLu* while the output layer uses *softmax*.\n* **Compilation** *Adam* optimizer and *sparse categorical cross entropy* loss.\n* **Training** The model is trained on the **MNIST** handwritten digits dataset which has around 70,000 28X28 images.\n* **Accuracy** Around 98 percent accuracy on the test set.\n\n#### K Nearest Neighbours\n\nRead about KNN [here](https:\u002F\u002Ftowardsdatascience.com\u002Fmachine-learning-basics-with-the-k-nearest-neighbors-algorithm-6a6e71d01761)\n* **K** value used is 3.\n* **Training** Trained on the **MNIST** handwritten digits dataset which has around 70,000 28X28 images.\n* **Accuracy** Around 97 percent accuracy on the test set.\n    \n## ToDo\n\n* Improve Accuracy.\n* Resolve Bugs\u002FIssues if any found.\n* Optimize Code to make it faster.\n\n## Contributing\n\nContributions are welcome :smile:\n\n### Pull requests\n\nJust a few guidelines:\n* Write clean code with appropriate comments and add suitable error handling.\n* Test the application and make sure no bugs\u002F issues come up.\n* Open a pull request and I will be happy to acknowledge your contribution after some checking from my side.\n\n### Issues\n\nIf you find any bugs\u002Fissues, raise an issue.\n\n\n\n\n\n\n\n\n","# AI数独\n[![forthebadge made-with-python](http:\u002F\u002FForTheBadge.com\u002Fimages\u002Fbadges\u002Fmade-with-python.svg)](https:\u002F\u002Fwww.python.org\u002F) \n[![forthebadge cc-0](http:\u002F\u002FForTheBadge.com\u002Fimages\u002Fbadges\u002Fcc-0.svg)](http:\u002F\u002FForTheBadge.com)\n\n一个智能数独求解器GUI，它尝试从照片中提取数独谜题并解决它。\n\n## 目录：\n\n[安装](https:\u002F\u002Fgithub.com\u002Fneeru1207\u002FAI_Sudoku\u002Fblob\u002Fmaster\u002FREADME.md#installation)\n\n[使用](https:\u002F\u002Fgithub.com\u002Fneeru1207\u002FAI_Sudoku\u002Fblob\u002Fmaster\u002FREADME.md#usage)\n\n[工作原理](https:\u002F\u002Fgithub.com\u002Fneeru1207\u002FAI_Sudoku\u002Fblob\u002Fmaster\u002FREADME.md#working)\n\n  * [图像预处理](https:\u002F\u002Fgithub.com\u002Fneeru1207\u002FAI_Sudoku\u002Fblob\u002Fmaster\u002FREADME.md#image-preprocessing)\n  * [识别](https:\u002F\u002Fgithub.com\u002Fneeru1207\u002FAI_Sudoku\u002Fblob\u002Fmaster\u002FREADME.md#recognition)\n\n[待办事项](https:\u002F\u002Fgithub.com\u002Fneeru1207\u002FAI_Sudoku\u002Fblob\u002Fmaster\u002FREADME.md#todo)\n\n[贡献](https:\u002F\u002Fgithub.com\u002Fneeru1207\u002FAI_Sudoku\u002Fblob\u002Fmaster\u002FREADME.md#contributing)\n\n## 安装\n\n1. 从[这里](https:\u002F\u002Fwww.python.org\u002Fdownloads\u002F)下载并安装Python3。\n2. 建议使用[virtualenv](https:\u002F\u002Fvirtualenv.pypa.io\u002Fen\u002Flatest\u002F)。打开终端并输入以下命令来下载virtualenv：\n    ```bash\n    pip install virtualenv\n    ```\n3. 创建名为sudokuenv的虚拟环境。\n\n   * Windows\n   ```bash\n   virtualenv sudokuenv\n   cd sudokuenv\u002FScripts\n   activate\n   ```\n   * Linux:\n   ```bash\n   source sudokuenv\u002Fbin\u002Factivate\n    ```\n4. 克隆此仓库，如果下载的是.zip或.tar文件则将其解压，并进入克隆后的仓库目录。\n\n    * 例如：\n    ```bash\n    cd A:\\AI_Sudoku-master\n    ```\n5. 通过输入以下命令安装所需的包：\n   ```bash\n   pip install -r requirements.txt\n   ```\n## 使用\n* 在运行应用程序之前，请注意您可以在**Run.py**中将**modeltype**变量设置为“CNN”或“KNN”，以选择卷积神经网络或K近邻算法进行识别。默认情况下，它被设置为“KNN”，而我使用KNN本身获得了更高的准确率，因此建议您不要更改它。\n    ```Python\n    '''运行此文件以启动应用程序'''\n    from MainUI import MainUI\n    from CNN import CNN\n    from KNN import KNN\n    import os\n    # 将模型类型变量值更改为“CNN”以使用卷积神经网络\n    # 将模型类型变量值更改为“KNN”以使用K近邻分类器\n    modeltype = \"KNN\"\n    ```\n* 输入以下命令以运行应用程序。您*需要*连接到互联网，创建**knn.sav**文件可能需要5-10分钟，请耐心等待。这种延迟仅在首次运行时出现，一旦创建完毕，应用程序将使用本地文件。\n    ```bash\n    python Run.py\n    ```\n* 运行应用程序后打开的GUI主页。\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_c6747384b90f.png)\n\n* 您需要通过GUI主页选择一张数独谜题的图片。\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_077f6da2b136.png)\n\n* 一旦按下**Next**，就会进行一系列图像处理步骤，这些步骤会由GUI显示，直到最终完成识别。以下是其中两个阶段的截图：\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_0b523b7182b1.png)\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_490fb004f4ae.png)\n\n* 对于识别，可以使用**CNN**或**KNN**。如第一点所述，您可以切换此选项。识别完成后，棋盘将显示出来，您可以更正棋盘中任何错误识别的内容。\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_e15246b6c2ea.png)\n\n* 最后点击**reveal solution**以显示解法。\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_329b40df1d55.png)\n    \n\n## 工作原理\n\n### 图像预处理\n\n* **高斯模糊** 使用高斯函数进行模糊处理。目的是减少噪声和细节。\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_0b523b7182b1.png)\n\n* **自适应高斯阈值化** 使用高斯函数进行自适应阈值化，以应对图像不同区域光照不均的情况。\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_7298edf2b64f.png)\n\n* **二值取反** 将数字和线条变为白色，背景变为黑色。\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_0ceba578fe6b.png)\n\n* **膨胀操作** 使用十字形的3×3内核填充棋盘线上可能出现的断裂，并加粗棋盘线。\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_490fb004f4ae.png)\n\n* **洪水填充** 由于棋盘很可能是面积最大的连通区域，因此可以从不同的种子点进行洪水填充，找到所有连通组件，再确定面积最大的区域，即为棋盘。\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_65378c7b49c1.png)\n\n* 在上一步之后，找到了**最大的连通区域**，也就是棋盘。我们称其为外框。\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_eea76cf48d87.png)\n\n* **腐蚀操作** 对网格稍作腐蚀，以抵消之前对外框进行的膨胀效果。\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_0616c26ba597.png)\n\n* **霍夫直线变换** 用于检测外框内的所有直线。\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_6657dcc8ca8b.png)\n\n* **合并相关直线** 将霍夫变换检测到的彼此靠近的直线合并为一条。\n\n* **寻找极值直线** 通过选择最靠近顶部且斜率接近于零的直线作为上边界，最靠近底部且斜率接近于零的直线作为下边界，最靠近左侧且斜率接近于无穷大的直线作为左边界，以及最靠近右侧且斜率接近于无穷大的直线作为右边界，来确定边界线。\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_b2e064d733ed.png)\n\n* **计算四个交点** 找出这些直线的四个交点，并将它们与直线一起绘制出来。\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_563ab33d2b68.png)\n\n* **透视变换** 利用端点计算透视矩阵，校正透视并从原始图像中裁剪出棋盘部分。\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_17ccdebb687f.png)\n\n* **网格的阈值化与取反** 对上一步裁剪得到的图像进行自适应阈值化并取反。\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_d412feed24b9.png)\n\n* **分割网格** 将网格划分为81个子区域，从而获得数独棋盘每个单元格的图像。\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_d94d866a2cd0.png)\n\n* **黑底填充与数字居中** 使用外部边缘点作为种子，对除数字以外的白色区域进行黑色填充；然后找到数字的大致边界框，并将其在图像中居中。\n\n    ![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_readme_e8f4df3a92ce.png)\n\n### 识别\n\n#### 卷积神经网络\n\n关于CNN的详细介绍请参阅[这里](https:\u002F\u002Ftowardsdatascience.com\u002Fa-comprehensive-guide-to-convolutional-neural-networks-the-eli5-way-3bd2b1164a53)\n* **网络结构** 包含一个卷积层、一个最大池化层，随后展平为隐藏层，并加入Dropout正则化，再接一个隐藏层，最后是输出层。各隐藏层使用ReLU激活函数，而输出层使用softmax激活函数。\n* **编译设置** 使用Adam优化器和稀疏分类交叉熵损失函数。\n* **训练** 模型基于**MNIST**手写数字数据集进行训练，该数据集包含约7万张28×28像素的图像。\n* **准确率** 在测试集上的准确率约为98%。\n\n#### K近邻算法\n\n关于KNN的详细介绍请参阅[这里](https:\u002F\u002Ftowardsdatascience.com\u002Fmachine-learning-basics-with-the-k-nearest-neighbors-algorithm-6a6e71d01761)\n* **K值** 设置为3。\n* **训练** 基于**MNIST**手写数字数据集进行训练，该数据集包含约7万张28×28像素的图像。\n* **准确率** 在测试集上的准确率约为97%。\n\n## 待办事项\n\n* 提升准确率。\n* 解决可能发现的任何Bug或问题。\n* 优化代码，使其运行更快。\n\n## 贡献说明\n\n欢迎贡献 :smile:\n\n### 拉取请求\n\n仅需遵循以下几点：\n* 编写整洁的代码，添加适当的注释，并加入合适的错误处理机制。\n* 测试应用程序，确保没有Bug或问题出现。\n* 提交拉取请求，我将在审核后很高兴地认可您的贡献。\n\n### 问题报告\n\n如果您发现任何Bug或问题，请提交问题报告。","# AI_Sudoku 快速上手指南\n\nAI_Sudoku 是一个基于 Python 的智能数独求解器，能够通过摄像头或图片提取数独谜题并自动求解。它结合了图像处理技术与机器学习模型（CNN 或 KNN）进行数字识别。\n\n## 环境准备\n\n*   **操作系统**：Windows \u002F Linux\n*   **Python 版本**：Python 3.x\n*   **网络连接**：首次运行时需联网下载\u002F生成模型文件（约需 5-10 分钟）\n*   **前置依赖**：\n    *   `pip` (Python 包管理工具)\n    *   `virtualenv` (推荐用于创建隔离环境)\n\n> **国内加速建议**：在安装依赖时，建议使用清华或阿里镜像源以提升下载速度。\n> 例如：`pip install -r requirements.txt -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`\n\n## 安装步骤\n\n1.  **安装 Python 3**\n    前往 [Python 官网](https:\u002F\u002Fwww.python.org\u002Fdownloads\u002F) 下载并安装 Python 3。\n\n2.  **安装虚拟环境工具**\n    打开终端（Terminal）或命令提示符，运行以下命令：\n    ```bash\n    pip install virtualenv\n    ```\n\n3.  **创建并激活虚拟环境**\n    创建一个名为 `sudokuenv` 的虚拟环境并激活它。\n\n    *   **Windows:**\n        ```bash\n        virtualenv sudokuenv\n        cd sudokuenv\\Scripts\n        activate\n        ```\n    *   **Linux\u002FmacOS:**\n        ```bash\n        python3 -m virtualenv sudokuenv\n        source sudokuenv\u002Fbin\u002Factivate\n        ```\n\n4.  **获取项目代码**\n    克隆仓库或解压下载的 ZIP\u002FTAR 文件，然后进入项目目录：\n    ```bash\n    cd AI_Sudoku-master\n    ```\n\n5.  **安装项目依赖**\n    运行以下命令安装所需库（推荐使用国内镜像源）：\n    ```bash\n    pip install -r requirements.txt -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n    ```\n    *注意：首次运行时程序会自动生成 `knn.sav` 模型文件，请耐心等待进度完成。*\n\n## 基本使用\n\n1.  **配置模型（可选）**\n    打开 `Run.py` 文件，可以切换识别算法。默认使用 **KNN**（准确率较高），也可改为 **CNN**。\n    ```python\n    # Run.py 文件片段\n    # 设置为 \"KNN\" 使用 K 近邻算法 (推荐)\n    # 设置为 \"CNN\" 使用卷积神经网络\n    modeltype = \"KNN\"\n    ```\n\n2.  **启动应用**\n    在终端中运行主程序：\n    ```bash\n    python Run.py\n    ```\n    系统将弹出图形用户界面（GUI）。\n\n3.  **操作流程**\n    *   **选择图片**：在 GUI 首页点击按钮，选择一张包含数独题目的照片。\n    *   **图像处理**：点击 **Next**，程序将自动执行高斯模糊、阈值处理、透视变换等预处理步骤，并在界面上展示中间过程。\n    *   **校对识别结果**：识别完成后，界面会显示提取出的数独棋盘。如有识别错误的数字，可直接在界面上手动修正。\n    *   **获取答案**：确认棋盘无误后，点击 **reveal solution** 按钮，程序将立即显示最终解题结果。","数学老师张老师正在批改全班提交的数独作业，需要快速核对几十份手写答案的正确性。\n\n### 没有 AI_Sudoku 时\n- 老师必须肉眼逐格识别学生手写的数字，遇到字迹潦草的作业极易看错，导致误判。\n- 发现错误后，需人工在草稿纸上重新推演解题步骤，一道难题往往耗费十几分钟。\n- 面对堆积如山的作业本，重复性的机械核对让老师精力耗尽，难以关注学生的解题思路分析。\n- 若要将典型错题录入电脑制作课件，还需手动输入题目数据，效率极低且容易输错。\n\n### 使用 AI_Sudoku 后\n- 只需用手机拍摄作业照片，AI_Sudoku 即可通过图像预处理和 KNN 算法自动精准提取盘中数字，无视字迹潦草。\n- 软件瞬间完成逻辑运算并展示完整解题路径，老师可直接对照结果，将单题核对时间从分钟级压缩至秒级。\n- 识别结果在 GUI 界面可视化呈现，支持人工微调误识数字，确保最终结论绝对可靠，让老师专注于教学反馈。\n- 一键生成标准数字矩阵，方便直接导出或截图用于试卷讲评与课件制作，彻底告别手工录入。\n\nAI_Sudoku 将繁琐的视觉识别与逻辑求解自动化，把教师从低效的重复劳动中解放出来，真正实现了智能辅助教学。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fneeru1207_AI_Sudoku_fb7cde9e.png","neeru1207","Neeramitra Reddy","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fneeru1207_9cfd1e77.jpg","Python aficionado exploring computer vision and deep learning",null,"neeru1207.github.io","https:\u002F\u002Fgithub.com\u002Fneeru1207",[80],{"name":81,"color":82,"percentage":83},"Python","#3572A5",100,1019,154,"2026-04-05T09:00:28","CC0-1.0","Windows, Linux","未说明",{"notes":91,"python":92,"dependencies":93},"1. 建议使用 virtualenv 创建虚拟环境。2. 首次运行时需要联网，系统会花费 5-10 分钟生成 'knn.sav' 模型文件，后续运行将使用本地文件。3. 默认使用 KNN 算法进行识别（准确率约 97%），也可在代码中配置为 CNN（准确率约 98%），两者均基于 MNIST 数据集训练。4. 应用包含 GUI 界面，用于选择图片、查看预处理步骤及修正识别结果。","Python 3",[94,95],"virtualenv","requirements.txt 中列出的包 (具体列表未在 README 中展示)",[15,14],[98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117],"opencv-python","cv2","image-processing","image-segmentation","cnn","cnn-tensorflow","knn-classification","knn-classifier","hough-transform","hough-lines","hough-line-transform","blob-detection","gui","tkinter-gui","tkinter-python","digital-image-processing","digit-recognition-application","sudoku-solver","sudoku-grabber","machine-learning","2026-03-27T02:49:30.150509","2026-04-08T13:58:49.451380",[],[]]