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

CPU

AI 및 머신 러닝에서 CPU 중요한 역할에 대해 알아보세요. 데이터 준비, 추론에서 CPU가 어떻게 사용되는지, 그리고 GPU/TPU와 어떻게 비교되는지 알아보세요.

A Central Processing Unit (CPU) is the primary component of a computer that acts as its "brain," responsible for interpreting and executing instructions from hardware and software. In the context of artificial intelligence (AI), the CPU plays a fundamental role in data handling, system orchestration, and executing inference, particularly on edge devices where power efficiency is critical. While specialized hardware like GPUs are often associated with the heavy lifting of training deep learning models, the CPU remains indispensable for the overall machine learning (ML) pipeline.

인공지능 워크플로우에서 CPU의 역할

Although GPUs are celebrated for their massive parallelism during training, the CPU is the workhorse for many essential stages of the computer vision (CV) lifecycle. Its architecture, typically based on x86 (Intel, AMD) or ARM designs, is optimized for sequential processing and complex logic control.

  • Data Preprocessing: Before a neural network can learn, data must be prepared. CPUs excel at tasks such as file loading, data cleaning, and complex transformations using libraries like NumPy and OpenCV.
  • 에지 추론: 실제 환경 배포 시 대규모 서버에서 모델을 실행하는 것이 항상 가능한 것은 아닙니다. CPU를 활용하면 노트북이나 라즈베리 파이 같은 소비자용 하드웨어에서도 모델을 효율적으로 배포할 수 있습니다. 예를 들어 노트북에서 Ultralytics 실행하거나 라즈베리 파이에서 모델을 구동하는 것이 가능합니다.
  • Post-Processing: After a model outputs raw probabilities, the CPU often handles the final logic, such as Non-Maximum Suppression (NMS) in object detection, to filter out duplicate predictions and refine results.

CPU vs. GPU vs. TPU

하드웨어 환경을 이해하는 것은 머신 러닝 운영(MLOps)을 최적화하는 데 매우 중요합니다. 이러한 프로세서들은 아키텍처와 이상적인 사용 사례 측면에서 크게 다릅니다.

  • CPU: Designed for versatility and complex logic. It features a few powerful cores that process tasks sequentially. It is best for data augmentation, pipeline management, and low-latency inference on small batches.
  • GPU 그래픽 처리 장치): 원래 그래픽 처리를 위해 개발된 GPU는 병렬 처리를 위해 설계된 수천 개의 소형 코어를 갖추고 있습니다. 모델 훈련의 표준으로 사용되는 이유는 CPU 훨씬 빠르게 행렬 연산을 수행할 수 있기 때문입니다.
  • TPU (Tensor Processing Unit): A specialized circuit (ASIC) developed by Google Cloud specifically for tensor math. While highly efficient for specific workloads, it lacks the general-purpose flexibility of a CPU.

실제 애플리케이션

CPUs are frequently the hardware of choice for applications where cost, availability, and energy consumption outweigh the need for massive raw throughput.

  1. Smart Security Cameras: In security alarm systems, cameras often process video feeds locally. A CPU-based object detection model can identify a person or vehicle and trigger an alert without sending video to the cloud, preserving bandwidth and user privacy.
  2. 산업 자동화: 공장 현장에서는 예측 유지보수 시스템이 CPU를 활용해 기계에서 수집된 센서 데이터를 모니터링합니다. 이 시스템은 진동이나 온도 급상승을 실시간으로 분석해 고장을 예측함으로써, 고가의 GPU 없이도 원활한 제조 자동화를 보장합니다.

Ultralytics CPU 에서의 추론 실행

개발자들은 서버리스 컴퓨팅 환경이나 저전력 장치와의 호환성을 검증하기 위해 모델을 CPU에서 테스트하는 경우가 많습니다. Ultralytics 사용하면 CPU 쉽게 타겟팅할 수 있어 애플리케이션이 어디서나 실행되도록 보장합니다.

다음 예제는 경량 모델을 로드하고 추론을 CPU 실행하는 방법을 보여줍니다:

from ultralytics import YOLO

# Load the lightweight YOLO26 nano model
# Smaller models are optimized for faster CPU execution
model = YOLO("yolo26n.pt")

# Run inference on an image, explicitly setting the device to 'cpu'
results = model.predict("https://ultralytics.com/images/bus.jpg", device="cpu")

# Print the detection results (bounding boxes)
print(results[0].boxes.xywh)

To further improve performance on Intel CPUs, developers can export their models to the OpenVINO format, which optimizes the neural network structure specifically for x86 architecture. For managing datasets and orchestrating these deployments, tools like the Ultralytics Platform simplify the workflow from annotation to edge execution.

Ultralytics 커뮤니티 가입

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

지금 참여하기