Yolo فيجن شنتشن
شنتشن
انضم الآن
مسرد المصطلحات

البحث المتجهي

اكتشف كيف تُحدث خاصية البحث المتجهي (vector search) ثورة في الذكاء الاصطناعي من خلال تمكين التشابه الدلالي في استرجاع البيانات لمعالجة اللغات الطبيعية (NLP)، والبحث المرئي، وأنظمة التوصية، والمزيد!

Vector search is a sophisticated method of information retrieval that identifies similar items within a dataset based on their mathematical characteristics rather than exact keyword matches. Unlike traditional keyword search, which relies on finding specific character strings, vector search analyzes the underlying semantic meaning of the data. This technique is fundamental to modern artificial intelligence (AI) applications because it allows computers to understand relationships between abstract concepts, processing unstructured data such as images, audio files, and natural language text with remarkable accuracy.

كيفية عمل البحث في المتجهات

The core of vector search involves transforming raw data into high-dimensional numerical vectors known as embeddings. This process maps items to points in a multi-dimensional space where conceptually similar items are located close to one another.

  1. Vectorization: A deep learning (DL) model processes the input data—for example, an image of a dog—and outputs a feature vector. Advanced models like YOLO26 are often used to generate these rich feature representations efficiently.
  2. Indexing: To perform searches quickly, these vectors are organized using specialized algorithms, often stored in a dedicated vector database.
  3. Similarity Calculation: When a user submits a query, the system converts that query into a vector and measures the distance to stored vectors using metrics like cosine similarity or Euclidean distance.
  4. Retrieval: The system returns the "nearest neighbors," which represent the most contextually relevant results.

مثال على Python : توليد التضمينات

To implement vector search, you must first convert your data into vectors. The following code snippet demonstrates how to generate feature maps and embeddings from an image using the ultralytics package and a pre-trained YOLO26 model.

from ultralytics import YOLO

# Load a pre-trained YOLO26 classification model
model = YOLO("yolo26n-cls.pt")

# Generate feature embeddings for an image URL
# The 'embed' method returns the high-dimensional vector representation
results = model.embed("https://ultralytics.com/images/bus.jpg")

# Print the shape of the resulting embedding vector
print(f"Embedding vector shape: {results[0].shape}")

تطبيقات واقعية

Vector search is the engine behind many intuitive features in today's software ecosystem, bridging the gap between computer vision (CV) and user intent.

  • Visual Recommendation Systems: In the sector of AI in retail, vector search powers "shop the look" features. If a customer likes a specific handbag, the system finds items with similar visual vectors—matching shape, texture, and style—creating a personalized recommendation system.
  • Retrieval-Augmented Generation (RAG): To enhance Large Language Models (LLMs), developers use vector search to retrieve relevant documents from a knowledge base. This provides context to the AI, reducing hallucinations and improving accuracy in chatbot interactions.
  • Anomaly Detection: By clustering vectors of "normal" operations, systems can identify outliers that drift far from the cluster. This is critical for anomaly detection in manufacturing quality control and data security.

التمييز بين المفاهيم ذات الصلة

It is helpful to differentiate vector search from similar terms to understand the full machine learning (ML) pipeline.

  • Vector Search vs. Semantic Search: Semantic search is the broader application of understanding user intent (the "what"). Vector search is the specific algorithmic method used to achieve this by calculating vector proximity (the "how").
  • Vector Search vs. Vector Database: A vector database is the infrastructure designed to store and manage embeddings at scale. Vector search is the process of querying that database to retrieve information.
  • Vector Search vs. Keyword Search: Keyword search matches exact text strings (e.g., "apple" matches "apple"). Vector search matches meaning, so "apple" might match "fruit" or "red," even if the words differ.

Integration with the Ultralytics Platform

For teams building similarity search systems, managing datasets and training embedding models is a crucial first step. The Ultralytics Platform simplifies this workflow by providing tools for data management, cloud training, and model deployment. By ensuring your base models—whether for object detection or classification—are high-performing, you ensure the resulting vectors provide accurate and meaningful search results.

انضم إلى مجتمع Ultralytics

انضم إلى مستقبل الذكاء الاصطناعي. تواصل وتعاون وانمو مع المبتكرين العالميين

انضم الآن