Yolo 비전 선전
선전
지금 참여하기
용어집

임베딩

임베딩이 무엇이며 NLP, 추천 및 컴퓨터 비전을 위해 데이터의 의미 관계를 캡처하여 AI에 어떻게 전력을 공급하는지 알아보세요.

Embeddings are dense, low-dimensional, continuous vector representations of discrete variables, serving as a fundamental translator between human data and machine logic. In the realm of Artificial Intelligence (AI), computers cannot intuitively understand messy, unstructured data such as text, images, or audio. Embeddings solve this by converting these inputs into lists of real numbers, known as vectors, which exist in a high-dimensional mathematical space. Unlike traditional encodings that might just assign a random ID to an object, embeddings are learned through training, ensuring that semantically similar items—like the words "king" and "queen," or images of two different cats—are positioned closely together in the vector space.

임베딩 작동 방식

The creation of an embedding involves feeding raw data into a neural network designed for feature extraction. During training, the model learns to compress the essential characteristics of the input into a compact numerical form. For example, a Computer Vision (CV) model analyzing a photograph doesn't just see pixels; it maps shapes, textures, and colors into a specific coordinate in a multi-dimensional graph. When measuring similarity, systems calculate the distance between these coordinates using metrics like cosine similarity or Euclidean distance. This mathematical proximity allows algorithms to perform complex tasks like classification and clustering with high efficiency.

실제 애플리케이션

Embeddings act as the engine for many intelligent features used in modern software products.

  • Semantic Search: Traditional search engines often rely on exact keyword matching, which fails if a user queries "auto" but the document contains "car." Embeddings capture the meaning behind the words. By representing the search query and the database documents as vectors, the system can retrieve results that match the user's intent, even if the specific words differ.
  • Recommendation Systems: Streaming services and e-commerce sites use embeddings to personalize user experiences. If a user watches a sci-fi movie, the system identifies that movie's embedding vector and searches for other movies with nearby vectors in the database. This allows for accurate suggestions based on content similarity rather than just manual tags or categories.
  • Zero-Shot Learning: Advanced models use joint embeddings to link different modalities, such as text and images. This enables a system to recognize objects it has never explicitly seen during training by associating the image embedding with the text embedding of the object's name.

Python으로 임베딩 생성하기

State-of-the-art models like YOLO26 can be used to generate robust image embeddings efficiently. The following example demonstrates how to extract a feature vector from an image using the ultralytics Python 패키지.

from ultralytics import YOLO

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

# Generate embeddings for an image
# The embed() method returns the feature vector representing the image content
embedding_vector = model.embed("https://ultralytics.com/images/bus.jpg")

# Print the shape of the embedding (e.g., a vector of length 1280)
print(f"Embedding shape: {embedding_vector[0].shape}")

임베딩 vs. 관련 개념

To effectively implement AI solutions, it is helpful to distinguish embeddings from closely related technical terms.

  • Embeddings vs. Vector Search: The embedding is the data representation itself (the list of numbers). Vector search is the subsequent process of querying a database to find the nearest neighbors to that embedding. Specialized tools known as a vector database are often used to store and search these embeddings at scale.
  • Embeddings vs. Tokenization: In Natural Language Processing (NLP), tokenization is the preliminary step of breaking text into smaller chunks (tokens). These tokens are then mapped to embeddings. Therefore, tokenization prepares the data, while embeddings represent the data's meaning.
  • Embeddings vs. Deep Learning: Deep learning is the broader field of machine learning based on neural networks. Embeddings are a specific output or layer within a deep learning architecture, often serving as the bridge between raw inputs and the model's decision-making layers.

Developers looking to manage the lifecycle of their datasets, including annotation and model training for generating custom embeddings, can utilize the Ultralytics Platform. This comprehensive tool simplifies the workflow from data management to deployment, ensuring that the embeddings powering your applications are derived from high-quality, well-curated data. Whether using frameworks like PyTorch or TensorFlow, mastering embeddings is a crucial step in building sophisticated pattern recognition systems.

Ultralytics 커뮤니티 가입

AI의 미래에 동참하세요. 글로벌 혁신가들과 연결하고, 협력하고, 성장하세요.

지금 참여하기