YOLOv8 · Separable
ESEN

Data Science thesis · Universidad Mayor · 2026

Evaluating YOLOv8 efficiency on GPU, CPU and Raspberry Pi

Two YOLOv8 detectors implemented from scratch in TensorFlow/Keras and trained on COCO2017: one with standard convolutions (Conv2D) and one with depthwise separable convolutions (SeparableConv2D). The separable model loses 17% of mAP50 and runs no faster on a desktop, but on a Raspberry Pi it goes from one image every 14 seconds to one every 1.5.

Pablo Vicente Reyes Pino · Advisor: Dr. Anthony D. Cho · Reviewer: Carlos Muñoz · Defended 24 July 2026

−68%parameters: 3.99 M → 1.26 M
0.212 → 0.175mAP50 on COCO2017 validation
≈ samespeed on desktop CPU and GPU
9.4× fasteron Raspberry Pi: 13.9 s → 1.48 s per image

01 · Summary

The answer depends on the hardware

The question was whether a lighter convolution buys enough speed to justify the accuracy it gives up. The answer changes with where the model runs.

Desktop

It does not pay

With an RTX 4060 Ti, or on the Ryzen CPU alone, both models run at the same speed (5.4–5.5 FPS on GPU, 2.3–2.4 on CPU). The bottleneck is data loading and the TensorFlow runtime, not the parameter count, so Conv2D keeps its quality edge for free.

Raspberry Pi

It is decisive

Without a GPU, Conv2D needs 13.9 s per image with ±1.5 s of jitter; the separable model needs 1.48 s with ±0.01 s. Faster and stable, which is what a continuously running embedded system needs.

Accuracy

The gap is architectural

The separable model was trained for twice the epochs (100 vs. 50) and still finished below Conv2D on every quality metric. It was not undertrained: it lacks capacity.

02 · Problem

Object detection on low-cost hardware

An object detector takes an image and returns a box and a label for every object it recognises: "person here, bicycle there". YOLO (You Only Look Once) does it in a single pass through a convolutional network, which is why it is the usual choice for real-time video: driver assistance, anti-collision systems, surveillance cameras, inspection on a production line.

The catch is cost. Almost all of YOLO's arithmetic happens in convolution layers, and a model that runs smoothly on a desktop GPU can be unusable on a small, cheap, low-power board mounted on a vehicle or a camera, which is exactly where these systems need to operate.

Research question: if YOLOv8's standard convolutions are replaced with separable ones, how much accuracy is lost, how much speed is gained, and does the answer change with the hardware?

Semantic segmentation, classification and localization, object detection, instance segmentation
Figure 1. Object detection among vision tasks: unlike classification it handles several objects per image, and unlike segmentation it returns boxes, not pixel masks.

Objectives

  • Analyse the YOLOv8 architecture and the techniques it introduces.
  • Build two versions: the classic one with Conv2D and a modified one with SeparableConv2D.
  • Evaluate both on accuracy, inference speed and computational efficiency.
  • Compare them on reduced hardware (Raspberry Pi) against a desktop CPU and GPU.

Hypothesis

Deep learning models adapted to reduced hardware deliver higher accuracy than traditional models relative to the resources available, measured on specific performance metrics (mAP, precision, speed and efficiency).

The hypothesis is checked under Conclusions.

03 · Background

Why a separable convolution is cheaper

Standard Conv2D

Learns one 3×3 filter for every input–output channel pair. It looks at space (the 3×3 neighbourhood) and at channels (colour, edges, textures) at the same time.

weights = 9 · Cin · Cout
SeparableConv2D

Splits that into two steps: depthwise, one 3×3 filter per channel that captures spatial patterns, and pointwise, a 1×1 convolution that mixes the channels.

weights = 9 · Cin + Cin · Cout

With 128 channels in and out, the standard layer has 147,456 weights and the separable one 17,536: about 8× fewer, with the same drop in multiplications. The price is expressiveness: the network can no longer learn any combination of "where" and "which channel" in a single step. It is the idea behind MobileNet and Xception.

Conv2D vs SeparableConv2D
Figure 2. Conv2D vs. SeparableConv2D.
Standard vs separable convolution process
Figure 3. One 3D filter over space and channels (top) vs. per-channel filtering followed by a 1×1 combination (bottom).

The YOLOv8 architecture

Backbone

