EN/FR
Bladi.net

Phone, yawn, raised hand: a small Moroccan AI can already recognize 20 situations

Four Moroccan researchers have designed an artificial intelligence system of just 229 KB that can identify twenty behaviors, people and objects in a classroom. The model runs on a microcontroller and can process images locally, without continuously transmitting students’ videos.

By Sébastien A.
Phone, yawn, raised hand: a small Moroccan AI can already recognize 20 situations

Reading, writing, raising a hand, talking, yawning, looking at a phone or using a computer: the system was developed by Chaymae Yahyati, Ismail Lamaakal, Khalid El Makkaoui and Ibrahim Ouahbi. They all work at the MIASI laboratory at the Faculty of Applied Sciences in Nador, affiliated with Mohammed First University of Oujda.

Their study, published on September 27 in the journal Discover Artificial Intelligence, seeks to address two weaknesses of automated monitoring systems: their substantial computing power requirements and the centralization of images showing students.

On Bladi.net : AI-Powered Cameras to Combat School Violence in Morocco, Education Ministry Says

The researchers developed a TinyML model designed to run on devices with limited memory and processing power. After pruning 40% of the network’s channels and converting it to INT8 integers, its size fell from 742.6 to 228.9 KB, a reduction of 69.2%.

The model was then installed on an NXP board equipped with an Arm Cortex-M4F processor clocked at 120 MHz, with 1 MB of Flash memory and 256 KB of RAM. It processes 15.43 images per second, including detection and filtering operations.

In tests conducted on their main image dataset, its performance reached 95.64% mAP@0.5, a metric measuring its ability to correctly locate and classify the items observed. With a more demanding localization criterion, the score drops to 78.86%.

Twenty categories, but not just behaviors

Training relies primarily on SCB-Dataset5, a dataset containing 7,428 images and 106,830 annotations. It distinguishes actions such as raising a hand, reading, writing, speaking, applauding, yawning or using a phone, as well as people and objects such as the teacher, screen, board and computer.

The researchers also tested their system against two other image datasets, UK_Dataset and SiTBehavior, to measure its ability to work on scenes different from those used during its development.

No Moroccan students took part in the experiment, and no new personal data was collected. The work relies exclusively on existing datasets. The system therefore remains a research prototype, while Morocco’s Ministry of Education had already discussed using cameras equipped with artificial intelligence in schools.

Another distinctive feature of the project is its federated learning approach. Five clients train the model locally using their own images, then send the resulting mathematical updates to the server—not the photos or videos themselves. Once trained and compressed, the AI runs directly on the device without sending video feeds.

On Bladi.net : AI Pioneer Develops ’Watchdog’ System to Curb Rogue Artificial Intelligence

The authors do not yet present their system as a continuous video surveillance tool. Its limited memory makes it better suited to periodic, event-based or low-resolution analysis. They now want to test it in more diverse classrooms, on more devices, and strengthen the protection of exchanges through secure aggregation and differential privacy.