• 1 min read

Emotion Detection for IoT: CNN vs ResNet50

Measured how hard a CNN and a ResNet50 facial emotion model work a device's CPU, heat and battery, as a proxy for IoT deployment.

Computer VisionDeep LearningResNet50IoTOpenCV

What it is

A four-person project for the Internet of Things course at VIT Vellore. Most deep learning work reports accuracy and stops there. On an IoT device you also care about heat, battery and power, so we measured those for two facial emotion models.

  • A webcam script captures faces with an OpenCV Haar cascade and saves them as grayscale images.
  • A basic CNN and a ResNet50 classify the emotion in each image.
  • Each model runs a stress test that classifies images over and over, while HWiNFO64 logs core temperature, battery charge, remaining capacity and CPU package power.
  • We ran this on four laptops with brightness at minimum, Wi-Fi and Bluetooth off, and nothing else running.

Results

Rate of change per minute during the stress test:

DeviceModelCore temp (°C/min)Charge (%/min)Capacity (Wh/min)CPU power (W/min)
1CNN3.270.660.201.39
1ResNet501.710.630.221.12
2CNN6.152.220.657.90
2ResNet504.431.410.416.09
3CNN3.741.170.5110.39
3ResNet503.001.380.602.05
4CNN7.071.330.657.18
4ResNet507.001.300.646.92

The CNN heated the CPU faster than ResNet50 on every device, and drew much more power on devices 2 and 3. Battery drain was about the same for both. The CNN also gave more accurate predictions, so we judged it the better fit for an IoT device despite the extra load.

Laptops are a worst case for power, since they aren’t built for one task the way IoT hardware is. The numbers are useful for comparing the two models, not for predicting battery life on a real device.

Back to top