Extracts feature maps at several resolutions from the image (C2f and SPPF blocks).

Neck

Fuses fine spatial detail with global context so both small and large objects are visible.

Head

At three scales, one branch predicts boxes and another the classes. This is where the separable layers go.
YOLOv8 architecture: Backbone, Neck and Head
Figure 4. Standard YOLOv8 as implemented (after Terven et al., 2023): 640×640×3 input, four Backbone stages, multi-scale fusion in the Neck and three decoupled prediction branches in the Head.

How detection quality is measured

IoU

How much the predicted box overlaps the true one, from 0 to 1. A prediction counts as correct above a threshold.

Precision

Of the boxes the model drew, the share that were real objects. Low precision = false alarms.

Recall

Of the real objects in the image, the share the model found. Low recall = missed objects.

mAP50

Area under the precision–recall curve, averaged over COCO's 80 classes, at IoU ≥ 0.5.

FPS and time per image

Inference speed. Its standard deviation shows how predictable it is, which matters in real time.

Context: how detectors evolved

FamilyWhat it broughtLimitation
SIFT / HOGHand-crafted features, consistent in stable scenesBreak with lighting changes, rotation and dynamic scenes
AlexNet and CNNs (2012)Features learned from dataNeed large datasets and compute
R-CNN familyRegion proposals + classificationMulti-stage, slow
YOLO (2015 →)Boxes and classes in one pass, real timeWeaker on small objects
SSD / FPNMulti-scale detectionLower accuracy in some scenes
Transformers (DETR)Global image contextCostly to train and deploy

Separable convolutions had already been tried in YOLOv3-Lite, YOLOv5 variants and YOLOv7's ELAN blocks. YOLOv8 does not include them out of the box: that is the gap this thesis tests.

04 · Method

How the experiment was run

A quantitative comparative design: both models go through exactly the same pipeline, so any difference comes from the architecture and not from the data or the evaluation.

Pipeline: data preparation, training of two models, validation, inference on CPU/GPU/Raspberry Pi, comparison
Figure 5. Data preparation → training of both models → validation → inference on CPU, GPU and Raspberry Pi → comparison of mAP, precision, speed and efficiency.
  1. Implement YOLOv8 in Keras following the published architecture: Backbone with C2f and SPPF blocks, Neck with upsampling and concatenation across three scales, decoupled Head with separate box and class branches.
  2. Build the separable variant by replacing the Conv2D layers of the prediction Head with SeparableConv2D, leaving the feature extractor untouched. Parameters drop from 3,991,584 to 1,258,715.
  3. Train both on COCO2017 with a checkpoint after every epoch. At 10–12 hours per epoch this took weeks of GPU time, and the checkpoints are what carried it through power cuts and code failures without losing progress.
  4. Choose the number of epochs by checking mAP every 10 epochs: 50 for Conv2D, 100 for the separable model.
  5. Validate on the 5,000 COCO images: mAP50, mean IoU, precision, recall, and qualitative detections on the same images.
  6. Measure inference on the desktop CPU and GPU and on the Raspberry Pi (with TensorFlow Lite), recording mean time per image and its standard deviation.
Data and training
DatasetCOCO2017 (public benchmark)
Train / validation118,287 / 5,000 images
Classes80
Input640 × 640 × 3
AnnotationsYOLOv8 format, same preprocessing for both
FrameworkTensorFlow / Keras, from scratch (no pretrained weights)
Cost10–12 h per epoch on an RTX 4060 Ti
HardwareDesktopRaspberry Pi 4
CPURyzen 7 5700X, 8C/16T 3.4 GHzBCM2711, Cortex-A72 1.5 GHz
GPURTX 4060 Ti, 8 GBNone (NEON SIMD)
RAM32 GB DDR4-32008 GB LPDDR4-2133
Power65 W CPU + 160 W GPU≈ 7 W
RuntimeTensorFlow + CUDATensorFlow Lite

05 · Results

Results on COCO2017 validation

