[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-autodistill--autodistill":3,"tool-autodistill--autodistill":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 真正成长为懂上",155373,2,"2026-04-14T11:34:08",[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":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":64,"owner_name":72,"owner_avatar_url":73,"owner_bio":74,"owner_company":75,"owner_location":75,"owner_email":76,"owner_twitter":75,"owner_website":77,"owner_url":78,"languages":79,"stars":92,"forks":93,"last_commit_at":94,"license":95,"difficulty_score":32,"env_os":96,"env_gpu":97,"env_ram":96,"env_deps":98,"category_tags":107,"github_topics":109,"view_count":32,"oss_zip_url":75,"oss_zip_packed_at":75,"status":17,"created_at":127,"updated_at":128,"faqs":129,"releases":160},7583,"autodistill\u002Fautodistill","autodistill","Images to inference with no labeling (use foundation models to train supervised models).","autodistill 是一款旨在消除人工标注成本的 AI 开源工具，它能帮助开发者直接从未标记的图片快速构建可部署的定制模型。在传统流程中，训练高精度视觉模型往往需要耗费大量时间进行数据标注，而 autodistill 巧妙地利用大型基础模型（如多模态大模型）作为“教师”，自动为原始图像生成标注数据，进而训练出轻量级、推理速度更快的“学生”模型。\n\n这一过程完全自动化，无需人工干预，真正实现了从“无标签图片”到“边缘端推理”的无缝衔接。目前，autodistill 主要支持目标检测和实例分割等视觉任务，并允许用户将蒸馏后的模型私有化部署在云端或本地设备上，确保数据主权。\n\n其核心技术亮点在于模块化的插件架构，用户可以灵活组合不同的基础模型与目标模型，只需确保任务类型匹配即可轻松搭建流水线。无论是希望快速验证想法的 AI 开发者、需要高效处理特定视觉任务的研究人员，还是寻求降低数据标注成本的企业团队，autodistill 都能提供极大的便利，让定制专属视觉模型变得像搭积木一样简单高效。","\u003Cdiv align=\"center\">\n  \u003Cp>\n    \u003Ca align=\"center\" href=\"\" target=\"_blank\">\n      \u003Cimg\n        width=\"850\"\n        src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_7b39c41c5701.jpg\"\n      >\n    \u003C\u002Fa>\n  \u003C\u002Fp>\n  \n[notebooks](https:\u002F\u002Fgithub.com\u002Froboflow\u002Fnotebooks) | [inference](https:\u002F\u002Fgithub.com\u002Froboflow\u002Finference) | [autodistill](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill) | [collect](https:\u002F\u002Fgithub.com\u002Froboflow\u002Froboflow-collect)\n\n[![version](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fautodistill.svg?)](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fautodistill)\n[![downloads](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fautodistill)](https:\u002F\u002Fpypistats.org\u002Fpackages\u002Fautodistill)\n[![license](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fl\u002Fautodistill?)](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill\u002Fblob\u002Fmain\u002FLICENSE)\n[![python-version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fautodistill)](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fautodistill)\n[![Colab](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Froboflow-ai\u002Fnotebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002Fhow-to-auto-train-yolov8-model-with-autodistill.ipynb)\n\n\u003C\u002Fdiv>\n\nAutodistill uses big, slower foundation models to train small, faster supervised models. Using `autodistill`, you can go from unlabeled images to inference on a custom model running at the edge with no human intervention in between.\n\n> [!TIP]\n> You can use Autodistill on your own hardware, or use the [Roboflow hosted version of Autodistill](https:\u002F\u002Fblog.roboflow.com\u002Flaunch-auto-label\u002F) to label images in the cloud.\n\n\u003Cdiv align=\"center\">\n  \u003Cp>\n    \u003Ca align=\"center\" href=\"\" target=\"_blank\">\n      \u003Cimg\n        width=\"850\"\n        src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_15a80fae0ca4.jpg\"\n      >\n    \u003C\u002Fa>\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n\nCurrently, `autodistill` supports vision tasks like object detection and instance segmentation, but in the future it can be expanded to support language (and other) models.\n\n## 🔗 Quicklinks\n\n| [Tutorial](https:\u002F\u002Fblog.roboflow.com\u002Fautodistill) | [Docs](https:\u002F\u002Fdocs.autodistill.com) | [Supported Models](#-available-models) | [Contribute](CONTRIBUTING.md) |\n| :-----------------------------------------------: | :----------------------------------: | :------------------------------------: | :---------------------------: |\n\n## 👀 Example Output\n\nHere are example predictions of a Target Model detecting milk bottles and bottlecaps after being trained on an auto-labeled dataset using Autodistill (see [the Autodistill YouTube video](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=gKTYMfwPo4M) for a full walkthrough):\n\n\u003Cdiv align=\"center\">\n  \u003Cp>\n    \u003Ca align=\"center\" href=\"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=gKTYMfwPo4M\" target=\"_blank\">\n      \u003Cimg\n        width=\"850\"\n        src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_45dcf6c3212c.gif\"\n      >\n    \u003C\u002Fa>\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n\n## 🚀 Features\n\n- 🔌 Pluggable interface to connect models together\n- 🤖 Automatically label datasets\n- 🐰 Train fast supervised models\n- 🔒 Own your model\n- 🚀 Deploy distilled models to the cloud or the edge\n\n## 📚 Basic Concepts\n\nTo use `autodistill`, you input unlabeled data into a Base Model which uses an Ontology to label a Dataset that is used to train a Target Model which outputs a Distilled Model fine-tuned to perform a specific Task.\n\n\u003Cdiv align=\"center\">\n  \u003Cp>\n    \u003Ca align=\"center\" href=\"\" target=\"_blank\">\n      \u003Cimg\n        width=\"850\"\n        src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_c852768fe26f.jpg\"\n      >\n    \u003C\u002Fa>\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n\nAutodistill defines several basic primitives:\n\n- **Task** - A Task defines what a Target Model will predict. The Task for each component (Base Model, Ontology, and Target Model) of an `autodistill` pipeline must match for them to be compatible with each other. Object Detection and Instance Segmentation are currently supported through the `detection` task. `classification` support will be added soon.\n- **Base Model** - A Base Model is a large foundation model that knows a lot about a lot. Base models are often multimodal and can perform many tasks. They're large, slow, and expensive. Examples of Base Models are GroundedSAM and GPT-4's upcoming multimodal variant. We use a Base Model (along with unlabeled input data and an Ontology) to create a Dataset.\n- **Ontology** - an Ontology defines how your Base Model is prompted, what your Dataset will describe, and what your Target Model will predict. A simple Ontology is the `CaptionOntology` which prompts a Base Model with text captions and maps them to class names. Other Ontologies may, for instance, use a CLIP vector or example images instead of a text caption.\n- **Dataset** - a Dataset is a set of auto-labeled data that can be used to train a Target Model. It is the output generated by a Base Model.\n- **Target Model** - a Target Model is a supervised model that consumes a Dataset and outputs a distilled model that is ready for deployment. Target Models are usually small, fast, and fine-tuned to perform a specific task very well (but they don't generalize well beyond the information described in their Dataset). Examples of Target Models are YOLOv8 and DETR.\n- **Distilled Model** - a Distilled Model is the final output of the `autodistill` process; it's a set of weights fine-tuned for your task that can be deployed to get predictions.\n\n## 💡 Theory and Limitations\n\nHuman labeling is one of the biggest barriers to broad adoption of computer vision. It can take thousands of hours to craft a dataset suitable for training a production model. The process of distillation for training supervised models is not new, in fact, traditional human labeling is just another form of distillation from an extremely capable Base Model (the human brain 🧠).\n\nFoundation models know a lot about a lot, but for production we need models that know a lot about a little.\n\nAs foundation models get better and better they will increasingly be able to augment or replace humans in the labeling process. We need tools for steering, utilizing, and comparing these models. Additionally, these foundation models are big, expensive, and often gated behind private APIs. For many production use-cases, we need models that can run cheaply and in realtime at the edge.\n\n\u003Cdiv align=\"center\">\n  \u003Cp>\n    \u003Ca align=\"center\" href=\"\" target=\"_blank\">\n      \u003Cimg\n        width=\"850\"\n        src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_b32c3d49adc8.jpg\"\n      >\n    \u003C\u002Fa>\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n\nAutodistill's Base Models can already create datasets for many common use-cases (and through creative prompting and few-shotting we can expand their utility to many more), but they're not perfect yet. There's still a lot of work to do; this is just the beginning and we'd love your help testing and expanding the capabilities of the system!\n\n## 💿 Installation\n\nAutodistill is modular. You'll need to install the `autodistill` package (which defines the interfaces for the above concepts) along with [Base Model and Target Model plugins](#-available-models) (which implement specific models).\n\nBy packaging these separately as plugins, dependency and licensing incompatibilities are minimized and new models can be implemented and maintained by anyone.\n\nExample:\n\n```bash\npip install autodistill autodistill-grounded-sam autodistill-yolov8\n```\n\n\u003Cdetails close>\n\u003Csummary>Install from source\u003C\u002Fsummary>\n\nYou can also clone the project from GitHub for local development:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Froboflow\u002Fautodistill\ncd autodistill\npip install -e .\n```\n\n\u003C\u002Fdetails>\n\nAdditional Base and Target models are [enumerated below](#-available-models).\n\n## 🚀 Quickstart\n\nSee the [demo Notebook](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Froboflow-ai\u002Fnotebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002Fhow-to-auto-train-yolov8-model-with-autodistill.ipynb) for a quick introduction to `autodistill`. This notebook walks through building a milk container detection model with no labeling.\n\nBelow, we have condensed key parts of the notebook for a quick introduction to `autodistill`.\n\nYou can also run Autodistill in one command. First, install `autodistill`:\n\n```bash\npip install autodistill\n```\n\nThen, run:\n\n```bash\nautodistill images --base=\"grounding_dino\" --target=\"yolov8\" --ontology '{\"prompt\": \"label\"}' --output=\".\u002Fdataset\"\n```\n\nThis command will label all images in a directory called `images` with Grounding DINO and use the labeled images to train a YOLOv8 model. Grounding DINO will label all images with the \"prompt\" and save the label as the \"label\". You can specify as many prompts and labels as you want. The resulting dataset will be saved in a folder called `dataset`.\n\n### Install Packages\n\nFor this example, we'll show how to distill [GroundedSAM](https:\u002F\u002Fgithub.com\u002FIDEA-Research\u002FGrounded-Segment-Anything) into a small [YOLOv8](https:\u002F\u002Fgithub.com\u002Fultralytics\u002Fultralytics) model using [autodistill-grounded-sam](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-grounded-sam) and [autodistill-yolov8](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-yolov8).\n\n```\npip install autodistill autodistill-grounded-sam autodistill-yolov8\n```\n\n### Distill a Model\n\n```python\nfrom autodistill_grounded_sam import GroundedSAM\nfrom autodistill.detection import CaptionOntology\nfrom autodistill_yolov8 import YOLOv8\n\n# define an ontology to map class names to our GroundingDINO prompt\n# the ontology dictionary has the format {caption: class}\n# where caption is the prompt sent to the base model, and class is the label that will\n# be saved for that caption in the generated annotations\nbase_model = GroundedSAM(ontology=CaptionOntology({\"shipping container\": \"container\"}))\n\n# label all images in a folder called `context_images`\nbase_model.label(\n  input_folder=\".\u002Fimages\",\n  output_folder=\".\u002Fdataset\"\n)\n\ntarget_model = YOLOv8(\"yolov8n.pt\")\ntarget_model.train(\".\u002Fdataset\u002Fdata.yaml\", epochs=200)\n\n# run inference on the new model\npred = target_model.predict(\".\u002Fdataset\u002Fvalid\u002Fyour-image.jpg\", confidence=0.5)\nprint(pred)\n\n# optional: upload your model to Roboflow for deployment\nfrom roboflow import Roboflow\n\nrf = Roboflow(api_key=\"API_KEY\")\nproject = rf.workspace().project(\"PROJECT_ID\")\nproject.version(DATASET_VERSION).deploy(model_type=\"yolov8\", model_path=f\".\u002Fruns\u002Fdetect\u002Ftrain\u002F\")\n```\n\n\u003Cdetails close>\n\u003Csummary>Visualize Predictions\u003C\u002Fsummary>\n\nTo plot the annotations for a single image using `autodistill`, you can use the code below. This code is helpful to visualize the annotations generated by your base model (i.e. GroundedSAM) and the results from your target model (i.e. YOLOv8).\n\n```python\nimport supervision as sv\nimport cv2\n\nimg_path = \".\u002Fimages\u002Fyour-image.jpeg\"\n\nimage = cv2.imread(img_path)\n\ndetections = base_model.predict(img_path)\n# annotate image with detections\nbox_annotator = sv.BoxAnnotator()\nlabel_annotator = sv.LabelAnnotator()\n\nlabels = [\n    f\"{base_model.ontology.classes()[class_id]} {confidence:0.2f}\"\n    for _, _, confidence, class_id, _, _ in detections\n]\n\nannotated_frame = box_annotator.annotate(\n    scene=image.copy(), detections=detections\n)\nannotated_frame = label_annotator.annotate(\n    scene=annotated_frame, detections=detections, labels=labels\n)\n\nsv.plot_image(annotated_frame, (16, 16))\n```\n\n\u003C\u002Fdetails>\n\n## 📍 Available Models\n\nOur goal is for `autodistill` to support using all foundation models as Base Models and most SOTA supervised models as Target Models. We focused on object detection and segmentation\ntasks first but plan to launch classification support soon! In the future, we hope `autodistill` will also be used for models beyond computer vision.\n\n- ✅ - complete (click row\u002Fcolumn header to go to repo)\n- 🚧 - work in progress\n\n### object detection\n\n|                                                   base \u002F target                                                    | [YOLOv8](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-yolov8) | [YOLO-NAS](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-yolonas) | [YOLOv5](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-yolov5) | [DETR](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-detr) | YOLOv6 | YOLOv7 | MT-YOLOv6 |\n| :----------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------: | :------------------------------------------------------------: | :---------------------------------------------------------: | :-----------------------------------------------------: | :----: | :----: | :-------: |\n|                    [Grounded SAM 2](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-grounded-sam-2)                     |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                             [DETIC](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-detic)                              |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                       [GroundedSAM](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-grounded-sam)                       |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                     [GroundingDINO](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-grounding-dino)                     |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                           [OWL-ViT](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-owl-vit)                            |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                          [SAM-CLIP](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-sam-clip)                           |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                           [LLaVA-1.5](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-llava)                            |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                          [Kosmos-2](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-kosmos-2)                           |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                             [OWLv2](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-owlv2)                              |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n| [Roboflow Universe Models (50k+ pre-trained models)](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-roboflow-universe) |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                             [CoDet](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-codet)                              |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                   [Azure Custom Vision](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-azure-vision)                   |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                     [AWS Rekognition](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-rekognition)                      |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                       [Google Vision](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-gcp-vision)                       |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n\n### instance segmentation\n\n|                             base \u002F target                              | [YOLOv8](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-yolov8) | [YOLO-NAS](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-yolonas) | [YOLOv5](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-yolov5) | YOLOv7 | Segformer |\n| :--------------------------------------------------------------------: | :---------------------------------------------------------: | :------------------------------------------------------------: | :---------------------------------------------------------: | :----: | :-------: |\n| [GroundedSAM](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-grounded-sam) |                             ✅                              |                               🚧                               |                             🚧                              |        |           |\n|                                SAM-CLIP                                |                             ✅                              |                               🚧                               |                             🚧                              |        |           |\n|                                 SegGPT                                 |                             ✅                              |                               🚧                               |                             🚧                              |        |           |\n|                                FastSAM                                 |                             🚧                              |                               🚧                               |                             🚧                              |        |           |\n\n### classification\n\n|                                 base \u002F target                                  | [ViT](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-vit) | [YOLOv8](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-yolov8) | [YOLOv5](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-yolov5) |\n| :----------------------------------------------------------------------------: | :---------------------------------------------------: | :---------------------------------------------------------: | :---------------------------------------------------------: |\n|            [CLIP](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-clip)             |                          ✅                           |                             ✅                              |                             🚧                              |\n|        [MetaCLIP](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-metaclip)         |                          ✅                           |                             ✅                              |                             🚧                              |\n|          [DINOv2](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-dinov2)           |                          ✅                           |                             ✅                              |                             🚧                              |\n|            [BLIP](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-blip)             |                          ✅                           |                             ✅                              |                             🚧                              |\n|           [ALBEF](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-albef)            |                          ✅                           |                             ✅                              |                             🚧                              |\n|         [FastViT](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-fastvit)          |                          ✅                           |                             ✅                              |                             🚧                              |\n|          [AltCLIP](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-altcip)          |                          ✅                           |                             ✅                              |                             🚧                              |\n|          [EvaCLIP](https:\u002F\u002Fgithub.com\u002Flab176344\u002Fautodistill-evaclip)           |                          ✅                           |                             ✅                              |                             🚧                              |\n| [Gemini](https:\u002F\u002Fgithub.com\u002Fhttps:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-gemini) |                          ✅                           |                             ✅                              |                             🚧                              |\n|                                      Fuyu                                      |                          🚧                           |                             🚧                              |                             🚧                              |\n|                                 Open Flamingo                                  |                          🚧                           |                             🚧                              |                             🚧                              |\n|                                     GPT-4                                      |                                                       |                                                             |                                                             |\n|                                     PaLM-2                                     |                                                       |                                                             |                                                             |\n\n## Roboflow Model Deployment Support\n\nYou can optionally deploy some Target Models trained using Autodistill on Roboflow. Deploying on Roboflow allows you to use a range of concise SDKs for using your model on the edge, from [roboflow.js](https:\u002F\u002Fdocs.roboflow.com\u002Finference\u002Fweb-browser) for web deployment to [NVIDIA Jetson](https:\u002F\u002Fdocs.roboflow.com\u002Finference\u002Fnvidia-jetson) devices.\n\nThe following Autodistill Target Models are supported by Roboflow for deployment:\n\n|          model name          | Supported? |\n| :--------------------------: | :--------: |\n|   YOLOv8 Object Detection    |     ✅     |\n| YOLOv8 Instance Segmentation |     ✅     |\n|   YOLOv5 Object Detection    |     ✅     |\n| YOLOv5 Instance Segmentation |     ✅     |\n|    YOLOv8 Classification     |            |\n\n## 🎬 Video Guides\n\n\u003Cp align=\"left\">\n\u003Ca href=\"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=gKTYMfwPo4M\" title=\"Autodistill: Train YOLOv8 with ZERO Annotations\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_fffa71b9a890.jpg\" alt=\"Autodistill: Train YOLOv8 with ZERO Annotations\" width=\"300px\" align=\"left\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fyoutu.be\u002FoEQYStnF2l8\">\u003Cstrong>Autodistill: Train YOLOv8 with ZERO Annotations\u003C\u002Fstrong>\u003C\u002Fa>\n\u003Cdiv>\u003Cstrong>Published: 8 June 2023\u003C\u002Fstrong>\u003C\u002Fdiv>\n\u003Cbr\u002F>In this video, we will show you how to use a new library to train a YOLOv8 model to detect bottles moving on a conveyor line. Yes, that's right - zero annotation hours are required! We dive deep into Autodistill's functionality, covering topics from setting up your Python environment and preparing your images, to the thrilling automatic annotation of images. \u003C\u002Fp>\n\n## 💡 Community Resources\n\n- [Distill Large Vision Models into Smaller, Efficient Models with Autodistill](https:\u002F\u002Fblog.roboflow.com\u002Fautodistill\u002F): Announcement post with written guide on how to use Autodistill\n- [Comparing AI-Labeled Data to Human-Labeled Data](https:\u002F\u002Fblog.roboflow.com\u002Fai-vs-human-labeled-data\u002F): A qualitative evaluation of Grounding DINO used with Autodistill across various tasks and domains.\n- [How to Evaluate Autodistill Prompts with CVevals](https:\u002F\u002Fblog.roboflow.com\u002Fautodistill-prompt-evaluation\u002F): Evaluate Autodistill prompts.\n- [Autodistill: Label and Train a Computer Vision Model in Under 20 Minutes](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=M_QZ_Q0zT0k): Building a model to detect planes in under 20 minutes.\n- [Comparing AI-Labeled Data to Human-Labeled Data](https:\u002F\u002Fblog.roboflow.com\u002Fai-vs-human-labeled-data\u002F): Explore the strengths and limitations of a base model used with Autoditsill.\n- [Train an Image Classification Model with No Labeling](https:\u002F\u002Fblog.roboflow.com\u002Ftrain-classification-model-no-labeling\u002F): Use Grounded SAM to automatically label images for training an Ultralytics YOLOv8 classification model.\n- [Train a Segmentation Model with No Labeling](https:\u002F\u002Fblog.roboflow.com\u002Ftrain-a-segmentation-model-no-labeling\u002F): Use CLIP to automatically label images for training an Ultralytics YOLOv8 segmentation model.\n- File a PR to add your own resources here!\n\n## 🗺️ Roadmap\n\nApart from adding new models, there are several areas we plan to explore with `autodistill` including:\n\n- 💡 Ontology creation & prompt engineering\n- 👩‍💻 Human in the loop support\n- 🤔 Model evaluation\n- 🔄 Active learning\n- 💬 Language tasks\n\n## 🏆 Contributing\n\nWe love your input! Please see our [contributing guide](CONTRIBUTING.md) to get started. Thank you 🙏 to all our contributors!\n\n## 👩‍⚖️ License\n\nThe `autodistill` package is licensed under an [Apache 2.0](LICENSE). Each Base or Target model plugin may use its own license corresponding with the license of its underlying model. Please refer to the license in each plugin repo for more information.\n\n## Frequently Asked Questions ❓\n\n### What causes the `PytorchStreamReader failed reading zip archive: failed finding central directory` error?\n\nThis error is caused when PyTorch cannot load the model weights for a model. Go into the `~\u002F.cache\u002Fautodistill` directory and delete the folder associated with the model you are trying to load. Then, run your code again. The model weights will be downloaded from scratch. Leave the installation process uninterrupted.\n\n## 💻 explore more Roboflow open source projects\n\n| Project                                                                  | Description                                                                                                                                            |\n| :----------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [supervision](https:\u002F\u002Froboflow.com\u002Fsupervision)                          | General-purpose utilities for use in computer vision projects, from predictions filtering and display to object tracking to model evaluation.          |\n| [Autodistill](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill) (this project) | Automatically label images for use in training computer vision models.                                                                                 |\n| [Inference](https:\u002F\u002Fgithub.com\u002Froboflow\u002Finference)                       | An easy-to-use, production-ready inference server for computer vision supporting deployment of many popular model architectures and fine-tuned models. |\n| [Notebooks](https:\u002F\u002Froboflow.com\u002Fnotebooks)                              | Tutorials for computer vision tasks, from training state-of-the-art models to tracking objects to counting objects in a zone.                          |\n| [Collect](https:\u002F\u002Fgithub.com\u002Froboflow\u002Froboflow-collect)                  | Automated, intelligent data collection powered by CLIP.                                                                                                |\n\n\u003Cbr>\n\n\u003Cdiv align=\"center\">\n\n  \u003Cdiv align=\"center\">\n      \u003Ca href=\"https:\u002F\u002Fyoutube.com\u002Froboflow\">\n          \u003Cimg\n            src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_4a6072846419.png\"\n            width=\"3%\"\n          \u002F>\n      \u003C\u002Fa>\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_896994f79d98.png\" width=\"3%\"\u002F>\n      \u003Ca href=\"https:\u002F\u002Froboflow.com\">\n          \u003Cimg\n            src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_4609eef41cf4.png\"\n            width=\"3%\"\n          \u002F>\n      \u003C\u002Fa>\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_896994f79d98.png\" width=\"3%\"\u002F>\n      \u003Ca href=\"https:\u002F\u002Fwww.linkedin.com\u002Fcompany\u002Froboflow-ai\u002F\">\n          \u003Cimg\n            src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_c2b5b316fb59.png\"\n            width=\"3%\"\n          \u002F>\n      \u003C\u002Fa>\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_896994f79d98.png\" width=\"3%\"\u002F>\n      \u003Ca href=\"https:\u002F\u002Fdocs.roboflow.com\">\n          \u003Cimg\n            src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_b11ef9eeaca7.png\"\n            width=\"3%\"\n          \u002F>\n      \u003C\u002Fa>\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_896994f79d98.png\" width=\"3%\"\u002F>\n      \u003Ca href=\"https:\u002F\u002Fdisuss.roboflow.com\">\n          \u003Cimg\n            src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_171d8d7d7d7b.png\"\n            width=\"3%\"\n          \u002F>\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_896994f79d98.png\" width=\"3%\"\u002F>\n      \u003Ca href=\"https:\u002F\u002Fblog.roboflow.com\">\n          \u003Cimg\n            src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_aace967bbd3c.png\"\n            width=\"3%\"\n          \u002F>\n      \u003C\u002Fa>\n      \u003C\u002Fa>\n  \u003C\u002Fdiv>\n\n\u003C\u002Fdiv>\n","\u003Cdiv align=\"center\">\n  \u003Cp>\n    \u003Ca align=\"center\" href=\"\" target=\"_blank\">\n      \u003Cimg\n        width=\"850\"\n        src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_7b39c41c5701.jpg\"\n      >\n    \u003C\u002Fa>\n  \u003C\u002Fp>\n  \n[笔记本](https:\u002F\u002Fgithub.com\u002Froboflow\u002Fnotebooks) | [推理](https:\u002F\u002Fgithub.com\u002Froboflow\u002Finference) | [自动蒸馏](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill) | [采集](https:\u002F\u002Fgithub.com\u002Froboflow\u002Froboflow-collect)\n\n[![版本](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fautodistill.svg?)](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fautodistill)\n[![下载量](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fautodistill)](https:\u002F\u002Fpypistats.org\u002Fpackages\u002Fautodistill)\n[![许可证](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fl\u002Fautodistill?)](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill\u002Fblob\u002Fmain\u002FLICENSE)\n[![Python版本](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fautodistill)](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fautodistill)\n[![Colab](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Froboflow-ai\u002Fnotebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002Fhow-to-auto-train-yolov8-model-with-autodistill.ipynb)\n\n\u003C\u002Fdiv>\n\nAutodistill 利用体积大、速度慢的基础模型来训练体积小、速度快的监督模型。借助 `autodistill`，您可以从无标签图像开始，最终在边缘端运行自定义模型进行推理，整个过程无需人工干预。\n\n> [!提示]\n> 您可以在自己的硬件上使用 Autodistill，也可以使用 [Roboflow 托管版 Autodistill](https:\u002F\u002Fblog.roboflow.com\u002Flaunch-auto-label\u002F) 在云端为图像打标签。\n\n\u003Cdiv align=\"center\">\n  \u003Cp>\n    \u003Ca align=\"center\" href=\"\" target=\"_blank\">\n      \u003Cimg\n        width=\"850\"\n        src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_15a80fae0ca4.jpg\"\n      >\n    \u003C\u002Fa>\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n\n目前，`autodistill` 支持目标检测和实例分割等视觉任务，但未来有望扩展到语言及其他类型模型的支持。\n\n## 🔗 快速链接\n\n| [教程](https:\u002F\u002Fblog.roboflow.com\u002Fautodistill) | [文档](https:\u002F\u002Fdocs.autodistill.com) | [支持的模型](#-available-models) | [贡献](CONTRIBUTING.md) |\n| :-----------------------------------------------: | :----------------------------------: | :------------------------------------: | :---------------------------: |\n\n## 👀 示例输出\n\n以下是目标模型在使用 Autodistill 自动标注的数据集训练后，对牛奶瓶和瓶盖进行检测的预测示例（完整流程请观看 [Autodistill YouTube 视频](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=gKTYMfwPo4M)）：\n\n\u003Cdiv align=\"center\">\n  \u003Cp>\n    \u003Ca align=\"center\" href=\"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=gKTYMfwPo4M\" target=\"_blank\">\n      \u003Cimg\n        width=\"850\"\n        src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_45dcf6c3212c.gif\"\n      >\n    \u003C\u002Fa>\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n\n## 🚀 功能\n\n- 🔌 可插拔接口，用于连接不同模型\n- 🤖 自动标注数据集\n- 🐰 训练快速的监督模型\n- 🔒 拥有您自己的模型\n- 🚀 将蒸馏后的模型部署到云端或边缘端\n\n## 📚 基本概念\n\n要使用 `autodistill`，您需要将未标注的数据输入到基础模型中，该模型会利用本体论为数据集打上标签，然后用这些标签来训练目标模型，最终生成一个针对特定任务优化的蒸馏模型。\n\n\u003Cdiv align=\"center\">\n  \u003Cp>\n    \u003Ca align=\"center\" href=\"\" target=\"_blank\">\n      \u003Cimg\n        width=\"850\"\n        src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_c852768fe26f.jpg\"\n      >\n    \u003C\u002Fa>\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n\nAutodistill 定义了几个基本概念：\n\n- **任务** - 任务定义了目标模型将预测的内容。`autodistill` 流程中各个组件（基础模型、本体论和目标模型）的任务必须匹配，才能相互兼容。目前通过 `detection` 任务支持目标检测和实例分割，`classification` 支持也将很快加入。\n- **基础模型** - 基础模型是一种大型的基础模型，对多种领域都有广泛的了解。它们通常是多模态的，能够执行多种任务。这类模型体积大、速度慢且成本高昂。例如 GroundedSAM 和即将推出的 GPT-4 多模态版本。我们使用基础模型（结合未标注的输入数据和本体论）来创建数据集。\n- **本体论** - 本体论定义了如何向您的基础模型提供提示、数据集将描述什么内容以及目标模型将预测什么。一个简单的本体论是 `CaptionOntology`，它通过文本描述来提示基础模型，并将其映射到类别名称。其他本体论可能会使用 CLIP 向量或示例图像，而不是文本描述。\n- **数据集** - 数据集是一组自动标注的数据，可用于训练目标模型。它是基础模型生成的输出。\n- **目标模型** - 目标模型是一种监督模型，它接收数据集并输出一个可直接部署的蒸馏模型。目标模型通常体积小、速度快，并针对特定任务进行了精细调优（但其泛化能力有限，主要依赖于数据集中的信息）。例如 YOLOv8 和 DETR。\n- **蒸馏模型** - 蒸馏模型是 `autodistill` 流程的最终输出；它是一组针对您的任务进行微调的权重，可以直接部署以获取预测结果。\n\n## 💡 理论与局限性\n\n人工标注是计算机视觉广泛应用的最大障碍之一。为了构建适合生产级模型训练的数据集，往往需要耗费数千小时。然而，用于训练监督模型的蒸馏过程并非新事物——事实上，传统的人工标注不过是另一种形式的蒸馏，只不过其基础模型是极其强大的人类大脑 🧠。\n\n基础模型对许多领域都有广泛的知识，但在生产环境中，我们更需要那些对某一领域非常精通的模型。\n\n随着基础模型性能的不断提升，它们将越来越有能力辅助甚至取代人工完成标注工作。因此，我们需要工具来引导、利用和比较这些模型。此外，这些基础模型体积庞大、成本高昂，且常常被私有 API 所限制。对于许多生产场景而言，我们还需要能够在边缘端低成本、实时运行的模型。\n\n\u003Cdiv align=\"center\">\n  \u003Cp>\n    \u003Ca align=\"center\" href=\"\" target=\"_blank\">\n      \u003Cimg\n        width=\"850\"\n        src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_b32c3d49adc8.jpg\"\n      >\n    \u003C\u002Fa>\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n\nAutodistill 的基础模型已经可以为许多常见场景创建数据集（通过创造性地提示和少量样本学习，我们还可以进一步扩展其用途），但它们目前仍不完美。我们还有大量工作要做；这仅仅是一个开始，我们非常期待您的帮助，共同测试并扩展系统的功能！\n\n## 💿 安装\n\nAutodistill 是模块化的。你需要安装 `autodistill` 包（它定义了上述概念的接口），以及 [基础模型和目标模型插件](#-available-models)（它们实现了具体的模型）。\n\n通过将这些组件分别打包为插件，可以最大限度地减少依赖和许可方面的不兼容性，并且任何人都可以实现和维护新的模型。\n\n示例：\n\n```bash\npip install autodistill autodistill-grounded-sam autodistill-yolov8\n```\n\n\u003Cdetails close>\n\u003Csummary>从源码安装\u003C\u002Fsummary>\n\n你也可以从 GitHub 克隆项目进行本地开发：\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Froboflow\u002Fautodistill\ncd autodistill\npip install -e .\n```\n\n\u003C\u002Fdetails>\n\n更多基础模型和目标模型已在[下方列出](#-available-models)。\n\n## 🚀 快速入门\n\n请参阅[演示 Notebook](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Froboflow-ai\u002Fnotebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002Fhow-to-auto-train-yolov8-model-with-autodistill.ipynb)，以快速了解 `autodistill`。该 Notebook 演示了如何在无需标注的情况下构建牛奶容器检测模型。\n\n下面，我们浓缩了 Notebook 中的关键部分，以便快速介绍 `autodistill`。\n\n你也可以通过一条命令运行 Autodistill。首先，安装 `autodistill`：\n\n```bash\npip install autodistill\n```\n\n然后，运行：\n\n```bash\nautodistill images --base=\"grounding_dino\" --target=\"yolov8\" --ontology '{\"prompt\": \"label\"}' --output=\".\u002Fdataset\"\n```\n\n此命令会使用 Grounding DINO 为名为 `images` 的目录中的所有图像添加标签，并利用这些标注图像训练一个 YOLOv8 模型。Grounding DINO 将使用“prompt”为所有图像打上标签，并将该标签保存为“label”。你可以指定任意数量的 prompt 和 label。最终生成的数据集将保存在名为 `dataset` 的文件夹中。\n\n### 安装包\n\n在本示例中，我们将展示如何使用 [autodistill-grounded-sam](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-grounded-sam) 和 [autodistill-yolov8](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-yolov8)，将 [GroundedSAM](https:\u002F\u002Fgithub.com\u002FIDEA-Research\u002FGrounded-Segment-Anything) 知识蒸馏到一个小型 [YOLOv8](https:\u002F\u002Fgithub.com\u002Fultralytics\u002Fultralytics) 模型中。\n\n```\npip install autodistill autodistill-grounded-sam autodistill-yolov8\n```\n\n### 蒸馏模型\n\n```python\nfrom autodistill_grounded_sam import GroundedSAM\nfrom autodistill.detection import CaptionOntology\nfrom autodistill_yolov8 import YOLOv8\n\n# 定义一个本体，用于将类别名称映射到我们的 GroundingDINO 提示词\n# 本体字典的格式为 {caption: class}\n# 其中 caption 是发送给基础模型的提示词，class 则是将在生成的标注中为该 caption 保存的标签\nbase_model = GroundedSAM(ontology=CaptionOntology({\"shipping container\": \"container\"}))\n\n# 为名为 `context_images` 的文件夹中的所有图像添加标签\nbase_model.label(\n  input_folder=\".\u002Fimages\",\n  output_folder=\".\u002Fdataset\"\n)\n\ntarget_model = YOLOv8(\"yolov8n.pt\")\ntarget_model.train(\".\u002Fdataset\u002Fdata.yaml\", epochs=200)\n\n# 对新模型进行推理\npred = target_model.predict(\".\u002Fdataset\u002Fvalid\u002Fyour-image.jpg\", confidence=0.5)\nprint(pred)\n\n# 可选：将你的模型上传到 Roboflow 进行部署\nfrom roboflow import Roboflow\n\nrf = Roboflow(api_key=\"API_KEY\")\nproject = rf.workspace().project(\"PROJECT_ID\")\nproject.version(DATASET_VERSION).deploy(model_type=\"yolov8\", model_path=f\".\u002Fruns\u002Fdetect\u002Ftrain\u002F\")\n```\n\n\u003Cdetails close>\n\u003Csummary>可视化预测结果\u003C\u002Fsummary>\n\n要使用 `autodistill` 绘制单张图像的标注，可以使用以下代码。这段代码有助于可视化由基础模型（即 GroundedSAM）生成的标注，以及目标模型（即 YOLOv8）的结果。\n\n```python\nimport supervision as sv\nimport cv2\n\nimg_path = \".\u002Fimages\u002Fyour-image.jpeg\"\n\nimage = cv2.imread(img_path)\n\ndetections = base_model.predict(img_path)\n# 使用检测框标注图像\nbox_annotator = sv.BoxAnnotator()\nlabel_annotator = sv.LabelAnnotator()\n\nlabels = [\n    f\"{base_model.ontology.classes()[class_id]} {confidence:0.2f}\"\n    for _, _, confidence, class_id, _, _ in detections\n]\n\nannotated_frame = box_annotator.annotate(\n    scene=image.copy(), detections=detections\n)\nannotated_frame = label_annotator.annotate(\n    scene=annotated_frame, detections=detections, labels=labels\n)\n\nsv.plot_image(annotated_frame, (16, 16))\n```\n\n\u003C\u002Fdetails>\n\n## 📍 可用模型\n\n我们的目标是让 `autodistill` 支持将所有基础模型用作基础模型，并支持大多数 SOTA 监督学习模型作为目标模型。我们最初专注于目标检测和分割任务，但计划很快推出分类支持！未来，我们希望 `autodistill` 也能应用于计算机视觉以外的其他领域。\n\n- ✅ - 完成（点击行\u002F列标题可跳转至仓库）\n- 🚧 - 正在开发中\n\n### 目标检测\n\n|                                                   基础模型 \u002F 目标模型                                                    | [YOLOv8](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-yolov8) | [YOLO-NAS](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-yolonas) | [YOLOv5](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-yolov5) | [DETR](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-detr) | YOLOv6 | YOLOv7 | MT-YOLOv6 |\n| :----------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------: | :------------------------------------------------------------: | :---------------------------------------------------------: | :-----------------------------------------------------: | :----: | :----: | :-------: |\n|                    [Grounded SAM 2](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-grounded-sam-2)                     |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                             [DETIC](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-detic)                              |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                       [GroundedSAM](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-grounded-sam)                       |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                     [GroundingDINO](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-grounding-dino)                     |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                           [OWL-ViT](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-owl-vit)                            |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                          [SAM-CLIP](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-sam-clip)                           |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                           [LLaVA-1.5](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-llava)                            |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                          [Kosmos-2](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-kosmos-2)                           |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                             [OWLv2](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-owlv2)                              |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n| [Roboflow Universe Models (50k+ 预训练模型)](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-roboflow-universe) |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                             [CoDet](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-codet)                              |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                   [Azure Custom Vision](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-azure-vision)                   |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                     [AWS Rekognition](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-rekognition)                      |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n|                       [Google Vision](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-gcp-vision)                       |                             ✅                              |                               ✅                               |                             ✅                              |                           ✅                            |   🚧   |        |           |\n\n### 实例分割\n\n|                             基础模型 \u002F 目标模型                              | [YOLOv8](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-yolov8) | [YOLO-NAS](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-yolonas) | [YOLOv5](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-yolov5) | YOLOv7 | Segformer |\n| :--------------------------------------------------------------------: | :---------------------------------------------------------: | :------------------------------------------------------------: | :---------------------------------------------------------: | :----: | :-------: |\n| [GroundedSAM](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-grounded-sam) |                             ✅                              |                               🚧                               |                             🚧                              |        |           |\n|                                SAM-CLIP                                |                             ✅                              |                               🚧                               |                             🚧                              |        |           |\n|                                 SegGPT                                 |                             ✅                              |                               🚧                               |                             🚧                              |        |           |\n|                                FastSAM                                 |                             🚧                              |                               🚧                               |                             🚧                              |        |           |\n\n### 分类\n\n|                                 基础模型 \u002F 目标模型                                  | [ViT](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-vit) | [YOLOv8](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-yolov8) | [YOLOv5](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-yolov5) |\n| :----------------------------------------------------------------------------: | :---------------------------------------------------: | :---------------------------------------------------------: | :---------------------------------------------------------: |\n|            [CLIP](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-clip)             |                          ✅                           |                             ✅                              |                             🚧                              |\n|        [MetaCLIP](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-metaclip)         |                          ✅                           |                             ✅                              |                             🚧                              |\n|          [DINOv2](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-dinov2)           |                          ✅                           |                             ✅                              |                             🚧                              |\n|            [BLIP](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-blip)             |                          ✅                           |                             ✅                              |                             🚧                              |\n|           [ALBEF](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-albef)            |                          ✅                           |                             ✅                              |                             🚧                              |\n|         [FastViT](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-fastvit)          |                          ✅                           |                             ✅                              |                             🚧                              |\n|          [AltCLIP](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-altcip)          |                          ✅                           |                             ✅                              |                             🚧                              |\n|          [EvaCLIP](https:\u002F\u002Fgithub.com\u002Flab176344\u002Fautodistill-evaclip)           |                          ✅                           |                             ✅                              |                             🚧                              |\n| [Gemini](https:\u002F\u002Fgithub.com\u002Fhttps:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill-gemini) |                          ✅                           |                             ✅                              |                             🚧                              |\n|                                      Fuyu                                      |                          🚧                           |                             🚧                              |                             🚧                              |\n|                                 Open Flamingo                                  |                          🚧                           |                             🚧                              |                             🚧                              |\n|                                     GPT-4                                      |                                                       |                                                             |                                                             |\n|                                     PaLM-2                                     |                                                       |                                                             |                                                             |\n\n## Roboflow 模型部署支持\n\n您可以选择将使用 Autodistill 训练的一些目标模型部署到 Roboflow 上。在 Roboflow 上部署可以让您使用一系列简洁的 SDK，在边缘设备上运行您的模型，从适用于 Web 部署的 [roboflow.js](https:\u002F\u002Fdocs.roboflow.com\u002Finference\u002Fweb-browser) 到适用于 [NVIDIA Jetson](https:\u002F\u002Fdocs.roboflow.com\u002Finference\u002Fnvidia-jetson) 设备的 SDK。\n\n以下由 Autodistill 训练的目标模型支持在 Roboflow 上部署：\n\n|          模型名称          | 是否支持？ |\n| :--------------------------: | :--------: |\n|   YOLOv8 目标检测    |     ✅     |\n| YOLOv8 实例分割 |     ✅     |\n|   YOLOv5 目标检测    |     ✅     |\n| YOLOv5 实例分割 |     ✅     |\n|    YOLOv8 分类     |            |\n\n## 🎬 视频指南\n\n\u003Cp align=\"left\">\n\u003Ca href=\"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=gKTYMfwPo4M\" title=\"Autodistill：零标注训练YOLOv8\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_fffa71b9a890.jpg\" alt=\"Autodistill：零标注训练YOLOv8\" width=\"300px\" align=\"left\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fyoutu.be\u002FoEQYStnF2l8\">\u003Cstrong>Autodistill：零标注训练YOLOv8\u003C\u002Fstrong>\u003C\u002Fa>\n\u003Cdiv>\u003Cstrong>发布日期：2023年6月8日\u003C\u002Fstrong>\u003C\u002Fdiv>\n\u003Cbr\u002F>在本视频中，我们将向您展示如何使用一个新的库来训练一个YOLOv8模型，以检测传送带上移动的瓶子。是的，没错——完全不需要任何标注时间！我们将深入探讨Autodistill的功能，从设置Python环境、准备图像，到激动人心的自动图像标注过程，逐一讲解。\u003C\u002Fp>\n\n## 💡 社区资源\n\n- [使用Autodistill将大型视觉模型蒸馏为更小、更高效的模型](https:\u002F\u002Fblog.roboflow.com\u002Fautodistill\u002F)：包含如何使用Autodistill的书面指南的公告文章\n- [AI标注数据与人工标注数据的对比](https:\u002F\u002Fblog.roboflow.com\u002Fai-vs-human-labeled-data\u002F)：对结合Autodistill使用的Grounding DINO在不同任务和领域中的定性评估。\n- [如何使用CVevals评估Autodistill提示词](https:\u002F\u002Fblog.roboflow.com\u002Fautodistill-prompt-evaluation\u002F)：评估Autodistill的提示词。\n- [Autodistill：在不到20分钟内标注并训练计算机视觉模型](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=M_QZ_Q0zT0k)：在不到20分钟内构建一个用于检测飞机的模型。\n- [AI标注数据与人工标注数据的对比](https:\u002F\u002Fblog.roboflow.com\u002Fai-vs-human-labeled-data\u002F)：探索与Autodistill配合使用的基础模型的优势与局限性。\n- [无需标注即可训练图像分类模型](https:\u002F\u002Fblog.roboflow.com\u002Ftrain-classification-model-no-labeling\u002F)：使用Grounded SAM自动标注图像，用于训练Ultralytics YOLOv8分类模型。\n- [无需标注即可训练分割模型](https:\u002F\u002Fblog.roboflow.com\u002Ftrain-a-segmentation-model-no-labeling\u002F)：使用CLIP自动标注图像，用于训练Ultralytics YOLOv8分割模型。\n- 欢迎提交PR，在此添加您自己的资源！\n\n## 🗺️ 路线图\n\n除了添加新模型之外，我们还计划通过`autodistill`探索以下几个方向：\n\n- 💡 本体创建与提示工程\n- 👩‍💻 人机协作支持\n- 🤔 模型评估\n- 🔄 主动学习\n- 💬 语言任务\n\n## 🏆 贡献\n\n我们非常欢迎您的参与！请参阅我们的[贡献指南](CONTRIBUTING.md)开始贡献。感谢所有贡献者！🙏\n\n## 👩‍⚖️ 许可证\n\n`autodistill`软件包采用[Apache 2.0许可证](LICENSE)。每个基础或目标模型插件可能使用与其底层模型许可证相对应的自有许可证。更多信息请参阅各插件仓库中的许可证文件。\n\n## 常见问题 ❓\n\n### 导致“PytorchStreamReader读取zip压缩包失败：未能找到中央目录”错误的原因是什么？\n\n该错误是由PyTorch无法加载模型权重引起的。请进入`~\u002F.cache\u002Fautodistill`目录，删除您尝试加载的模型对应的文件夹。然后重新运行代码，模型权重将会从头开始下载。请确保安装过程不被中断。\n\n## 💻 探索更多 Roboflow 开源项目\n\n| 项目                                                                  | 描述                                                                                                                                            |\n| :----------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [supervision](https:\u002F\u002Froboflow.com\u002Fsupervision)                          | 用于计算机视觉项目的通用工具，涵盖预测过滤与展示、目标跟踪以及模型评估等功能。          |\n| [Autodistill](https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill) (本项目)       | 自动为图像打标签，以便用于训练计算机视觉模型。                                                                                 |\n| [Inference](https:\u002F\u002Fgithub.com\u002Froboflow\u002Finference)                       | 一款易于使用、可直接投入生产的计算机视觉推理服务器，支持部署多种主流模型架构及微调后的模型。 |\n| [Notebooks](https:\u002F\u002Froboflow.com\u002Fnotebooks)                              | 计算机视觉任务教程，从训练最先进模型到目标跟踪，再到统计区域内物体数量，应有尽有。                          |\n| [Collect](https:\u002F\u002Fgithub.com\u002Froboflow\u002Froboflow-collect)                  | 基于 CLIP 技术的自动化、智能化数据采集工具。                                                                                                |\n\n\u003Cbr>\n\n\u003Cdiv align=\"center\">\n\n  \u003Cdiv align=\"center\">\n      \u003Ca href=\"https:\u002F\u002Fyoutube.com\u002Froboflow\">\n          \u003Cimg\n            src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_4a6072846419.png\"\n            width=\"3%\"\n          \u002F>\n      \u003C\u002Fa>\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_896994f79d98.png\" width=\"3%\"\u002F>\n      \u003Ca href=\"https:\u002F\u002Froboflow.com\">\n          \u003Cimg\n            src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_4609eef41cf4.png\"\n            width=\"3%\"\n          \u002F>\n      \u003C\u002Fa>\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_896994f79d98.png\" width=\"3%\"\u002F>\n      \u003Ca href=\"https:\u002F\u002Fwww.linkedin.com\u002Fcompany\u002Froboflow-ai\u002F\">\n          \u003Cimg\n            src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_c2b5b316fb59.png\"\n            width=\"3%\"\n          \u002F>\n      \u003C\u002Fa>\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_896994f79d98.png\" width=\"3%\"\u002F>\n      \u003Ca href=\"https:\u002F\u002Fdocs.roboflow.com\">\n          \u003Cimg\n            src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_b11ef9eeaca7.png\"\n            width=\"3%\"\n          \u002F>\n      \u003C\u002Fa>\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_896994f79d98.png\" width=\"3%\"\u002F>\n      \u003Ca href=\"https:\u002F\u002Fdisuss.roboflow.com\">\n          \u003Cimg\n            src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_171d8d7d7d7b.png\"\n            width=\"3%\"\n          \u002F>\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_896994f79d98.png\" width=\"3%\"\u002F>\n      \u003Ca href=\"https:\u002F\u002Fblog.roboflow.com\">\n          \u003Cimg\n            src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_readme_aace967bbd3c.png\"\n            width=\"3%\"\n          \u002F>\n      \u003C\u002Fa>\n      \u003C\u002Fa>\n  \u003C\u002Fdiv>\n\n\u003C\u002Fdiv>","# AutoDistill 快速上手指南\n\nAutoDistill 是一个利用大型基础模型（Foundation Models）自动标注数据，并训练小型、快速监督模型的开源工具。它能让开发者从零标记的图像直接过渡到可在边缘设备运行的高性能自定义模型，全程无需人工干预。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux, macOS 或 Windows (推荐 Linux 以获得最佳兼容性)\n*   **Python 版本**: Python 3.8 - 3.11\n*   **硬件建议**:\n    *   **基础模型推理**: 需要 GPU (推荐 NVIDIA GPU，显存 8GB+) 以加速 Grounding DINO 或 GroundedSAM 等模型的运行。\n    *   **目标模型训练**: 需要 GPU 进行 YOLOv8 等模型的微调。\n*   **前置依赖**: 确保已安装 `pip` 和 `git`。\n\n> **提示**: 由于基础模型权重较大，首次运行时会自动下载模型文件，请确保网络连接通畅。国内用户若遇到下载缓慢问题，可尝试配置科学网络环境或使用支持断点续传的工具。\n\n## 安装步骤\n\nAutoDistill 采用模块化设计，您需要安装核心包以及具体的“基础模型”和“目标模型”插件。\n\n### 1. 安装核心包与插件\n\n以下示例展示如何安装核心库，以及常用的 **GroundedSAM** (作为基础模型) 和 **YOLOv8** (作为目标模型) 插件：\n\n```bash\npip install autodistill autodistill-grounded-sam autodistill-yolov8\n```\n\n> **注意**: 如果您只需要使用命令行工具进行快速测试，可以先仅安装核心包：\n> ```bash\n> pip install autodistill\n> ```\n> 具体任务所需的模型插件会在运行时根据需求安装或需单独指定。\n\n### 2. 从源码安装 (可选)\n\n如果您希望参与开发或使用最新特性，可以从 GitHub 克隆项目：\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Froboflow\u002Fautodistill\ncd autodistill\npip install -e .\n```\n\n## 基本使用\n\nAutoDistill 提供了两种主要使用方式：命令行一键运行和 Python 代码定制流程。\n\n### 方式一：命令行快速启动 (One-Command)\n\n这是最简单的使用方式，适合快速验证。该命令将使用 `Grounding DINO` 对指定文件夹内的图片进行自动标注，并使用标注数据训练一个 `YOLOv8` 模型。\n\n假设您有一个名为 `images` 的文件夹存放未标记图片：\n\n```bash\nautodistill images --base=\"grounding_dino\" --target=\"yolov8\" --ontology '{\"prompt\": \"shipping container\"}' --output=\".\u002Fdataset\"\n```\n\n*   `images`: 输入图片文件夹路径。\n*   `--base`: 指定使用的基础模型 (此处为 grounding_dino)。\n*   `--target`: 指定要训练的目标模型 (此处为 yolov8)。\n*   `--ontology`: 定义提示词与类别名的映射。上述命令表示将提示词 \"shipping container\" 标记为类别 \"shipping container\"。您可以扩展为 `{\"prompt1\": \"class1\", \"prompt2\": \"class2\"}`。\n*   `--output`: 自动标注数据集的保存路径。\n\n运行结束后，您将在 `.\u002Fdataset` 中看到标注好的数据，并在相应目录下找到训练好的模型权重。\n\n### 方式二：Python 代码定制流程\n\n通过 Python 代码，您可以更灵活地控制本体论（Ontology）、训练参数及后续部署。\n\n以下示例演示如何将 **GroundedSAM** 的知识蒸馏到 **YOLOv8** 模型中：\n\n```python\nfrom autodistill_grounded_sam import GroundedSAM\nfrom autodistill.detection import CaptionOntology\nfrom autodistill_yolov8 import YOLOv8\n\n# 1. 定义本体论 (Ontology)\n# 格式为 {提示词：类别名}，提示词用于驱动基础模型，类别名用于最终数据集\nbase_model = GroundedSAM(ontology=CaptionOntology({\"shipping container\": \"container\"}))\n\n# 2. 自动标注数据集\n# 读取 .\u002Fimages 文件夹，将标注结果保存至 .\u002Fdataset\nbase_model.label(\n  input_folder=\".\u002Fimages\",\n  output_folder=\".\u002Fdataset\"\n)\n\n# 3. 初始化并训练目标模型\ntarget_model = YOLOv8(\"yolov8n.pt\") # 使用 nano 版本以加快训练\ntarget_model.train(\".\u002Fdataset\u002Fdata.yaml\", epochs=200)\n\n# 4. 运行推理测试\npred = target_model.predict(\".\u002Fdataset\u002Fvalid\u002Fyour-image.jpg\", confidence=0.5)\nprint(pred)\n\n# 5. (可选) 上传模型到 Roboflow 进行部署\n# from roboflow import Roboflow\n# rf = Roboflow(api_key=\"YOUR_API_KEY\")\n# project = rf.workspace().project(\"YOUR_PROJECT_ID\")\n# project.version(DATASET_VERSION).deploy(model_type=\"yolov8\", model_path=f\".\u002Fruns\u002Fdetect\u002Ftrain\u002F\")\n```\n\n### 可视化标注结果 (可选)\n\n您可以使用以下代码查看基础模型生成的标注效果，以便评估自动标注的质量：\n\n```python\nimport supervision as sv\nimport cv2\n\nimg_path = \".\u002Fimages\u002Fyour-image.jpeg\"\nimage = cv2.imread(img_path)\n\n# 获取基础模型的预测结果\ndetections = base_model.predict(img_path)\n\n# 初始化工具\nbox_annotator = sv.BoxAnnotator()\nlabel_annotator = sv.LabelAnnotator()\n\n# 生成标签文本\nlabels = [\n    f\"{base_model.ontology.classes()[class_id]} {confidence:0.2f}\"\n    for _, _, confidence, class_id, _, _ in detections\n]\n\n# 绘制框和标签\nannotated_frame = box_annotator.annotate(scene=image.copy(), detections=detections)\nannotated_frame = label_annotator.annotate(scene=annotated_frame, detections=detections, labels=labels)\n\n# 显示图像\nsv.plot_image(annotated_frame, (16, 16))\n```\n\n完成上述步骤后，您即可获得一个针对特定任务优化的小型模型，可直接部署到云端或边缘设备。","一家智能零售初创公司需要快速部署一套能识别货架上特定饮料品牌的视觉系统，以监控库存和陈列合规性。\n\n### 没有 autodistill 时\n- **标注成本高昂**：团队需雇佣人工逐帧手动框选数千张货架图像中的饮料瓶，耗时数周且费用昂贵。\n- **启动周期漫长**：从收集图片到完成标注、再训练模型，整个流程往往拖延一个月以上，错失市场窗口。\n- **边缘部署困难**：直接使用大型基础模型进行推理虽然准确，但计算资源消耗巨大，无法在低成本的边缘摄像头设备上流畅运行。\n- **迭代灵活性差**：一旦新增需要识别的饮料品牌，必须重新经历繁琐的人工标注和训练过程，响应速度极慢。\n\n### 使用 autodistill 后\n- **零人工自动标注**：利用 CLIP 等大型基础模型直接对未标注的货架图像进行预标注，瞬间生成高质量训练数据集，完全省去人工环节。\n- **极速模型落地**：将自动标注的数据用于训练轻量级的 YOLO 模型，几天内即可完成从原始图片到可部署模型的闭环。\n- **高效边缘运行**：生成的蒸馏模型体积小、速度快，完美适配边缘设备，实现实时、低延迟的货架监控。\n- **敏捷业务扩展**：只需修改本体（Ontology）定义新品牌，autodistill 即可自动重新生成数据并训练新模型，轻松应对产品线的频繁变动。\n\nautodistill 通过“大模型教小模型”的蒸馏机制，彻底消除了数据标注瓶颈，让开发者能以零标注成本将通用视觉能力转化为专属的高效边缘应用。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fautodistill_autodistill_7b39c41c.jpg","Autodistill","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fautodistill_f651ed3c.jpg","Use big, slow foundation vision models to train smaller, faster models.",null,"autodistill@roboflow.com","https:\u002F\u002Fautodistill.com","https:\u002F\u002Fgithub.com\u002Fautodistill",[80,84,88],{"name":81,"color":82,"percentage":83},"Python","#3572A5",90.4,{"name":85,"color":86,"percentage":87},"JavaScript","#f1e05a",8,{"name":89,"color":90,"percentage":91},"Makefile","#427819",1.6,2662,213,"2026-04-11T21:03:15","Apache-2.0","未说明","未说明（但基础模型如 GroundedSAM 通常推荐 GPU 加速）",{"notes":99,"python":100,"dependencies":101},"该工具采用模块化设计，需单独安装核心包及具体的基础模型（Base Model）和目标模型（Target Model）插件。支持在无标注数据的情况下，利用大型基础模型自动标注并训练轻量级模型。可通过命令行或 Python 脚本运行。建议使用虚拟环境管理依赖以避免冲突。","3.8+",[64,102,103,104,105,106],"autodistill-grounded-sam","autodistill-yolov8","supervision","cv2","roboflow",[16,15,108,14],"其他",[110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126],"computer-vision","model-distillation","auto-labeling","deep-learning","foundation-models","grounding-dino","image-annotation","image-classification","instance-segmentation","labeling-tool","machine-learning","multimodal","object-detection","pytorch","segment-anything","yolov5","yolov8","2026-03-27T02:49:30.150509","2026-04-15T07:13:36.338643",[130,135,140,145,150,155],{"id":131,"question_zh":132,"answer_zh":133,"source_url":134},33986,"如何直观地检查自动标注生成的注释是否正确？","您可以将生成的图像上传到 Roboflow，使用 [Roboflow Annotate](https:\u002F\u002Froboflow.com\u002Fannotate) 工具进行人工检查。在该工具中，您可以评估和修正注释，如果图像中没有感兴趣的目标可以将其标记为 null，也可以删除错误的检测框。完成后，您可以将数据导出为多种格式（包括 YOLO）用于模型训练。注意：如果使用代码本地加载整个图像目录进行查看，可能会因为图像数量过多导致内存（RAM）不足。","https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill\u002Fissues\u002F46",{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},33987,"遇到 'RuntimeError: PytorchStreamReader failed reading zip archive' 错误该如何解决？","该错误通常发生在先使用了 GroundingDINO 模型，随后尝试使用 Grounded SAM 模型时产生的冲突。建议检查模型加载顺序或重新初始化环境以避免缓存冲突。如果问题持续，可能需要清理之前的模型权重文件或重启运行环境。","https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill\u002Fissues\u002F52",{"id":141,"question_zh":142,"answer_zh":143,"source_url":144},33988,"旧版的 autodistill-sam-clip 模型报错或不再适用怎么办？","autodistill-sam-clip 模型已被官方弃用，其代码库不再维护。官方推荐使用新的模型组合 API 来替代，即通过组合检测模型（如 GroundedSAM）和分类模型（如 CLIP）来实现相同功能。请使用 `CustomDetectionModel` 或类似的组合接口来构建您的工作流，具体可参考新 API 的代码示例。","https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill\u002Fissues\u002F57",{"id":146,"question_zh":147,"answer_zh":148,"source_url":149},33989,"在使用 Autodistill 进行标注时遇到解包错误（not enough values to unpack）如何解决？","这是一个已知的代码兼容性问题。部分用户反馈在 `utils.py` 文件的第 71 行，对 detections 对象进行解包时添加额外的下划线 `_` 可以解决此问题。例如，将解包语句修改为包含 `_` 以忽略多余的返回值。如果该修复尚未合并到主分支，您可能需要手动修改本地安装的库文件。","https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill\u002Fissues\u002F124",{"id":151,"question_zh":152,"answer_zh":153,"source_url":154},33990,"如何使用 SegGPT 进行自动蒸馏标注？有演示吗？","SegGPT 可以用于自动标注未标记的图像。在相关文档的“标记您的图像”（Label your images）部分提供了使用示例。已有用户确认该方法有效，能够成功处理数百张未标记图像。您可以参考 Roboflow Universe 上的相关数据集链接或官方文档中的 SegGPT 集成部分获取具体代码演示。","https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill\u002Fissues\u002F39",{"id":156,"question_zh":157,"answer_zh":158,"source_url":159},33991,"导入时出现 'ImportError: cannot import name DetectionOntology' 循环导入错误怎么办？","该错误通常是由于版本不兼容或导入路径问题引起的。首先，请确保将 `autodistill` 和 `ultralytics` 升级到相互兼容的最新版本。其次，尝试从项目根目录运行代码，而不是从子模块目录运行。如果问题依旧，检查导入语句，确保直接从 `autodistill.detection` 导入所需的类，避免深层嵌套导入导致的循环依赖。","https:\u002F\u002Fgithub.com\u002Fautodistill\u002Fautodistill\u002Fissues\u002F30",[161,166,171],{"id":162,"version":163,"summary_zh":164,"released_at":165},263880,"v0.1.26","更新 supervision 依赖，使用 supervision>=0.19.0rc3 以获得更好的 NMS 支持。","2024-02-13T20:09:24",{"id":167,"version":168,"summary_zh":169,"released_at":170},263881,"v0.1.25","将 npm_settings 添加到 DetectionBaseModel 的 `label` 方法中","2024-02-13T19:53:33",{"id":172,"version":173,"summary_zh":174,"released_at":175},263882,"v0.1.2","Autodistill 初次发布，提供视觉模型的基础模型和目标模型架构。","2023-06-09T17:10:10"]