kth.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
An Efficiency Comparision of NPU, CPU, and GPU When Exceuting an Object Detection Model YOLOv5
KTH, School of Electrical Engineering and Computer Science (EECS).
2024 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesisAlternative title
En effektivitetsjämförelse av NPU, CPU och GPU vid exekvering av en objektdetekteringsmodell YOLOv5 (Swedish)
Abstract [en]

In recent years, rapid advancements in machine learning and artificial intelligence have spurred the development of specialized hardware designed to optimize performance and efficiency. Among these, Neural Processing Units (NPUs) have emerged as a promising technology for accelerating neural network tasks. This study compares the efficiency of an NPU with a Central Processing Unit (CPU) and Graphical Processing Unit (GPU) in executing an object detection model, YOLOv5. The comparison focuses on inference time, power, and energy consumption. Pre-trained YOLOv5 models of various sizes, precisions, and formats are used to fairly showcase the capabilities of each hardware platform. The YOLOv5 models used in this study come in nano, small, medium, and large sizes. The models on the CPU and GPU are available in single and low precisions, in both PyTorch and ONNX formats. The models on the NPU are in half and low precisions, each in RKNN format. The results highlight the NPU’s superiority in power and energy efficiency, though it is slower than the PyTorch models on the GPU in terms of inference time. PyTorch models on the GPU are the fastest and the second most energy-efficient, while being the most power-intensive. The CPU serves as a middle-ground option in terms of inference time and power consumption, while being the most energy-intensive.

Abstract [sv]

Under de senaste åren har snabba framsteg inom maskininlärning och artificiell intelligens drivit utvecklingen av specialiserad hårdvara som är utformad för att optimera prestanda och effektivitet. Bland dessa har neurala processorenheter (NPUs) framstått som en lovande teknologi för att påskynda neurala nätverksuppgifter. Denna studie jämför effektiviteten hos en NPU med en centralprocessor (CPU) och en grafisk processor (GPU) vid exekvering av en objektigenkänningsmodell, YOLOv5. Jämförelsen fokuserar på inferenstid, effekt och energiförbrukning. Förtränade YOLOv5-modeller i olika storlekar, precisioner och format används för att rättvist visa kapaciteten hos varje hårdvaruplattform. YOLOv5-modellerna som används i denna studie finns i storlekarna nano, liten, medium och stor. Modellerna på CPU och GPU finns i enkel och låg precision, i både PyTorch- och ONNX-format. Modellerna på NPU är i halv och låg precision, alla i RKNN-format. Resultaten framhäver NPU överlägsenhet i effekt och energieffektivitet, även om den är långsammare än PyTorch-modellerna på GPU när det gäller inferenstid. PyTorch-modellerna på GPU är de snabbaste och näst mest energieffektiva, men mest effektkrävande. CPU fungerar som ett mellanalternativ när det gäller inferenstid och effektförbrukning, men är mest energiintensiv.

Place, publisher, year, edition, pages
2024. , p. 42
Series
TRITA-EECS-EX ; 2024:364
Keywords [en]
NPU, Specialized Hardware, YOLOv5
Keywords [sv]
NPU, Specialiserad hårdvara, YOLOv5
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:kth:diva-351119OAI: oai:DiVA.org:kth-351119DiVA, id: diva2:1886212
Supervisors
Examiners
Available from: 2024-08-23 Created: 2024-07-30 Last updated: 2024-08-23Bibliographically approved

Open Access in DiVA

fulltext(1473 kB)2665 downloads
File information
File name FULLTEXT01.pdfFile size 1473 kBChecksum SHA-512
91c099733ba7567b9c14fb06e8929d43046986cda4e1d1833f3693dc0a680dea8e5fab7445fdb041ef4be70e60d84cc06274df656e8483a6cfc0b1baf7393118
Type fulltextMimetype application/pdf

By organisation
School of Electrical Engineering and Computer Science (EECS)
Computer and Information Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 2673 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 2927 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf