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

데이터 전처리

머신러닝을 위한 마스터 데이터 전처리. 모델 정확도와 성능을 향상시키기 위해 클리닝, 스케일링, 인코딩과 같은 기술을 배우십시오.

Data preprocessing is the critical first step in the machine learning pipeline where raw data is transformed into a clean and understandable format for algorithms. In the real world, data is often incomplete, inconsistent, and lacking in specific behaviors or trends, appearing "dirty" or "noisy" to a computer. Preprocessing bridges the gap between raw information and the structured inputs required by neural networks, significantly impacting the accuracy and efficiency of the final model. By standardizing and cleaning datasets, engineers ensure that sophisticated architectures like YOLO26 can learn meaningful patterns rather than noise.

Why Is Data Preprocessing Important?

Machine learning models, particularly those used in computer vision, are sensitive to the quality and scale of input data. Without proper preprocessing, a model might struggle to converge during training or produce unreliable predictions. For instance, if images in a dataset have varying resolutions or color scales, the model must expend extra capacity learning to handle these inconsistencies instead of focusing on the actual object detection task.

Preprocessing techniques generally aim to:

  • Improve Data Quality: Remove errors, outliers, and duplicates to ensure the dataset accurately represents the problem space.
  • Standardize Inputs: Rescale features (like pixel values) to a uniform range, often between 0 and 1, to help optimization algorithms like gradient descent function smoother.
  • Reduce Complexity: Simplify data representations through techniques like dimensionality reduction, making the learning process faster.

Key Techniques in Preprocessing

Several standard methods are used to prepare data for training, each serving a specific purpose in the data pipeline.

  • Data Cleaning: This involves handling missing values (imputation), correcting inconsistent labeling, and filtering out corrupted files. In the context of vision AI, this might mean removing blurry images or fixing incorrect bounding box coordinates.
  • Normalization and Scaling: Since pixel intensities can vary widely, normalizing images ensures that high-value pixels don't dominate the learning process. Common methods include Min-Max scaling and Z-score normalization.
  • Encoding: Categorical data, such as class labels (e.g., "cat", "dog"), must be converted into numerical formats. Techniques like one-hot encoding or label encoding are standard practice.
  • Resizing and Formatting: Deep learning models typically expect inputs of a fixed size. Preprocessing pipelines automatically resize disparate images to a standard dimension, such as 640x640 pixels, which is common for real-time inference.

실제 애플리케이션

Data preprocessing is ubiquitous across industries, ensuring that raw inputs translate into actionable insights.

Medical Imaging Diagnosis

In healthcare AI, preprocessing is vital for analyzing X-rays or MRI scans. Raw medical images often contain noise from sensors or variations in lighting and contrast depending on the machine used. Preprocessing steps like histogram equalization enhance contrast to make tumors or fractures more visible, while noise reduction filters clarify the image structure. This preparation allows models to perform tumor detection with higher precision, potentially saving lives by reducing false negatives.

자율 주행

Self-driving cars rely on inputs from multiple sensors, including LiDAR, radar, and cameras. These sensors produce data at different rates and scales. Preprocessing synchronizes these streams and filters out environmental noise, such as rain or glare, before fusing the data. For autonomous vehicles, this ensures that the perception system receives a coherent view of the road, enabling safe navigation and reliable pedestrian detection in real-time environments.

관련 개념

머신러닝 워크플로우에서 나타나는 다른 용어들과 데이터 전처리를 구분하는 것이 중요하다.

  • vs. 데이터 증강: 전처리(예: 크기 조정)는 모델이 기술적으로 사용할 수 있도록 데이터를 준비하는 반면, 증강은 기존 데이터의 새로운 변형(예: 이미지 회전 또는 뒤집기)을 생성하여 데이터셋의 다양성을 높입니다. 자세한 내용은 YOLO 증강 가이드를 참조하세요.
  • vs. 피처 엔지니어링: 전처리(Preprocessing)는 데이터의 정제 및 형식 정렬을 의미합니다. 피처 엔지니어링(Feature Engineering)은 모델 성능 향상을 위해 데이터로부터 새로운 의미 있는 변수를 생성하는 작업으로, 예를 들어 키와 체중 열로부터 "체질량지수(BMI)"를 계산하는 것과 같습니다.
  • vs. 데이터 라벨링: 라벨링은 객체 주변에 바운딩 박스를 그리는 등 지상 진실을 정의하는 과정입니다. 전처리 작업은 데이터 수집 및 라벨링 이후, 데이터가 신경망에 입력되기 전에 수행됩니다.

실제 사례

In the Ultralytics ecosystem, preprocessing is often handled automatically during the training pipeline. However, you can also manually preprocess images using libraries like OpenCV. The following snippet demonstrates loading an image, resizing it to a standard input size for a model like YOLO26, and normalizing pixel values.

import cv2
import numpy as np

# Load an image using OpenCV
image = cv2.imread("bus.jpg")

# Resize the image to 640x640, a standard YOLO input size
resized_image = cv2.resize(image, (640, 640))

# Normalize pixel values from 0-255 to 0-1 for model stability
normalized_image = resized_image / 255.0

# Add a batch dimension (H, W, C) -> (1, H, W, C) for inference
input_tensor = np.expand_dims(normalized_image, axis=0)

print(f"Processed shape: {input_tensor.shape}")

For large-scale projects, utilizing tools like the Ultralytics Platform can streamline these workflows. The platform simplifies dataset management, automating many preprocessing and annotation tasks to accelerate the transition from raw data to deployed model.

Ultralytics 커뮤니티 가입

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

지금 참여하기