[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-landing-ai--vision-agent":3,"tool-landing-ai--vision-agent":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 真正成长为懂上",151314,2,"2026-04-11T23:32:58",[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":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":77,"owner_website":78,"owner_url":79,"languages":80,"stars":85,"forks":86,"last_commit_at":87,"license":88,"difficulty_score":32,"env_os":89,"env_gpu":89,"env_ram":89,"env_deps":90,"category_tags":96,"github_topics":76,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":98,"updated_at":99,"faqs":100,"releases":129},6758,"landing-ai\u002Fvision-agent","vision-agent","This tool has been deprecated. Use Agentic Document Extraction instead.","VisionAgent 是 LandingAI 推出的一款视觉 AI 助手，旨在帮助用户快速构建具备视觉理解能力的应用程序。用户只需提供一张图片或一段视频，并输入自然语言指令，它便能自动选择最合适的视觉模型，并生成可直接运行的代码，从而将原本复杂的视觉开发流程缩短至几分钟。\n\n这一工具主要解决了传统视觉 AI 开发中模型选型困难、代码编写繁琐以及调试成本高等痛点，让非专家也能轻松实现复杂的视觉推理任务。它特别适合开发者、数据科学家以及希望快速验证视觉想法的研究人员使用，同时也为需要集成视觉功能的产品团队提供了高效的原型设计手段。\n\n其核心技术亮点在于“代理式”（Agentic）架构：不仅能理解用户的意图，还能自主规划任务步骤、调用多种大模型（如 Anthropic 和 Google 的模型）进行协同工作，最终输出高质量的工程代码。不过需要注意的是，该版本目前已停止维护，官方建议新用户转向使用其升级版方案\"Agentic Document Extraction\"以获取更稳定的支持。","\u003Cdiv align=\"center\">\n    \u003Cpicture>\n        \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fgithub.com\u002Flanding-ai\u002Fvision-agent\u002Fblob\u002Fmain\u002Fassets\u002Flogo_light.svg?raw=true\">\n        \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fgithub.com\u002Flanding-ai\u002Fvision-agent\u002Fblob\u002Fmain\u002Fassets\u002Flogo_dark.svg?raw=true\">\n        \u003Cimg alt=\"VisionAgent\" height=\"200px\" src=\"https:\u002F\u002Fgithub.com\u002Flanding-ai\u002Fvision-agent\u002Fblob\u002Fmain\u002Fassets\u002Flogo_light.svg?raw=true\">\n    \u003C\u002Fpicture> \n    \n_Prompt with an image\u002Fvideo → Get runnable vision code → Build Visual AI App in minutes_\n\n\n[![](https:\u002F\u002Fdcbadge.vercel.app\u002Fapi\u002Fserver\u002FwPdN8RCYew?compact=true&style=flat)](https:\u002F\u002Fdiscord.gg\u002FwPdN8RCYew)\n![ci_status](https:\u002F\u002Fgithub.com\u002Flanding-ai\u002Fvision-agent\u002Factions\u002Fworkflows\u002Fci_cd.yml\u002Fbadge.svg)\n[![PyPI version](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fvision-agent.svg)](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fvision-agent)\n![version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fvision-agent)\n\u003C\u002Fdiv>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fdiscord.com\u002Finvite\u002FRVcW3j9RgR\" target=\"_blank\">\u003Cstrong>Discord\u003C\u002Fstrong>\u003C\u002Fa> ·\n  \u003Ca href=\"https:\u002F\u002Flanding.ai\u002Fblog\u002Fvisionagent-an-agentic-approach-for-complex-visual-reasoning\" target=\"_blank\">\u003Cstrong>Architecture\u003C\u002Fstrong>\u003C\u002Fa> ·\n  \u003Ca href=\"https:\u002F\u002Fwww.youtube.com\u002Fplaylist?list=PLrKGAzovU85fvo22OnVtPl90mxBygIf79\" target=\"_blank\">\u003Cstrong>YouTube\u003C\u002Fstrong>\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cbr \u002F>\n\n**VisionAgent** is the Visual AI pilot from LandingAI. Give it a prompt and an image, and it automatically picks the right vision models and outputs ready‑to‑run code—letting you build vision‑enabled apps in minutes. You can play around with VisionAgent using our local webapp in `examples\u002Fchat` and following the directions in the `README.md`:\n\n\u003Chttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F752632b3-dda5-44f1-b27e-5cb4c97757ac>\n\n\n## Steps to Set Up the Library  \n\n### Get Your VisionAgent API Key\nThe most important step is to [create an account](https:\u002F\u002Fva.landing.ai\u002Fhome) and obtain your [API key](https:\u002F\u002Fva.landing.ai\u002Fsettings\u002Fapi-key).\n\n### Other Prerequisites\n- Python version 3.9 or higher\n- [Anthropic API key](#get-an-anthropic-api-key)\n- [Google API key](#get-a-google-api-key)\n\n### Why do I need Anthropic and Google API Keys?\nVisionAgent uses models from Anthropic and Google to respond to prompts and generate code. \n\n\nWhen you run VisionAgent, the app will need to use your API keys to access the Anthropic and Google models. This ensures that any projects you run with VisionAgent aren’t limited by the rate limits in place with the LandingAI accounts, and it also prevents many users from overloading the LandingAI rate limits.\n\nAnthropic and Google each have their own rate limits and paid tiers. Refer to their documentation and pricing to learn more.\n\n> **_NOTE:_** In VisionAgent v1.0.2 and earlier, VisionAgent was powered by Anthropic Claude-3.5 and OpenAI o1. If using one of these VisionAgent versions, you get an OpenAI API key and set it as an environment variable.\n\n\n### Get an Anthropic API Key\n1. If you don’t have one yet, create an [Anthropic Console account](https:\u002F\u002Fconsole.anthropic.com\u002F).\n2. In the Anthropic Console, go to the [API Keys](https:\u002F\u002Fconsole.anthropic.com\u002Fsettings\u002Fkeys) page.\n3. Generate an API key.\n\n### Get a Google API Key\n1. If you don’t have one yet, create a [Google AI Studio account](https:\u002F\u002Faistudio.google.com\u002F).\n2. In Google AI Studio, go to the [Get API Key](https:\u002F\u002Faistudio.google.com\u002Fapp\u002Fapikey) page.\n3. Generate an API key.\n\n\n## Installation\n\nInstall with uv:\n```bash\nuv add vision-agent\n```\n\nInstall with pip:\n\n```bash\npip install vision-agent\n```\n\n## Quickstart: Prompt VisionAgent\nFollow this quickstart to learn how to prompt VisionAgent. After learning the basics, customize your prompt and workflow to meet your needs.\n\n1. Get your Anthropic, Google, and VisionAgent API keys.\n2. [Set the Anthropic, Google, and VisionAgent API keys as environment variables](#set-api-keys-as-environment-variables).\n3. [Install VisionAgent](#installation).\n4. Create a folder called `quickstart`. \n5. Find an image you want to analyze and save it to the `quickstart` folder.\n6. Copy the [Sample Script](#sample-script-prompt-visionagent) to a file called `source.py`. Save the file to the `quickstart` folder.  \n7. Run `source.py`. \n8. VisionAgent creates a file called `generated_code.py` and saves the generated code there.  \n\n### Set API Keys as Environment Variables\nBefore running VisionAgent code, you must set the Anthropic, Google, and VisionAgent API keys as environment variables. Each operating system offers different ways to do this.\n\nHere is the code for setting the variables:\n```bash\nexport VISION_AGENT_API_KEY=\"your-api-key\"\nexport ANTHROPIC_API_KEY=\"your-api-key\"\nexport GOOGLE_API_KEY=\"your-api-key\" \n```\n### Sample Script: Prompt VisionAgent\nTo use VisionAgent to generate code, use the following script as a starting point:\n\n```python\n# Import the classes you need from the VisionAgent package\nfrom vision_agent.agent import VisionAgentCoderV2\nfrom vision_agent.models import AgentMessage\n\n# Enable verbose output \nagent = VisionAgentCoderV2(verbose=True)\n\n# Add your prompt (content) and image file (media)\ncode_context = agent.generate_code(\n    [\n        AgentMessage(\n            role=\"user\",\n            content=\"Describe the image\",\n            media=[\"friends.jpg\"]\n        )\n    ]\n)\n\n# Write the output to a file\nwith open(\"generated_code.py\", \"w\") as f:\n    f.write(code_context.code + \"\\n\" + code_context.test)\n```\n### What to Expect When You Prompt VisionAgent\nWhen you submit a prompt, VisionAgent performs the following tasks.\n\n1. Generates a plan for the code generation task. If verbose output is on, the numbered steps for this plan display.\n2. Generates code and a test case based on the plan. \n3. Tests the generated code with the test case. If the test case fails, VisionAgent iterates on the code generation process until the test case passes.\n\n## Example: Count Cans in an Image\nCheck out how to use VisionAgent in this Jupyter Notebook to learn how to count the number of cans in an image:\n\n[Count Cans in an Image](https:\u002F\u002Fgithub.com\u002Flanding-ai\u002Fvision-agent\u002Fblob\u002Fmain\u002Fexamples\u002Fnotebooks\u002Fcounting_cans.ipynb)\n\n## Use Specific Tools from VisionAgent\nThe VisionAgent library includes a set of [tools](vision_agent\u002Ftools), which are standalone models or functions that complete specific tasks. When you prompt VisionAgent, VisionAgent selects one or more of these tools to complete the tasks outlined in your prompt.\n\nFor example, if you prompt VisionAgent to “count the number of dogs in an image”, VisionAgent might use the `florence2_object_detection` tool to detect all the dogs, and then the `countgd_object_detection` tool to count the number of detected dogs.\n\nAfter installing the VisionAgent library, you can also use the tools in your own scripts. For example, if you’re writing a script to track objects in videos, you can call the `owlv2_sam2_video_tracking` function. In other words, you can use the VisionAgent tools outside of simply prompting VisionAgent. \n\nThe tools are in the [vision_agent.tools](vision_agent\u002Ftools) API.\n\n### Sample Script: Use Specific Tools for Images\nYou can call the `countgd_object_detection` function to count the number of objects in an image. \n\nTo do this, you could run this script:\n```python\n# Import the VisionAgent Tools library; import Matplotlib to visualize the results\nimport vision_agent.tools as T\nimport matplotlib.pyplot as plt\n\n# Load the image\nimage = T.load_image(\"people.png\")\n\n# Call the function to count objects in an image, and specify that you want to count people\ndets = T.countgd_object_detection(\"person\", image)\n\n# Visualize the countgd bounding boxes on the image\nviz = T.overlay_bounding_boxes(image, dets)\n\n# Save the visualization to a file\nT.save_image(viz, \"people_detected.png\")\n\n# Display the visualization\nplt.imshow(viz)\nplt.show()\n\n```\n### Sample Script: Use Specific Tools for Videos\nYou can call the `countgd_sam2_video_tracking` function to track people in a video and pair it with the `extract_frames_and_timestamps` function to return the frames and timestamps in which those people appear.\n\nTo do this, you could run this script:\n```python\n# Import the VisionAgent Tools library\nimport vision_agent.tools as T\n\n# Call the function to get the frames and timestamps\nframes_and_ts = T.extract_frames_and_timestamps(\"people.mp4\")\n\n# Extract the frames from the frames_and_ts list\nframes = [f[\"frame\"] for f in frames_and_ts]\n\n# Call the function to track objects, and specify that you want to track people\ntracks = T.countgd_sam2_video_tracking(\"person\", frames)\n\n# Visualize the countgd tracking results on the frames and save the video\nviz = T.overlay_segmentation_masks(frames, tracks)\nT.save_video(viz, \"people_detected.mp4\")\n```\n\n\n## Use Other LLM Providers\nVisionAgent uses [Anthropic Claude 3.7 Sonnet](https:\u002F\u002Fwww.anthropic.com\u002Fclaude\u002Fsonnet) and [Gemini Flash 2.0 Experimental](https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Fmodels\u002Fexperimental-models) (`gemini-2.0-flash-exp`) to respond to prompts and generate code. We’ve found that these provide the best performance for VisionAgent and are available on the free tiers (with rate limits) from their providers.\n\nIf you prefer to use only one of these models or a different set of models, you can change the selected LLM provider in this file: `vision_agent\u002Fconfigs\u002Fconfig.py`. You must also add the provider’s API Key as an [environment variable](#set-api-keys-as-environment-variables).\n\nFor example, if you want to use **only** the Anthropic model, run this command:\n```bash\ncp vision_agent\u002Fconfigs\u002Fanthropic_config.py vision_agent\u002Fconfigs\u002Fconfig.py\n```\n\nOr, you can manually enter the model details in the `config.py` file. For example, if you want to change the planner model from Anthropic to OpenAI, you would replace this code:\n```python\n    planner: Type[LMM] = Field(default=AnthropicLMM)\n    planner_kwargs: dict = Field(\n        default_factory=lambda: {\n            \"model_name\": \"claude-3-7-sonnet-20250219\",\n            \"temperature\": 0.0,\n            \"image_size\": 768,\n        }\n    )\n```\n\nwith this code:\n\n```python\n    planner: Type[LMM] = Field(default=OpenAILMM)\n    planner_kwargs: dict = Field(\n        default_factory=lambda: {\n            \"model_name\": \"gpt-4o-2024-11-20\",\n            \"temperature\": 0.0,\n            \"image_size\": 768,\n            \"image_detail\": \"low\",\n        }\n    )\n```\n\n## Resources\n- [Discord](https:\u002F\u002Fdiscord.com\u002Finvite\u002FRVcW3j9RgR): Check out our community of VisionAgent users to share use cases and learn about updates.\n- [VisionAgent Library Docs](https:\u002F\u002Flanding-ai.github.io\u002Fvision-agent\u002F): Learn how to use this library.\n- [Video Tutorials](https:\u002F\u002Fwww.youtube.com\u002Fplaylist?list=PLrKGAzovU85fvo22OnVtPl90mxBygIf79): Watch the latest video tutorials to see how VisionAgent is used in a variety of use cases.\n","\u003Cdiv align=\"center\">\n    \u003Cpicture>\n        \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fgithub.com\u002Flanding-ai\u002Fvision-agent\u002Fblob\u002Fmain\u002Fassets\u002Flogo_light.svg?raw=true\">\n        \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fgithub.com\u002Flanding-ai\u002Fvision-agent\u002Fblob\u002Fmain\u002Fassets\u002Flogo_dark.svg?raw=true\">\n        \u003Cimg alt=\"VisionAgent\" height=\"200px\" src=\"https:\u002F\u002Fgithub.com\u002Flanding-ai\u002Fvision-agent\u002Fblob\u002Fmain\u002Fassets\u002Flogo_light.svg?raw=true\">\n    \u003C\u002Fpicture> \n    \n_通过图片或视频提供提示 → 获取可运行的视觉代码 → 在几分钟内构建视觉 AI 应用程序_\n\n\n[![](https:\u002F\u002Fdcbadge.vercel.app\u002Fapi\u002Fserver\u002FwPdN8RCYew?compact=true&style=flat)](https:\u002F\u002Fdiscord.gg\u002FwPdN8RCYew)\n![ci_status](https:\u002F\u002Fgithub.com\u002Flanding-ai\u002Fvision-agent\u002Factions\u002Fworkflows\u002Fci_cd.yml\u002Fbadge.svg)\n[![PyPI version](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fvision-agent.svg)](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fvision-agent)\n![version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fvision-agent)\n\u003C\u002Fdiv>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fdiscord.com\u002Finvite\u002FRVcW3j9RgR\" target=\"_blank\">\u003Cstrong>Discord\u003C\u002Fstrong>\u003C\u002Fa> ·\n  \u003Ca href=\"https:\u002F\u002Flanding.ai\u002Fblog\u002Fvisionagent-an-agentic-approach-for-complex-visual-reasoning\" target=\"_blank\">\u003Cstrong>架构\u003C\u002Fstrong>\u003C\u002Fa> ·\n  \u003Ca href=\"https:\u002F\u002Fwww.youtube.com\u002Fplaylist?list=PLrKGAzovU85fvo22OnVtPl90mxBygIf79\" target=\"_blank\">\u003Cstrong>YouTube\u003C\u002Fstrong>\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cbr \u002F>\n\n**VisionAgent** 是 LandingAI 推出的视觉 AI 引擎。只需提供一个提示和一张图像，它就能自动选择合适的视觉模型，并输出可以直接运行的代码——让您在几分钟内构建支持视觉功能的应用程序。您可以通过 `examples\u002Fchat` 中的本地 Web 应用程序并按照 `README.md` 中的说明来体验 VisionAgent：\n\n\u003Chttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F752632b3-dda5-44f1-b27e-5cb4c97757ac>\n\n\n## 库的安装步骤  \n\n### 获取您的 VisionAgent API 密钥\n最重要的一步是[创建账户](https:\u002F\u002Fva.landing.ai\u002Fhome)，并获取您的[API 密钥](https:\u002F\u002Fva.landing.ai\u002Fsettings\u002Fapi-key)。\n\n### 其他先决条件\n- Python 3.9 或更高版本\n- [Anthropic API 密钥](#get-an-anthropic-api-key)\n- [Google API 密钥](#get-a-google-api-key)\n\n### 为什么需要 Anthropic 和 Google 的 API 密钥？\nVisionAgent 使用 Anthropic 和 Google 的模型来响应提示并生成代码。\n\n\n当您运行 VisionAgent 时，应用程序需要使用您的 API 密钥来访问 Anthropic 和 Google 的模型。这确保了您使用 VisionAgent 运行的任何项目都不会受到 LandingAI 账户速率限制的影响，同时也避免了大量用户对 LandingAI 速率限制的过度占用。\n\nAnthropic 和 Google 都有自己的速率限制和付费层级。请参阅它们的文档和定价信息以了解更多信息。\n\n> **_注意:_** 在 VisionAgent v1.0.2 及更早版本中，VisionAgent 由 Anthropic Claude-3.5 和 OpenAI o1 提供支持。如果您使用的是这些版本之一，您将获得一个 OpenAI API 密钥，并将其设置为环境变量。\n\n\n### 获取 Anthropic API 密钥\n1. 如果您还没有，请创建一个[Anthropic 控制台账户](https:\u002F\u002Fconsole.anthropic.com\u002F)。\n2. 在 Anthropic 控制台中，前往[API 密钥](https:\u002F\u002Fconsole.anthropic.com\u002Fsettings\u002Fkeys)页面。\n3. 生成一个 API 密钥。\n\n### 获取 Google API 密钥\n1. 如果您还没有，请创建一个[Google AI Studio 账户](https:\u002F\u002Faistudio.google.com\u002F)。\n2. 在 Google AI Studio 中，前往[获取 API 密钥](https:\u002F\u002Faistudio.google.com\u002Fapp\u002Fapikey)页面。\n3. 生成一个 API 密钥。\n\n\n## 安装\n\n使用 uv 安装：\n```bash\nuv add vision-agent\n```\n\n使用 pip 安装：\n\n```bash\npip install vision-agent\n```\n\n## 快速入门：向 VisionAgent 提示\n按照本快速入门指南学习如何向 VisionAgent 提示。掌握基础知识后，您可以根据自己的需求自定义提示和工作流程。\n\n1. 获取您的 Anthropic、Google 和 VisionAgent API 密钥。\n2. [将 Anthropic、Google 和 VisionAgent API 密钥设置为环境变量](#set-api-keys-as-environment-variables)。\n3. [安装 VisionAgent](#installation)。\n4. 创建一个名为 `quickstart` 的文件夹。\n5. 找到您想要分析的图像，并将其保存到 `quickstart` 文件夹中。\n6. 将[示例脚本](#sample-script-prompt-visionagent)复制到名为 `source.py` 的文件中。将该文件保存到 `quickstart` 文件夹中。\n7. 运行 `source.py`。\n8. VisionAgent 会生成一个名为 `generated_code.py` 的文件，并将生成的代码保存到其中。\n\n### 将 API 密钥设置为环境变量\n在运行 VisionAgent 代码之前，您必须将 Anthropic、Google 和 VisionAgent 的 API 密钥设置为环境变量。不同的操作系统有不同的设置方法。\n\n以下是设置变量的代码：\n```bash\nexport VISION_AGENT_API_KEY=\"your-api-key\"\nexport ANTHROPIC_API_KEY=\"your-api-key\"\nexport GOOGLE_API_KEY=\"your-api-key\" \n```\n### 示例脚本：向 VisionAgent 提示\n要使用 VisionAgent 生成代码，可以使用以下脚本作为起点：\n\n```python\n# 从 VisionAgent 包中导入所需的类\nfrom vision_agent.agent import VisionAgentCoderV2\nfrom vision_agent.models import AgentMessage\n\n# 启用详细输出\nagent = VisionAgentCoderV2(verbose=True)\n\n# 添加您的提示（内容）和图像文件（媒体）\ncode_context = agent.generate_code(\n    [\n        AgentMessage(\n            role=\"user\",\n            content=\"描述这张图像\",\n            media=[\"friends.jpg\"]\n        )\n    ]\n)\n\n# 将输出写入文件\nwith open(\"generated_code.py\", \"w\") as f:\n    f.write(code_context.code + \"\\n\" + code_context.test)\n```\n### 向 VisionAgent 提示时的预期结果\n当您提交提示时，VisionAgent 会执行以下任务。\n\n1. 为代码生成任务生成计划。如果启用了详细输出，将会显示该计划的编号步骤。\n2. 根据计划生成代码和测试用例。\n3. 使用测试用例测试生成的代码。如果测试失败，VisionAgent 会反复迭代代码生成过程，直到测试通过为止。\n\n## 示例：统计图像中的罐头数量\n请查看此 Jupyter Notebook 中的示例，了解如何使用 VisionAgent 统计图像中的罐头数量：\n\n[统计图像中的罐头数量](https:\u002F\u002Fgithub.com\u002Flanding-ai\u002Fvision-agent\u002Fblob\u002Fmain\u002Fexamples\u002Fnotebooks\u002Fcounting_cans.ipynb)\n\n## 使用 VisionAgent 中的特定工具\nVisionAgent 库包含一组[工具](vision_agent\u002Ftools)，这些工具是独立的模型或函数，用于完成特定任务。当您向 VisionAgent 发出提示时，VisionAgent 会从这些工具中选择一个或多个来完成您提示中描述的任务。\n\n例如，如果您提示 VisionAgent“计算图像中的狗的数量”，VisionAgent 可能会使用 `florence2_object_detection` 工具检测所有狗，然后使用 `countgd_object_detection` 工具统计检测到的狗的数量。\n\n安装 VisionAgent 库后，您也可以在自己的脚本中使用这些工具。例如，如果您正在编写一个用于跟踪视频中物体的脚本，可以调用 `owlv2_sam2_video_tracking` 函数。换句话说，您不仅可以在向 VisionAgent 发送提示时使用这些工具，还可以在其他场景中直接调用它们。\n\n这些工具位于 [vision_agent.tools](vision_agent\u002Ftools) API 中。\n\n### 示例脚本：对图像使用特定工具\n您可以调用 `countgd_object_detection` 函数来统计图像中的对象数量。\n\n为此，您可以运行以下脚本：\n```python\n# 导入 VisionAgent Tools 库；导入 Matplotlib 以可视化结果\nimport vision_agent.tools as T\nimport matplotlib.pyplot as plt\n\n# 加载图像\nimage = T.load_image(\"people.png\")\n\n# 调用函数统计图像中的对象，并指定要统计“人”\ndets = T.countgd_object_detection(\"person\", image)\n\n# 在图像上可视化 countgd 检测框\nviz = T.overlay_bounding_boxes(image, dets)\n\n# 将可视化结果保存为文件\nT.save_image(viz, \"people_detected.png\")\n\n# 显示可视化结果\nplt.imshow(viz)\nplt.show()\n```\n\n### 示例脚本：对视频使用特定工具\n您可以调用 `countgd_sam2_video_tracking` 函数来跟踪视频中的人，并将其与 `extract_frames_and_timestamps` 函数结合使用，以返回这些人出现的帧和时间戳。\n\n为此，您可以运行以下脚本：\n```python\n# 导入 VisionAgent Tools 库\nimport vision_agent.tools as T\n\n# 调用函数获取帧和时间戳\nframes_and_ts = T.extract_frames_and_timestamps(\"people.mp4\")\n\n# 从 frames_and_ts 列表中提取帧\nframes = [f[\"frame\"] for f in frames_and_ts]\n\n# 调用函数跟踪对象，并指定要跟踪“人”\ntracks = T.countgd_sam2_video_tracking(\"person\", frames)\n\n# 在帧上可视化 countgd 跟踪结果并保存视频\nviz = T.overlay_segmentation_masks(frames, tracks)\nT.save_video(viz, \"people_detected.mp4\")\n```\n\n\n## 使用其他 LLM 提供商\nVisionAgent 使用 [Anthropic Claude 3.7 Sonnet](https:\u002F\u002Fwww.anthropic.com\u002Fclaude\u002Fsonnet) 和 [Gemini Flash 2.0 Experimental](https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Fmodels\u002Fexperimental-models) (`gemini-2.0-flash-exp`) 来响应提示并生成代码。我们发现，这些模型为 VisionAgent 提供了最佳性能，并且其提供商均在其免费层级（有限制）中提供这些模型。\n\n如果您更倾向于仅使用其中一种模型，或者使用不同的模型组合，可以在 `vision_agent\u002Fconfigs\u002Fconfig.py` 文件中更改所选的 LLM 提供商。此外，您还需要将提供商的 API 密钥作为[环境变量](#set-api-keys-as-environment-variables)进行设置。\n\n例如，如果您只想使用 Anthropic 模型，可以运行以下命令：\n```bash\ncp vision_agent\u002Fconfigs\u002Fanthropic_config.py vision_agent\u002Fconfigs\u002Fconfig.py\n```\n\n或者，您也可以手动在 `config.py` 文件中输入模型详细信息。例如，如果您想将规划器模型从 Anthropic 更改为 OpenAI，可以将以下代码：\n```python\n    planner: Type[LMM] = Field(default=AnthropicLMM)\n    planner_kwargs: dict = Field(\n        default_factory=lambda: {\n            \"model_name\": \"claude-3-7-sonnet-20250219\",\n            \"temperature\": 0.0,\n            \"image_size\": 768,\n        }\n    )\n```\n\n替换为以下代码：\n\n```python\n    planner: Type[LMM] = Field(default=OpenAILMM)\n    planner_kwargs: dict = Field(\n        default_factory=lambda: {\n            \"model_name\": \"gpt-4o-2024-11-20\",\n            \"temperature\": 0.0,\n            \"image_size\": 768,\n            \"image_detail\": \"low\",\n        }\n    )\n```\n\n## 资源\n- [Discord](https:\u002F\u002Fdiscord.com\u002Finvite\u002FRVcW3j9RgR)：加入我们的 VisionAgent 用户社区，分享使用案例并了解最新更新。\n- [VisionAgent 库文档](https:\u002F\u002Flanding-ai.github.io\u002Fvision-agent\u002F)：学习如何使用此库。\n- [视频教程](https:\u002F\u002Fwww.youtube.com\u002Fplaylist?list=PLrKGAzovU85fvo22OnVtPl90mxBygIf79)：观看最新的视频教程，了解 VisionAgent 在各种应用场景中的使用方法。","# VisionAgent 快速上手指南\n\nVisionAgent 是 LandingAI 推出的视觉 AI 智能体。只需提供提示词和图片\u002F视频，它就能自动选择合适的视觉模型并生成可运行的代码，帮助你在几分钟内构建视觉 AI 应用。\n\n## 环境准备\n\n在开始之前，请确保满足以下要求：\n\n*   **系统要求**：Python 3.9 或更高版本。\n*   **必需 API Keys**：VisionAgent 依赖外部大模型进行推理和代码生成，你需要准备以下三个密钥：\n    1.  **VisionAgent API Key**：在 [LandingAI 官网](https:\u002F\u002Fva.landing.ai\u002Fhome) 注册账号并获取。\n    2.  **Anthropic API Key**：用于调用 Claude 模型（[获取地址](https:\u002F\u002Fconsole.anthropic.com\u002Fsettings\u002Fkeys)）。\n    3.  **Google API Key**：用于调用 Gemini 模型（[获取地址](https:\u002F\u002Faistudio.google.com\u002Fapp\u002Fapikey)）。\n\n> **注意**：设置这些密钥是为了避免触及 LandingAI 公共账户的速率限制，并确保项目运行的稳定性。\n\n## 安装步骤\n\n你可以使用 `pip` 或 `uv` 进行安装：\n\n**使用 pip 安装：**\n```bash\npip install vision-agent\n```\n\n**使用 uv 安装：**\n```bash\nuv add vision-agent\n```\n\n## 基本使用\n\n### 1. 配置环境变量\n\n运行前，请将获取到的三个 API Key 设置为环境变量。\n\n**Linux\u002FmacOS:**\n```bash\nexport VISION_AGENT_API_KEY=\"your-vision-agent-key\"\nexport ANTHROPIC_API_KEY=\"your-anthropic-key\"\nexport GOOGLE_API_KEY=\"your-google-key\" \n```\n\n**Windows (PowerShell):**\n```powershell\n$env:VISION_AGENT_API_KEY=\"your-vision-agent-key\"\n$env:ANTHROPIC_API_KEY=\"your-anthropic-key\"\n$env:GOOGLE_API_KEY=\"your-google-key\"\n```\n\n### 2. 编写脚本\n\n创建一个名为 `source.py` 的文件，填入以下代码。该脚本会让 VisionAgent 分析一张图片并生成相应的处理代码。\n\n请确保当前目录下有一张名为 `friends.jpg` 的图片，或者修改代码中的文件名。\n\n```python\n# 从 VisionAgent 包导入必要的类\nfrom vision_agent.agent import VisionAgentCoderV2\nfrom vision_agent.models import AgentMessage\n\n# 初始化智能体，开启详细输出以便观察过程\nagent = VisionAgentCoderV2(verbose=True)\n\n# 发送提示词和图片\ncode_context = agent.generate_code(\n    [\n        AgentMessage(\n            role=\"user\",\n            content=\"Describe the image\",\n            media=[\"friends.jpg\"]\n        )\n    ]\n)\n\n# 将生成的代码和测试用例保存到 generated_code.py\nwith open(\"generated_code.py\", \"w\") as f:\n    f.write(code_context.code + \"\\n\" + code_context.test)\n```\n\n### 3. 运行与结果\n\n执行脚本：\n```bash\npython source.py\n```\n\n**执行流程说明：**\n1.  **规划**：VisionAgent 会根据你的提示词生成代码编写计划。\n2.  **生成**：基于计划生成 Python 代码及对应的测试用例。\n3.  **自修正**：自动运行测试用例，如果失败，它会迭代修改代码直到通过测试。\n\n运行结束后，当前目录会生成一个 `generated_code.py` 文件，里面包含了针对你图片任务的可直接运行的视觉处理代码。","某电商质检团队需要快速开发一个自动检测服装瑕疵（如污渍、破洞）并生成报告的原型系统，以应对突发的批量验货需求。\n\n### 没有 vision-agent 时\n- **技术门槛高**：开发人员需手动调研并选择适合的图像分割或目标检测模型，反复调试参数才能识别细微瑕疵。\n- **开发周期长**：从数据标注、模型训练到编写推理代码和可视化界面，通常需要数周时间才能产出可用 Demo。\n- **试错成本大**：若初始选型的模型效果不佳，需推倒重来更换算法架构，严重拖慢项目进度。\n- **资源协调难**：团队成员需分别负责算法、后端和前端，沟通协作成本高，难以单人快速验证想法。\n\n### 使用 vision-agent 后\n- **自然语言驱动**：只需上传几张瑕疵样图并输入“检测衣服上的污渍和破洞”，vision-agent 自动匹配最佳视觉模型。\n- **代码即时生成**：几分钟内直接输出可运行的 Python 代码，包含完整的推理逻辑和结果可视化功能。\n- **敏捷迭代验证**：若检测效果不理想，调整提示词即可让 vision-agent 重新生成优化后的代码，无需重写底层逻辑。\n- **单人全栈交付**：一名开发者即可利用生成的代码快速搭建端到端应用，大幅降低对多角色协作的依赖。\n\nvision-agent 将原本数周的视觉 AI 开发流程压缩至分钟级，让非专家也能通过自然语言交互快速构建高质量的视觉应用原型。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flanding-ai_vision-agent_a9dee4ad.png","landing-ai","LandingAI","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Flanding-ai_9b1ff82b.jpg","LandingAI is on a mission to make the world’s documents computable.",null,"landingAI","https:\u002F\u002Flanding.ai\u002F","https:\u002F\u002Fgithub.com\u002Flanding-ai",[81],{"name":82,"color":83,"percentage":84},"Python","#3572A5",100,5270,602,"2026-04-10T11:25:16","Apache-2.0","未说明",{"notes":91,"python":92,"dependencies":93},"该工具主要依赖云端 LLM API（Anthropic 和 Google）进行推理和代码生成，本地无需部署大型模型。必须配置 VISION_AGENT_API_KEY、ANTHROPIC_API_KEY 和 GOOGLE_API_KEY 三个环境变量方可运行。支持通过修改配置文件切换不同的 LLM 提供商（如 OpenAI）。可通过 pip 或 uv 安装。","3.9+",[64,94,95],"Anthropic API (Claude 3.7 Sonnet)","Google API (Gemini Flash 2.0 Experimental)",[15,13,97],"其他","2026-03-27T02:49:30.150509","2026-04-12T07:53:30.015323",[101,106,111,116,120,125],{"id":102,"question_zh":103,"answer_zh":104,"source_url":105},30482,"在 macOS 上使用 Python 3.13 安装 vision-agent 时遇到 pillow-heif 构建失败错误怎么办？","这是因为 vision-agent 目前依赖的 pillow-heif 版本（0.16.*）尚未支持 Python 3.13（首个支持版本为 0.17.0）。解决方案有两种：\n1. **推荐方案**：降级 Python 版本至 3.10 或 3.11 进行安装。\n2. **临时方案**：如果是从源码安装，可以修改项目根目录下的 `pyproject.toml` 文件，将 `pillow-heif = \"^0.16.0\"` 改为 `pillow-heif = \"^0.17.0\"` 或更高版本，然后重新运行 pip install。","https:\u002F\u002Fgithub.com\u002Flanding-ai\u002Fvision-agent\u002Fissues\u002F413",{"id":107,"question_zh":108,"answer_zh":109,"source_url":110},30483,"为什么在使用时会频繁出现 'Could not extract JSON' 的错误？","这通常是因为大模型返回的字符串格式不规范（例如包含额外文本、换行符或不完整的 JSON）。维护者已发布更新修复了此问题，主要改进包括：\n1. `extract_json` 函数现在能提取被额外文本包围的 JSON。\n2. 修复了由多余换行符引起的解码错误。\n3. 增加了重试循环：如果首选计划生成失败或调试器首次执行失败，系统会自动重试。\n建议升级 vision-agent 到最新版本以获取这些修复。","https:\u002F\u002Fgithub.com\u002Flanding-ai\u002Fvision-agent\u002Fissues\u002F166",{"id":112,"question_zh":113,"answer_zh":114,"source_url":115},30484,"Vision Agent 为什么会在代码执行失败后无限循环或一直运行不终止？","这是之前的逻辑设计导致的。Agent 包含一个“计划循环”和一个“代码调试循环”。当生成的代码执行失败时，它会进入调试循环尝试修复代码；如果修复后的代码再次失败，它会继续循环。之前存在一个外层循环导致在某些情况下无法退出。维护者已在 PR #169 中移除了导致该问题的外层循环。请确保升级到最新版本，现在的逻辑是：只有在代码写入失败时才会进入内部调试循环，且不再有无限制的外层重试。","https:\u002F\u002Fgithub.com\u002Flanding-ai\u002Fvision-agent\u002Fissues\u002F167",{"id":117,"question_zh":118,"answer_zh":119,"source_url":115},30485,"既然 write_plans() 已经生成了计划和所需工具，为什么后续还需要调用 retrieve_tools()？","`write_plans` 阶段仅获取工具的简短描述（用于让 LLM 决定使用哪些工具），而不是完整的工具文档。如果直接加载所有工具的完整文档，会导致 Prompt 过长超出上下文限制。因此，在确定具体需要哪些工具后，`retrieve_tools()` 会按需获取这些工具的完整文档和实现细节，以便生成可执行的具体代码。",{"id":121,"question_zh":122,"answer_zh":123,"source_url":124},30486,"使用 DeepSeek-Janus-Pro-7B 模型后端时，前端 Chat 界面无响应但底层工具测试正常，可能是什么原因？","这种情况通常表明底层视觉工具（如对象检测、图像加载）本身工作正常（如 Issue 中所示脚本测试成功），但前端与特定多模态模型（DeepSeek-Janus-Pro-7B）的集成或推理服务连接存在问题。由于官方回复较少，建议检查：\n1. 模型后端服务日志是否有报错。\n2. 前端配置中模型地址或端口是否正确指向了运行中的 DeepSeek 服务。\n3. 确认该模型版本是否完全兼容当前的 vision-agent 前端协议。如有必要，可参考社区博客或联系维护者获取针对该特定模型的配置示例。","https:\u002F\u002Fgithub.com\u002Flanding-ai\u002Fvision-agent\u002Fissues\u002F375",{"id":126,"question_zh":127,"answer_zh":128,"source_url":105},30487,"macOS 安装 vision-agent 前需要预先安装哪些系统依赖？","在 macOS 上安装前，建议先通过 Homebrew 安装必要的构建工具和多媒体库，以避免编译 wheel 时出错。常用命令如下：\n`brew install pkg-config`\n`brew install ffmpeg`\n如果遇到 HEIF 图像格式相关错误，可能还需要：\n`brew install x265 libjpeg libde265 libheif`\n安装完这些依赖后，再运行 `python3 -m pip install vision-agent`。注意同时需确保 Python 版本兼容性（建议使用 3.10 或 3.11）。",[]]