MetricYOLOv8-Conv2DYOLOv8-Separable
Model
Training epochs50100
Parameters3,991,584 (15.2 MB)1,258,715 (4.8 MB)
Detection quality
mAP500.21190.1751
Mean IoU0.83670.8302
Precision0.68360.6734
Recall0.32600.2933
Inference speed
Desktop CPU (FPS)2.342.41
Desktop GPU (FPS)5.485.36
Raspberry Pi (FPS)0.070.68
Time per image, CPU (s, mean ± sd)0.4273 ± 0.02070.4156 ± 0.0136
Time per image, GPU (s, mean ± sd)0.1824 ± 0.01690.1866 ± 0.1671
Time per image, Raspberry Pi (s, mean ± sd)13.9322 ± 1.52301.4754 ± 0.0142

Both models share data, input size, metrics and validation split; only the convolution type in the Head changes.

Mean time per image

Each platform on its own scale. Lower is better.

Desktop GPU
Conv2D0.18 s
Separable0.19 s
Desktop CPU
Conv2D0.43 s
Separable0.42 s
Raspberry Pi
Conv2D13.93 s
Separable1.48 s

Reading the table

Quality

Conv2D wins every metric. The biggest gap is recall (0.326 vs. 0.293): the separable model misses objects, but when it finds one it locates it almost as well (IoU and precision nearly tied).

Desktop speed

A 68% smaller model runs at the same speed. Fewer multiplications only help when multiplications are the bottleneck; on a modern GPU the time goes into moving images around and into the runtime itself.

Pi speed

Here every multiplication runs on a 1.5 GHz ARM CPU with little memory bandwidth, so the savings turn almost directly into speed: 9.4× more FPS and latency stable to the hundredth of a second.

Choosing the number of epochs

Conv2D reaches its best mAP at epoch 50 and then degrades (overfitting). The separable model converges more slowly and noisily, settling around epoch 100.

mAP every 10 epochs for both models
Figure 6. mAP every 10 epochs. (a) YOLOv8-Conv2D, best at epoch 50. (b) YOLOv8-Separable, best around epoch 100.

Detections side by side

Same validation images; ground truth in red and predictions in yellow. Conv2D keeps tighter, more stable boxes on small and medium objects; the separable model misses more of them, which is where its lower recall comes from.

Detections by YOLOv8-Conv2D after 50 epochs
Figure 7. YOLOv8-Conv2D, 50 epochs.
Detections by YOLOv8-Separable after 100 epochs
Figure 8. YOLOv8-Separable, 100 epochs, same images.

06 · Deployment

Getting the model onto the Raspberry Pi

Exporting to TensorFlow Lite was not straightforward. DepthwiseConv2dNative is not among TFLite's built-in operators, so the export needed Select TF Ops and the graph had to be restructured: pure inference was split from the label encoder and from non-maximum suppression (NMS), keeping only the layers needed for prediction.

The model then runs on the Pi, but part of the graph executes as Flex ops that miss some TFLite and XNNPACK optimizations. That penalises the heavier, more memory-hungry Conv2D graph most, and partly explains its high and erratic latency.

07 · Conclusions

What the thesis concludes

Hypothesis: partly confirmed. In absolute terms the adapted model is less accurate (0.175 vs. 0.212 mAP50), and extra epochs did not close the gap. Relative to the resources it uses, it wins clearly on the device it was designed for: on the Raspberry Pi it delivers 83% of the accuracy at a tenth of the latency and a third of the size, while the standard model is not usable there (one image every 14 s). On a desktop the trade-off does not exist, because the lighter model is not faster.

Recommendation

When to use which

  • Desktop or server GPU: Conv2D. You keep the accuracy and pay nothing in speed.
  • Embedded device without a GPU: separable. 17% less mAP50 buys a model about 10× faster, 3× smaller and with predictable latency, which matters for anti-collision or continuous monitoring.
Limitations

Scope of the result

  • Unequal epochs (50 vs. 100): they favour the separable model, so the quality gap is, if anything, understated.
  • Low absolute mAP: both models were trained from scratch without a hyperparameter search; they compare the two convolutions, they do not compete on COCO.
  • Pi latencies depend on the TFLite conversion: read them as relative between models.
  • One dataset and two platforms.

Future work

Edge accelerators

Google Edge TPU, NVIDIA Jetson, FPGAs and NPUs, where depthwise operations are natively supported.

Lightweight detectors

Compare against models built for the edge: NanoDet, MobileNet-SSD and PP-YOLO.

Recovering accuracy

Fine-tuning, stronger augmentation, quantization or neural architecture search (NAS).

Field deployment

Measure latency, energy and stability in a real application, not only on validation.