In recent years, a significant number of people in Morocco have been commuting daily to Casablanca, the country’s economic capital. This heavy traffic flow has led to congestion and accidents during certain times of the day as the city’s roads cannot handle the high volume of vehicles passing through. To address this issue, it is essential to expand the infrastructure based on accurate traffic-flow data. In collaboration with the municipality of Bouskoura, a neighboring city of Casablanca, we proposed installing a smart camera on the primary route connecting the two cities. This camera would enable us to gather accurate statistics on the number and types of vehicles crossing the road, which can be used to adapt and redesign the existing infrastructure. We implemented our system using the YOLOv7-tiny object detection model to detect and classify the various types of vehicles (such as trucks, cars, motorcycles, and buses) crossing the main road. Additionally, we used the Deep SORT tracking method to track each vehicle appearing on the camera and to provide the total number of each class for each lane, as well as the number of vehicles passing from one lane to another. Furthermore, we deployed our solution on an embedded system, specifically the Nvidia Jetson Nano. This allowed us to create a compact and efficient system that is capable of a real-time processing of camera images, making it suitable for deployment in various scenarios where limited resources are required. Deploying our solution on the Nvidia Jetson Nano showed promising results, and we believe that this approach could be applied in similar traffic-surveillance projects to provide accurate and reliable data for better decision-making.
Deploying deep learning (DL) models in real-world environments remains a major challenge, particularly under resource-constrained conditions where achieving both high accuracy and compact architectures is essential. While effective, Conventional pruning methods often suffer from high computational overhead, accuracy degradation, or disruption of the end-to-end training process, limiting their practicality for embedded and real-time applications. We present Dynamic Attention-Guided Pruning (DAGP), a Dynamic Attention-Guided Soft Channel Pruning framework that overcomes these limitations by embedding learnable, differentiable pruning masks directly within convolutional neural networks (CNNs). These masks act as implicit attention mechanisms, adaptively suppressing non-informative channels during training. A progressively scheduled L1 regularization, activated after a warm-up phase, enables gradual sparsity while preserving early learning capacity. Unlike prior methods, DAGP is retraining-free, introduces minimal architectural overhead, and supports optional hard pruning for deployment efficiency. Joint optimization of classification and sparsity objectives ensures stable convergence and task-adaptive channel selection. Experiments on CIFAR-10 (VGG16, ResNet56) and PlantVillage (custom CNN) achieve up to 98.82% FLOPs reduction with accuracy gains over baselines. Real-world validation on an enhanced PlantDoc dataset for agricultural monitoring achieves 60 ms inference with only 2.00 MB RAM on a Raspberry Pi 4, confirming efficiency under field conditions. These results illustrate DAGP’s potential to scale beyond agriculture to diverse edge-intelligent systems requiring lightweight, accurate, and deployable models.
Every day, countless individuals with hearing or speech disabilities struggle to communicate effectively, as their conditions limit conventional verbal interaction. For them, sign language becomes an essential and often sole tool for expressing thoughts and engaging with others. However, the general public’s limited understanding of sign language poses a major barrier, often resulting in social, educational, and professional exclusion. To bridge this communication gap, the present study proposes a smart wearable glove system designed to translate Arabic sign language (ArSL), especially Moroccan sign language (MSL), into a written alphabet in real time. The glove integrates five MPU6050 motion sensors, one on each finger, capable of capturing detailed motion data, including angular velocity and linear acceleration. These motion signals are processed using an Artificial Neural Network (ANN), implemented directly on a Raspberry Pi Pico through embedded machine learning techniques. A custom dataset comprising labeled gestures corresponding to the MSL alphabet was developed for training the model. Following the training phase, the neural network attained a gesture recognition accuracy of 98%, reflecting strong performance in terms of reliability and classification precision. We developed an affordable and portable glove system aimed at improving daily communication for individuals with hearing impairments in Morocco, contributing to greater inclusivity and improved accessibility.
Designing effective temporal modeling strategies for video-based sign language recognition (SLR) remains challenging, particularly in low-resource settings where the behavior of modern architectures is not fully understood. In this study, we present a controlled comparative evaluation of temporal models, including recurrent architectures (RNN, LSTM, GRU) and a Transformer encoder, within a unified spatio-temporal framework based on a shared MobileNetV2 feature extractor. All models are trained and evaluated under identical conditions on a curated subset of the WLASL dataset (37 classes), ensuring a fair and reproducible comparison. The results show that recurrent models consistently achieve higher performance than the Transformer-based approach in data-constrained scenarios, with the CNN–LSTM model reaching an accuracy of 90.02%. In contrast, the Transformer model exhibits lower generalization capability, which may be attributed to its higher data requirements. Additionally, increasing architectural complexity through hybrid temporal designs does not result in performance improvements. These findings suggest that simpler recurrent architectures remain effective for temporal modeling in limited data settings and highlight the importance of aligning model complexity with data availability for practical SLR applications.
Transfer learning enables pretrained deep networks to adapt to new tasks but typically preserves their original computational structure, leaving much of the inference cost unchanged. Structured pruning can reduce this complexity; however, introducing sparsity during fine-tuning creates a competing optimization problem in which transferred representations must adapt while the network simultaneously determines which structures can be removed. We propose GASP, an adaptation-preserving structured pruning framework that treats task adaptation and structural sparsity learning as a coordinated optimization process, allowing for the sparse structure to emerge progressively as pretrained representations adapt to the target task. Rather than imposing structural decisions independently of this adaptation, GASP first establishes target-task adaptation through a warm-up phase, before progressively introducing sparsity pressure through an equation-driven schedule. In parallel, temperature annealing gradually sharpens input-aware continuous gates toward increasingly differentiated structural responses. Together, these mechanisms regulate the onset and progression of sparsification while structural importance evolves during fine-tuning. The learned gating responses are subsequently aggregated over the validation data and converted into a physically compact architecture through global Otsu-based thresholding and structural reconstruction, avoiding predefined sparsity ratios and iterative prune–retrain cycles. The same optimization principle is applied to channels in CNNs and MLP units in Swin Transformers without additional trainable mask parameters. Experiments with VGG16, EfficientNet-B0, and Swin-Tiny on CIFAR-10, PlantVillage, and PlantDoc show that GASP achieves accuracy improvements of up to 2.22%, with the corresponding configuration reducing parameters and FLOPs by 91.37% and 88.83%, respectively. Raspberry Pi 4 deployment further demonstrates that the learned structural sparsity translates into practical inference efficiency. Overall, the results demonstrate the effectiveness of coordinating representation adaptation and structural sparsification when deriving compact task-adapted models.