Next Article in Journal
Surface Cleaning of SAW-Based Microparticle Sensors Integrated in a Cascade Impactor Using SAW-Induced Droplet Displacement
Previous Article in Journal
Rank-Based Detection of Gravitational-Wave Transients Using Chatterjee Correlation
Previous Article in Special Issue
Poisson Multi-Bernoulli Filter Driven Information-Controlled Selection of Pose Graph Constraints for SLAM
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

People Counting Using YOLO-Based Detection and Clustering for a Mobile Robot

by
Kamil Gomulka
1,2,
Piotr Wozniak
1 and
Tomasz Krzeszowski
1,*
1
Faculty of Electrical and Computer Engineering, Rzeszow University of Technology, al. Powstancow Warszawy 12, 35-029 Rzeszow, Poland
2
Doctoral School, Rzeszow University of Technology, al. Powstancow Warszawy 12, 35-029 Rzeszow, Poland
*
Author to whom correspondence should be addressed.
Sensors 2026, 26(15), 4664; https://doi.org/10.3390/s26154664
Submission received: 30 May 2026 / Revised: 11 July 2026 / Accepted: 15 July 2026 / Published: 23 July 2026

Abstract

People counting is one of the key tasks in intelligent monitoring systems. However, accurately counting people in dynamic environments can be extremely challenging. This is especially true in mobile robot applications, where challenges such as a moving camera, varying conditions, and a limited field of view due to environmental obstacles arise. In such scenarios, the people counting task primarily involves visually detecting and grouping individuals to determine the total number of unique people. This paper presents a people counting algorithm based on visual people detection and clustering. The method utilizes the You Only Look Once (YOLO) detector to identify the bounding boxes of detected individuals and extract features from their corresponding regions of interest (ROIs). Additionally, the dimension of the extracted features is reduced using an encoder and clustered to distinguish individuals, with the number of clusters serving as an estimate of the number of people. The method was tested on a dataset containing 45 independent sequences with a total of 19,350 RGB images, complete with metadata for people detection and re-identification. This dataset encompasses various settings, particularly scenarios featuring mobile robots moving and capturing frames in indoor environments. The experiments demonstrate the effectiveness of the proposed method in different configurations. The best results were achieved using the YOLOv10n detector combined with K-means or SK-means clustering, yielding a Mean Absolute Error ( M A E ) of 1.11. The proposed encoder-based method significantly reduces clustering time and operates effectively within the limited resources available on mobile robotic platforms such as the Jetson Nano.

1. Introduction

Human detection and counting constitute one of the fundamental tasks of surveillance robots. Advances in research on robotic platforms, computer vision, and sensor technology have greatly enhanced counting accuracy and real-time performance. In the current literature, many methods for people counting have been proposed, ranging from non-vision-based solutions to computer vision techniques using deep learning. These methods leverage a variety of sensors, including cameras, depth sensors, and radar-based technologies. For example, the use of RGB-D cameras, such as Kinect, serves as the basis for many human counting systems [1]. Another approach is to use devices, where an impulse radio ultra-wideband radar is employed to analyze signal patterns and count people in real-time, enabling accurate counting even in challenging conditions [2]. A significant area of research focuses on modern techniques that rely on vision methods such as YOLO [3,4]. These methods achieve high accuracy in diverse lighting conditions, various place layouts, and occlusions [5]. Furthermore, the integration of tracking and re-identification algorithms has further improved these systems, enabling them to track people across different camera views [6,7,8]. Recent advancements have introduced Vision Transformer (ViT) as an alternative to Convolution Neural Network (CNN) methods, using the self-attention mechanism to improve feature extraction and robustness [9]. These approaches provide valuable information and further enhance the effectiveness of current systems, such as personalized services and security [10,11]. The application of object counting and tracking is not limited to public spaces and urban surveillance. Robots, especially those involved in agriculture or retail, have also integrated counting systems for monitoring and stock management [12,13]. The completion of the tasks mentioned above using mobile robotic platforms presents a particular challenge in ensuring reliable operation. Mobile robots that move through the environment offer clear advantages over systems with static cameras and sensors, which can only react to the environment in a limited way.
Previous research on people and object counting methods has focused primarily on two main approaches: people counting using static cameras, such as industrial cameras [14,15], and mobile robots equipped with sensors [16]. These systems benefit from stable viewpoints and consistent lighting, which simplifies the detection and counting process. However, counting people using mobile robots introduces unique challenges that consist of constant changes in perspective, dynamic backgrounds, or motion blur. In addition, mobile platforms often operate under varying lighting conditions, limited field of view, and constant occlusions, making tasks such as people detection, identification, and grouping challenging. These factors pose significant challenges. To address them, unlike traditional tracking methods that rely on continuous trajectories and often fail under dynamic robotic viewpoints, we propose a sequence-level clustering framework. By aggregating visual features across the entire image sequence, our approach eliminates the need for strict temporal continuity. This allows the system to robustly count unique individuals even if they are heavily occluded or temporarily leave the field of view, providing a reliable solution tailored for mobile robotic platforms.
To address the research gaps identified in the literature on mobile robot-based people counting, this paper makes the following key contributions:
  • Proposing a novel algorithm for visual counting people based on clustering for a mobile robot;
  • Incorporating optional modules, including an additional backbone for enhanced features and an encoder to reduce dimensionality;
  • Extending the MDDRobots dataset [17] with manually labeled metadata for visual detection, re-identification, and people counting;
  • Verifying the proposed method on the dataset containing indoor recordings from real mobile robots;
  • Evaluating and comparing the method’s performance across platforms with varying computational capabilities.
The outlined research contributions are systematically realized in the subsequent sections of this paper. Section 2 provides a comprehensive review of the related literature, highlighting the limitations of current vision-based counting methods and establishing the context for our approach. Section 3 details the proposed visual people counting framework, presenting the clustering-based algorithm and the integration of the optional encoder module for dimensionality reduction, which constitute the core methodological contributions of this work. Section 4 introduces the extension of the MDDRobots dataset with manually labeled metadata, directly addressing our data-related contribution. Section 5 presents the experimental setup and results, fulfilling the remaining contributions by evaluating the method’s detection and counting performance across hardware platforms with varying computational capabilities. Section 6 provides a critical analysis of the method’s practical limitations, failure cases under dynamic viewpoints, and the inherent trade-offs between computational efficiency and counting accuracy. Finally, Section 7 summarizes the key findings and highlights the potential of this work for future mobile robotic applications.

2. Related Work

2.1. Non-Image-Based Approaches

People counting methods can be differentiated into two main categories: image-based and non-image-based approaches. In non-image-based solutions, radio frequency (RF) technologies are frequently used. By analyzing disturbances in the signals, these RF systems can identify the presence of humans. Yuan et al. [18] have shown that with an iterative calibration mechanism, received signal strength indicator-based solutions can achieve high precision even with measurement errors. A different approach utilizing LiDAR was also suggested as part of the sensor-based solutions. Hashimoto et al. proposed a method that uses laser scanners at multiple heights to detect people by tracking their heads and knees [19]. While providing high accuracy, this approach comes with significant drawbacks in the form of sensor cost, which can limit scalability. PIR sensors, on the other hand, offer a more cost-effective solution. Raykov et al. [20] utilized a single PIR sensor and an infinite hidden Markov model to predict room occupancy. Many similar approaches have found success in areas such as public transport applications [21]. However, due to reliance on temperature changes and short transmission range, these systems struggle in outdoor environments.

2.2. YOLO-Based Detection

While sensor-based methods can be useful for basic counting tasks, they are less effective in addressing complex, dynamic indoor or outdoor scenarios. One of the key aspects of image-based people counting is the detection of representative visual patterns of humans. To achieve that, a precise location of each present person is necessary. In recent years, solutions that incorporate deep learning techniques have gained significant attention due to their ability to process images. These models are typically trained and evaluated on large datasets that contain annotated images. Examples of popular datasets include COCO [22] and Object365 [23], which provide diverse real-world images with varying lighting and object scales to ensure the robustness of model training. Based on these data, various detection models have been developed, including DETR (DEtection TRansformer), RCNN (Region-based Convolutional Neural Network), and FCOS (Fully Convolutional One-Stage Object Detection) [24,25,26,27], each presenting different advantages for object detection. However, one of the most well-known models in the literature and used is YOLO [28], renowned for its speed and accuracy, making it particularly suitable for real-time applications. YOLO’s versatility has been demonstrated across multiple fields. Vu et al. [29] proposed a real-time system for detecting packaging defects, which uses YOLO to identify defective products on production lines with high precision and speed. It demonstrates method effectiveness in industrial quality control applications. In the field of robotics, YOLO-based tracking has been widely explored for tasks such as counting agricultural products, such as tomatoes [30]. Similarly, Yang et al. [31] demonstrated the use of AD-YOLO combined with MR-SORT to count apples in agricultural settings.

2.3. YOLO-Based People Counting

A particular example of using YOLO is visual people detection and counting. The use of this type of universal detector in color images is the basis of many detection and tracking methods [32]. Numerous studies have focused on detecting and counting moving people in different variants of the scene. For example, Ren et al. [5] used a YOLO-based approach to count people in real-time with a static camera, while also considering environmental factors. McCarthy et al. [33] explored video-based automatic people counting for rail replacement bus services, where managing large crowds is crucial. In their research, certain challenges have emerged regarding factors such as lighting and weather, which can affect the accuracy of systems. The cited research focuses on analyzing scenes in which many people are moving around the scene, and counting is performed without the need for individual identification. However, in some cases, it is also important to determine precisely whether a given person will re-enter the scene. The process of person re-identification in counting is crucial in this case, as direct information is lost when an individual leaves the camera’s field of view. Ye et al. [34] proposed an extended variant of people tracking and re-identification implemented using multiple indoor cameras. The referenced works highlight the challenge of detecting, re-identifying, and counting individuals using a mobile robot. In subsequent sections, we provide an in-depth analysis of the technologies employed to address these challenges.

2.4. People Re-Identification and Clustering

Visual person re-identification with the support of grouping is an important approach in the literature. This method enables applications with manually annotated training data [35] and serves as the foundation for unsupervised solutions [36]. Fan et al. presented an unsupervised approach to person re-identification, leveraging clustering techniques to match individuals across views [10]. Unsupervised learning uses various machine learning techniques, including deep neural networks such as CNN. Using deep learning and clustering methods, Zhao et al. [37] presented pedestrian retrieval from different cameras without manual annotation. Zhai et al. [38] proposed an extended discriminative clustering technique to improve person re-identification using unlabeled target domain samples. It forms the basis of the current work, emphasizing the critical role of domain adaptation in both re-identification and clustering tasks. Several of the studies mentioned above confirm the importance and feasibility of solving the person-counting problem. Recent advances include also lifelong learning approaches that enable continuous adaptation to new data while preserving previously learned representations [39]. The challenge of counting using mobile robots involves addressing people’s universal re-identification.

2.5. Robotics and Real-World Applications

Many of the previously discussed articles lay the groundwork for applications in robotics, as tasks like visual grouping and object counting are essential for robots to understand and interact with their environment. Robots monitor their environment and use images to detect and identify objects. For example, Kejriwal et al. [13] presented a system for counting products specifically designed to evaluate robot-based retail stock. Similarly, Zhang et al. [12] employed deep learning-based algorithms for accurate crop counting in agricultural robots. One of the primary challenges in using such systems involves the diversity of robot platforms and their types of movement, such as driving or flying drones [40]. Counting people with mobile robots presents several challenges, mainly due to the change in camera position, which adds further complexity. This requires continuous visual detection and re-identification [41,42], further complicating the task. Unlike counting facilitated by static cameras supplemented with numerous sensors [43,44], the capabilities of mobile robots are often limited, requiring an increased workload to adapt solutions to these constraints. In summary, while existing vision-based people counting methods show promise, a research gap remains regarding mobile robotic platforms. Current approaches often assume static camera viewpoints, which do not account for the challenges of constant perspective changes, motion blur, and frequent occlusions inherent to dynamic environments. Moreover, there is a need for counting frameworks that balance accuracy with the computational constraints of embedded edge devices. This paper addresses these gaps by proposing a counting framework designed to be adaptable to various robotic platforms, with a focus on optimizing computational efficiency through dimensionality reduction.

3. Proposed Method

The proposed method is structured as an integrated pipeline that transforms per-frame object detections into a sequence-level count. Although individual components, such as YOLO and clustering, are established techniques, our methodological contribution lies in their systematic integration: we utilize optional encoder-based dimensionality reduction to compress diverse feature representations into a compact space, enabling consistent sequence-level grouping. A general schema of its processing stages is shown in Figure 1, while Algorithm 1 presents the pseudocode of the proposed method. In the first step, the method processes a sequence of RGB images recorded from a moving camera. Each image is fed into the YOLO detection model, adapted for, among others, human detection in order to identify bounding boxes of this class. Additionally, within the detection stage, filtering is performed based on the predicted probability, and the size of the bounding box, which delineates the region of interest (ROI). As a result, detection bounding boxes are retrieved from the first stage of the YOLO network. Features are then extracted from its backbone, which is pre-trained on the COCO dataset. For the purposes of this method, specific layers of the network were selected to provide a strong representation suitable for the problem. Knowing the ROI from each frame, a representative feature is obtained for the detected area. The features are tensors, with their size depending on the detected bounding box and the dimension of the layer. To reduce these multidimensional features into a single feature vector, adaptive average pooling is applied, aggregating spatial information from the entire feature map into a single value per channel and producing a compact representation of the ROI. An optional step is to extend the model with additional features from another network, similar to the one extracted from YOLO. As a result, extended features are created by concatenating both representations. Afterward, a trained encoder block is used to reduce the dimensionality of the feature vector and improve its representation. The features, in the form of vectors, are then gathered from the detections for every image. Since the method is based on sequences of an arbitrary number of frames, it is not necessary to predict the number of people in every frame. The collected features are used to group the data and determine the optimal number of clusters. The method considers both the maximum number of people observed in a single frame and the predicted cluster assignments. Notably, the final estimate is derived from the entire image sequence, with all frames being analyzed jointly to maintain consistency between frame-level observations and the resulting clustering. Consequently, the proposed approach should be regarded as a sequence-level people-counting method rather than a strict frame-by-frame counting system. The final estimate is obtained after aggregating features from multiple frames and jointly processing them during clustering. It is worth emphasizing that this counting result can be obtained for sequences of any length, making the method flexible for various scenarios. Note that the entire counting process relies exclusively on the predictions generated by the YOLO detector. Ground-truth information is never utilized during the counting process; it is only used for performance evaluation and calculating metrics presented in the Section 5.
Algorithm 1 Visual People Counting Using YOLO and Feature Clustering
Require: 
Image sequence S = { I 1 , , I n } , YOLO detector D, optional backbone B, optional encoder E
Ensure: 
Estimated number of people N
  1:
Initialize feature collection F [ ]
  2:
Initialize the maximum number of detected people in image frame M 0
  3:
for each image I S  do
  4:
      Detect person bounding boxes P = { p 1 , , p k } using D
  5:
      Filter detections by confidence and minimum ROI size
  6:
       M max ( M , | P | )
  7:
      for each detection p P  do
  8:
            Extract the ROI feature map F m corresponding to p from selected YOLO layers
  9:
            Obtain feature vector f adaptive_average_pooling ( F m )
10:
            if additional backbone B is used then
11:
                   Extract backbone feature vector f B for ROI p
12:
                    f C o n c a t ( f , f B )
13:
            end if
14:
            if encoder E is used then
15:
                    f E ( f )
16:
            end if
17:
            Append f to F
18:
      end for
19:
end for
20:
if the selected clustering method requires the number of clusters then
21:
      Determine the optimal number of clusters by clustering the feature set F
22:
else
23:
      Cluster feature set F using the selected clustering method
24:
      Let K be the number of obtained clusters
25:
end if
26:
N max ( K , M )
27:
return N

3.1. YOLO-Based People Detection

The proposed method is based on the YOLO architecture, which is specifically designed for real-time object detection. YOLO is a state-of-the-art convolutional neural network that is known for its ability to predict multiple bounding boxes and their corresponding class labels from an image in a single forward pass. Unlike traditional methods [26,45,46], which freely process areas of interest, YOLO splits the image into a grid and assigns a bounding box and class probabilities to each grid cell. This makes it highly efficient and suitable for fast detection tasks. The YOLO architecture consists of three main modules. First, the backbone, typically a convolutional neural network, is responsible for feature extraction. In this step, the image is transformed in each subsequent layer into a high-level representation. Different versions of YOLO may utilize different backbones, such as DarkNet53 [47], CSPDarknet53 [48], or EfficientRep [49]. The second main component is the neck, responsible for processing the extracted features, enhancing representation, and passing them to the last part, the detection head. Finally, the detection head processes the extracted features and generates final bounding boxes and class predictions. It uses anchor boxes and parameters, such as objectness scores, to refine detection and improve final accuracy.
The constant development of the YOLO results in gradual improvements in each new proposed version. A recent model integrated in our method is YOLOv10, which further optimizes both speed and accuracy [50]. The key advancement was the removal of the non-maximum suppression during training. Instead, a novel dual-assignment strategy is used, which allows the model to handle overlapping predictions more efficiently, thus improving inference speed. YOLOv10 introduced a lightweight classification head, reducing computational complexity. In addition, large-kernel convolutions and partial self-attention modules are used to further enhance the feature extraction step and allow the model to better distinguish objects in complicated scenes. The presented regimen results in noticeable improvements in the model, making YOLOv10 suitable for precise and fast object detection tasks. In this work, we used several YOLOv10 models of varying sizes, including YOLOv10n. It is the most lightweight variation with the architecture presented in Figure 2. In the first part, a series of convolutional layers and C2f modules with a shortcut connection (SC) progressively extract features while reducing spatial dimensions. Two SCDown operations perform downsampling, increasing the number of channels to enhance feature richness. The neck further refines these features through SPPF and PSA modules, while multiple upsampling and concatenation operations ensure effective multiscale fusion. Furthermore, the C2fCIB with SC layers contributes to strengthening feature propagation. The detection head consists of three v10Detect modules that operate on different scales, allowing efficient localization of small, medium, and large objects.
In terms of the people counting task, the YOLOv10 models are used both to extract features and to detect. During the estimate, the model generates several bounding boxes with affiliated confidence scores and class labels. Since the original model was trained to detect 80 object categories, but our focus is solely on the person class, predictions are filtered accordingly. In addition, to refine these predictions, a thresholding strategy is employed: a bounding box with a confidence score is maintained only if it exceeds a certain value. This ensures that only high-confidence detections are considered, reducing the risk of false positives. Additionally, to further filter irrelevant detections, the bounding boxes smaller than a specific size are abandoned. It ensures that only meaningful human detections are kept.

3.2. Feature Extraction

To collect the representations of people in the detector model, a feature extraction mechanism has been incorporated into the proposed method. For this purpose, callbacks were used to access the outputs of selected internal layers of the YOLOv10 model, enabling the capture of complex features without modifying the model architecture. For the YOLOv10n architecture shown in Figure 2, features were extracted and tested in separate variants. Two layers, selected to evaluate the effectiveness of multi-path feature fusion, correspond to the outputs of block 15 ( 80 × 80 × 256 ) at the input of the C2f convolutional block, and block 21 ( 20 × 20 × 1024 ) at the input of the C2fCIB_SC block. The features extracted from these layers are first pooled using adaptive average pooling and then concatenated to form the final ROI representation, resulting in a 1280-dimensional vector. Additionally, an unfused representation was extracted from a layer positioned before the block 20 concatenation, enabling direct comparison with the fused counterparts. After detecting bounding boxes, the corresponding areas on the feature map are extracted based on their spatial locations. This step is followed by adaptive average pooling, which condenses the features within each bounding box into a fixed-size vector representation.
Beyond the YOLO model, the method also supports feature extraction from external backbone networks such as ResNet-18 or MobileNetV3. In this scenario, each detected region is fed into the backbone and features are harvested from its last layer. Similarly to how we extract features from YOLO, adaptive average pooling is used to compress spatial feature maps into a fixed-size feature vector. Both the YOLO-based and the backbone features are concatenated to form a joint representation for the final prediction. This approach provides flexibility, allowing the use of different feature extractors with diverse capabilities, although it comes with an increase in computational complexity.
Examples of extracted features are visualized in a 2D space using t-SNE, as shown in Figure 3. From the visualization presented, observations can be made about distinct groupings of features that are separated, indicating a different person. However, challenges arise in cases where the features of a specific person (e.g., person 7 in Figure 3a and person 1 in Figure 3b) are further apart because the person reappears with a different background and perspective. This highlights the difficulty of consistently capturing the same person and properly re-identifying them in each successive frame.

3.3. Encoder

To further process the extracted features and reduce their dimensionality while retaining important information, we introduce a compact encoder module. The objective of this step is to transform the high-dimensional vectors produced by YOLOv10, with optional extension to features from other backbones, into 32- or 64-dimensional descriptors. The encoder consists of a sequence of fully connected layers, where each is followed by batch normalization, ReLU activation, and dropout, which improves generalization and helps mitigate overfitting. The general structure of the encoder, which reduces the dimensionality to 64, is shown in Figure 4. For the 32-dimensional variant, the architecture is extended at the end with an additional fully connected layer with its associated batch normalization, activation, and dropout stages. Initially, a classification head is used during training to ensure that the latent representations capture distinct features for approximately 20 different individuals, and each class represents a different person. This ensures that useful and discriminative features are preserved. However, once training is complete, the encoder operates solely for dimensionality reduction, without the need for classification. Training is performed on the GoPro subset of the dataset to provide a diverse set of instances that will be representative of the people counting task. The Adam optimizer was used with an initial learning rate of 5e-5, a batch size of 32, and a total of 200 epochs. The model is initially trained to minimize the cross-entropy loss, ensuring that the latent space representations are informative and suitable for subsequent tasks, such as visual clustering. Cross-entropy loss internally applies softmax activation over the output classes, so no additional activation function is required at the model output. After training, the encoder is capable of generating low-dimensional feature vectors from input features extracted by YOLOv10 during detection.

3.4. Clustering

Following the detection of people and the extraction of features, the next step involves clustering. The main goal is to group the data based on their similarity to the detected people, enabling estimation of the number of unique humans present in a given sequence. Two distinct charts are presented, one presenting the position in feature space of each extracted feature from detection, the other more clearly showing which part of the image each feature point represents. Based on observations, in some sequences, the features obtained from the detection exhibit greater separability for the person identification problem. As shown in Figure 5a, in a sequence containing three labeled individuals, features and their distribution correspond to this number. However, some features may still appear further apart from the main clusters. A closer look at Figure 5b, where each point corresponds to a representative part of the image, illustrates how similarities occur depending on the unique characteristics. At the same time, the background can falsely influence the position of certain features.
Several clustering methods can be applied to group features for counting purposes. Some were selected based on a review of the literature and best practices. The K-means [51] and the spherical K-means (SK-means) [52] were explored to partition the feature space. Since the number of clusters was previously unknown, an estimation technique was applied to identify areas where adding more clusters no longer significantly improved separation quality. Spherical K-means, leveraging cosine similarity instead of Euclidean distance, can prove particularly useful when working with high-dimensional feature vectors. Another tested clustering method was the mean-shift [53]. It was evaluated for its ability to detect clusters without requiring a predefined number. By iteratively identifying dense regions in feature space, it offers flexibility but requires careful tuning of the bandwidth parameter to balance cluster cohesion. The last implemented clustering algorithm was DBSCAN [54]. It offers robustness in handling arbitrary cluster shapes and filtering out noise. The threshold for how close points must be to each other to be considered related, as well as the minimum number of such nearby points required to define a group, were adjusted to handle varying feature distributions and effectively distinguish between valid clusters and outliers.

4. Dataset

The dataset used in this study is part of the MDDRobots collection [17], which also includes a sequence of environments without people. In this paper, we specifically focus on sequences that contain a human presence comprising five distinct subsets. Each subset consists of nine sequences from a variety of indoor places. These sequences were captured with different cameras, distinguished by parameters and recording methods. Two of the subsets were captured by moving mobile robots. The wheeled robot, shown in Figure 6a, had a Pi Camera mounted at a height of approximately 60 cm above the surface. The other robot, Robot Nao, had an ASUS Xtion PRO Live camera mounted on its head, also positioned at a height of around 60 cm. The remaining three subsets were recorded using manually operated cameras. The devices used included GoPro Hero 5 Black, iPhone 6s, and Huawei P40 Pro. The cameras were capable of recording at 30 or 60 FPS, depending on the device. However, because of the small changes between consecutive frames, the sequences were downsampled to reduce redundancy and data volume. The mean FPS (mFPS) values for each subset, after downsampling, are presented in Table 1. In total, the dataset comprises 19,350 RGB images in PNG format. The complete source code (v1.0), including annotations and the full experimental pipeline, is publicly available on GitHub at https://github.com/GomulkaK/PeopleCounting (see [55] for details).
In addition, information on the average number of ground truth bounding boxes (number of persons) per sequence is presented in Table 2. The comparison offers a detailed overview of each subset and its specific sequences. It highlights differences in both the average number of bounding boxes per subset and in individual rooms. On the one hand, the Xtion subset is characterized by the least average number of detected persons per image, which may also result from a lower number of registered individuals. On the other hand, the P40Pro subset has more than two people in the frame on average. It is important to mention that the recordings consist of some frames in which no people are present, which reduces the average.
The images used have been enriched with additional metadata. Human detection labels were manually created for each of the 45 independent sequences extracted from the dataset. These labels included bounding boxes assigned not only to the general people class but also to individual persons, enabling the dataset to be utilized for detection and re-identification tasks. An example annotation is shown in Figure 6b. The presented dataset demonstrates significant challenges and is a valuable area for further research. Images captured by mobile robots moving around rooms are often difficult to detect, re-identify, and count people. The dynamic pose of the camera, changing lighting conditions, environmental equipment, robot movement, and environmental elements contribute to the increased complexity, making accurate predictions more challenging.

5. Experiments

To validate the proposed method, a series of experiments was conducted to assess its effectiveness. The evaluation mainly focused on assessing people detection and counting performance, along with analyzing the execution time of the detection and counting algorithms on the different platforms. In addition, different variants of the method were tested and compared to assess the impact of changes in parameters, differences between subsets, and additional features of the neural network model.

5.1. Experiment Setup

The proposed method was tested with various computational devices: a mobile workstation (laptop), a workstation (computing platform), and a Jetson Nano minicomputer (embedded system). For the mobile workstation, the operating system used was Windows 11, and for the other two platforms it was Ubuntu. Detailed information on each unit is presented in Table 3. To evaluate the different variants of the method, the workstation was used due to its superior computational power. The speed and performance of phase-specific time were benchmarked across three configurations, providing a comprehensive evaluation of different computational resources. This approach resulted in an analysis that exhibits a trade-off between speed, accuracy, and hardware capabilities required for real-world applications.
On the considered platforms, PyTorch was used as a deep learning framework, ensuring compatibility with the available CUDA version for GPU acceleration. The installed versions of Python, PyTorch, and CUDA varied according to the hardware configuration. The workstation, running Ubuntu 22.04, utilized Python 3.10 with PyTorch 2.2 and CUDA 12.4. The mobile workstation onboard the Pi Camera robot operated with Python 3.8 and CUDA 11.8, maintaining compatibility with its RTX 3060 GPU. Jetson Nano uses a Python 3.8 environment with PyTorch 1.13 and CUDA 10.8, tailored to the current version of the hardware.

5.2. Evaluation Metrics

In this study, we evaluate visual detection and people counting. The first task, detection, involves comparing predicted bounding boxes with ground truth annotations. To assess the similarity between these regions, the Intersection over Union (IoU) is used [56]. It measures the overlap between two regions by dividing the area of their intersection by the area of their union. The second task, people counting, measures the difference between the predicted and actual number of people present in the scene.
For people detection, we use both the F 1 - s c o r e and the average precision ( A P ). For the F 1 - s c o r e , a detection is considered correct if the IoU exceeds a threshold of 50%. The F 1 - s c o r e is a harmonic mean between precision and recall [57], as shown in (3). Precision is the number of correctly predicted bounding boxes ( T P ) divided by the total number of predicted bounding boxes, as defined in (1), while recall measures the proportion of correctly predicted boxes out of all ground truth boxes, which is shown in (2). These two metrics are combined in the F 1 - s c o r e , which ensures that the model is not overly biased toward minimizing false positives ( F P ) or false negatives ( F N ). The second important metric is based on A P , which represents the area under the precision–recall curve [56]. It provides a summary of the precision across various recall levels, which is calculated as presented in (4). In practice, to evaluate a model across multiple classes, a mean average precision ( m A P ) is used, which is simply an average of A P across different classes. In our case, we focus only on a single class; therefore, both metrics will be indistinguishable:
P = T P T P + F P
R = T P T P + F N
F 1 - s c o r e = 2 · P · R P + R
A P = 0 1 P · R d R
Depending on the assumed IoU threshold, there are different variants of average precision. The basic version, A P 50 , uses an IoU threshold equal to 0.5, and only accounts for detection as true if it exceeds that value. A more restrictive version, which is also used in our study, is A P 50:95. This variant calculates the average precision across a range of IoU thresholds, from 0.5 to 0.95, with a step size of 0.05, providing a more comprehensive evaluation of detection performance across varying levels.
Finally, we used a mean absolute error ( M A E ) to find the discrepancy between the estimated and actual numbers of people. It measures the average of the absolute differences between predicted values ( y ^ i ) and actual values ( y i ) across multiple instances, with n representing the total number of sequences evaluated. This metric provides a simple and interpretable indication of how far the predictions are from the ground-truth values. A lower M A E indicates a more accurate prediction, reflecting a minimal deviation from the actual count, and is calculated as shown below:
M A E = 1 n i = 1 n | y i y ^ i |

5.3. People Detection

In the first step, which involves detecting people, various popular models were tested. Both CNN-based methods [38,48,58,59,60,61,62], and newer transformer-based approaches [27,63] were compared. Multiple YOLO variants were included in the comparison. These models range from lightweight versions, such as the nano variant with fewer parameters, to larger ones, such as YOLOx. To ensure a fair evaluation, models of medium size were selected from each YOLO family. For each model, the objectness score threshold was individually selected to optimize the F 1 - s c o r e . A higher threshold (e.g., 0.9) was chosen for models like DETR and Faster R-CNN, while lower values were more effective for YOLO-based architectures. Table 4 summarizes the backbone architectures, the number of parameters, the input resolutions, the detection results, and the inference times of the evaluated models. Depending on the variant of the network, the original images were resized to the corresponding input resolution before inference. Upon comparison using both A P and F 1 - s c o r e metrics, the best performance was observed with the RT-DETR-L model, which achieved the highest values in both A P 50 and A P 50:95, along with an F 1 - s c o r e of 85.87%. However, the processing time for each detection was notably longer, taking twice as long as the YOLO models. To assess the trade-off between accuracy and computational complexity for mobile robotic applications, different variants of the YOLOv10 model were further evaluated. Given that the difference in metrics, particularly the F 1 - s c o r e , was only marginal, around one to two percentage points, and considering the significant advantage in processing time for the YOLO models, the YOLOv10m method was ultimately selected for the task as the baseline. During tests, not only were typical object detection metrics and times calculated, but several specific examples of problematic scenarios were also identified. These situations are illustrated in Figure 7. In particular, as shown in Figure 7a, certain reflective surfaces posed a challenge, often resulting in incorrect additional detections. In such cases, the detector mistakenly identifies a reflection as a person. Additionally, as seen in Figure 7b, in the presence of occlusion, from the Pi Camera perspective, several individuals were not correctly detected. Specific objects that can resemble people or parts of them, like clothes, as demonstrated in Figure 7c, also ended up being difficult for the detector to ignore.

5.4. People Counting

The proposed method was thoroughly evaluated to assess visual people counting, taking into account various parameters. The extracted features were clustered using multiple techniques in different configurations. The experiments focus on features directly extracted from the YOLO model, and the effect of the additional dimensionality reduction module is analyzed in later experiments in Section 5.5. The first parameter modified was the layer on the output of the feature extraction block, as shown in Figure 2 and described in Section 3.2. Three different layers were tested to determine whether more complex and higher-dimensional layers would provide an advantage. Another key parameter is the minimum area threshold, which discards small, potentially misleading detections. The proposed threshold skips detections that are lower than a certain percentage of the entire image. The last parameter tested involved the score threshold. Several possible thresholds were tested, but since the main task involves not only detecting people, but also counting them based on features, the effort was made to tailor the chosen threshold to this specific task. M A E was used as the main metric for counting performance, quantifying the average absolute difference between the predicted and actual number of unique people per sequence. For each subset, this metric is computed by comparing the predicted and ground truth counts for each of the nine recordings, and then averaging these differences across all recordings in the subset. It should be emphasized that the M A E metric evaluates the total number of unique individuals across the entire video sequence, rather than the number of people detected in a single frame. Because a sequence naturally accumulates a higher number of unique persons over time, this metric reflects the overall sequence-level counting accuracy rather than frame-level density. In addition, each set of parameters was tested using four different clustering methods. Table 5 shows a comparison of all combinations chosen while using YOLOv10s, revealing that the mean absolute error was the lowest while using the K-means and spherical K-means techniques. Another important aspect is the difference in relation to the parameters. Discarding detections less than 1% of the image resulted in a negative contribution, as did using early layers.
Another factor to consider is the difficulty of each subset. Although each subset includes the same nine rooms, differences arise from the camera used to record the scene, its perspective, and resolution. These factors can influence the difficulty of the task and, consequently, the accuracy of the counting results. Observations presented in Table 6 indicate that the Pi Camera subset is the most challenging, yielding the highest mean absolute errors across all methods and models. This could be attributed to the difficult perspective recorded by the robot, as well as to the higher number of people present in the scene on average. In contrast, the GoPro and Xtion datasets appear to be less complex, resulting in lower error rates. The iPhone and P40Pro subsets exhibit moderate difficulty, with variations depending on the method and model used. Furthermore, comparing the clustering techniques reveals that SK-means tend to perform slightly better than K-means in most cases, particularly for the iPhone and P40Pro subsets. YOLOv10n achieves the best overall performance in the GoPro subset with SK-means, with the lowest M A E of 1.00. To broaden the scope of the evaluation, two established object tracking baselines were also included: DeepSORT [65] and BoT-SORT [66]. Unlike the clustering methods that treat each frame as an independent snapshot, these algorithms utilize temporal consistency by maintaining continuous object trajectories. DeepSORT applies a Kalman filter for motion prediction and the Hungarian algorithm for data association. It further employs a Re-Identification module that extracts appearance embeddings and uses cosine distance for matching detections across frames, enabling robust identity preservation despite occlusions and appearance changes. BoT-SORT operates on a similar principle, combining motion tracking with appearance features, but introduces an additional module for Global Motion Compensation to account for background shifts caused by camera movement.

5.5. Encoder Application

The next experiment involved applying the trained encoder as an extension of the proposed method. The primary goal of introducing this additional encoder was to reduce the dimensionality of the features and the further processing time. To train the encoder, the GoPro subset was used as a representative sample of features. The remaining subsets were used for testing to evaluate the impact of embedded features on overall performance. Table 7 presents results for the base YOLOv10n model and two variations with encoder dimensions of 32 (Enc. 32) and 64 (Enc. 64).
A more detailed analysis was conducted, examining the processing times of different stages of the counting pipeline, such as detection, feature extraction, and encoder reduction. In addition, clustering times were evaluated for a selected number of samples. The default model and two different encoders are compared in Table 8. The workstation achieves the lowest processing times, with the fastest setup (YOLOv10n + Enc. 32) reaching a total time of 0.50 s. The mobile workstation is slower, particularly in the clustering steps, where total times range from 1.41 s to 2.26 s, depending on the model and the encoder configuration. The Jetson Nano, being a low-power device, exhibits the longest processing times, exceeding 10 s in most cases, and the YOLOv10n model alone requiring 26.2 s for full processing. These results are characteristic of the computational constraints of the tested platform. Transitioning the proposed framework to newer devices, such as the NVIDIA Jetson Orin series, would significantly improve processing efficiency and further enhance the performance of the system for dynamic robotic applications.
Among the models tested, the base YOLOv10n model without an encoder typically results in longer clustering times, as seen on all platforms. This suggests that while feature encoders add a small per-frame overhead, they improve clustering efficiency, reducing overall computation time for large sequences. Additionally, the choice of encoder size affects performance marginally, with the smaller version generally being slightly faster.
An example visualization of the real number of people and the counting results in selected sequence steps is shown in Figure 8 and Figure 9. In these charts, the blue line represents the ground truth (the real number of people in each frame). The green circles denote the predicted number of people at a given moment using Spherical KMeans, while the red crosses represent predictions made using standard KMeans. For each chart, all sequences from the P40Pro and GoPro are presented. For the temporal evaluation, the people count was cumulatively estimated as the sequence progressed. A prediction was generated after every additional 30 images, using all images accumulated from the beginning of the sequence up to that point. The resulting estimate was then compared with the corresponding ground-truth number of people present in the scene. Depending on the sequence, cases can be observed in which the results closely correspond with real data about the number of people present in the scene. Such situations can be seen in the F104 sequence from the P40Pro subset. However, there is the possibility that an error can occur. On the one hand, there are cases where people are overrepresented, which can be seen in the Corridor2 and D7 charts from P40Pro. However, there can be an underrepresentation of the number of people in the scene, for example, Corridor3 from the P40Pro subset.

5.6. Additional Model Applications

To evaluate the effectiveness of feature representations beyond those extracted from YOLO models, additional backbones were tested to determine whether changing or combining features could achieve better counting performance. Depending on the backbone, features with different dimensions can be extracted. Lighter versions of YOLO produce lower-dimensional feature maps, whose characteristics can vary depending on the selected layer. This also applies to additional backbones, where models such as SquzeeNet and ResNet-18 extract fewer feature dimensions compared to ViT as presented in Table 9. Several additional backbones of different types were tested and compared with each other. Extracting features independently of YOLO and combining directly affects both the time and the overall accuracy of the results. In this case, the use of selected additional backbone features did not produce a significant improvement in the final error. Across different subsets, minor variations were observed; for example, the ResNet-18 model showed a slight improvement in average M A E (from 1.16 to 1.14), while the use of ViT increased error, raising the average M A E to 1.31.

6. Discussion

People counting from mobile robotic platforms presents challenges that differ substantially from those encountered in fixed-camera surveillance systems. In such environments, frequent camera movement, rapidly changing viewpoints, and intermittent visibility of individuals often limit the effectiveness of conventional tracking-based solutions. The findings of this study suggest that sequence-level feature clustering provides a viable alternative by reducing the dependence on persistent trajectories while still allowing accurate estimation of the number of unique individuals observed throughout a sequence.
In our implementation, YOLO is only one component of the proposed detector-agnostic counting framework and was selected because it offers a favorable balance between detection accuracy and computational efficiency, making it well suited for mobile robotic platforms. Although the evaluated YOLO models were trained for general-purpose object detection and not specifically optimized for mobile robot perspectives, they provide a strong baseline despite challenges such as varying viewpoints, motion blur, partial visibility, and frequent occlusions. Future improvements could be achieved by fine-tuning detection models on datasets tailored to mobile robotic people-counting scenarios; however, progress in this direction is currently constrained by the limited availability of large-scale, well-annotated datasets captured from mobile robot viewpoints in indoor environments. The experimental results further indicate that lightweight detector variants, such as YOLOv10n, can provide sufficiently discriminative features for accurate sequence-level counting while maintaining low computational requirements, making them particularly attractive for deployment on resource-constrained mobile robots.
The encoder-based dimensionality reduction introduced an important trade-off between computational efficiency and counting accuracy. Although the encoder slightly increased the average M A E in some configurations, it significantly reduced clustering time, especially on the Jetson Nano platform, where the total processing time decreased from approximately 26 s to about 10 s for a 500-frame sequence. Therefore, the encoder can be considered a practical optimization mechanism for resource-constrained systems, where computational efficiency may be more critical than achieving the lowest possible counting error.
The analysis of individual subsets revealed that recordings obtained from the Pi Camera robot were the most challenging due to the low camera position, changing viewpoints, partial visibility of people, and frequent occlusions. These factors affected both detection quality and feature consistency used during clustering. Failure cases in this subset typically arise when individuals are partially obscured by environmental obstacles or each other, causing fragmented feature clusters and incorrect identification. These results demonstrate that while the proposed framework is robust, its accuracy is inherently linked to viewpoint visibility, motivating future research into viewpoint-invariant feature learning for mobile robots. Although the evaluation was limited to indoor environments and relatively small groups of people, the obtained results indicate that the proposed combination of YOLO-based detection and feature clustering can serve as an effective solution for people counting on mobile robotic platforms. However, it is important to note that this bounding-box and clustering approach is inherently tailored for environments with a limited number of individuals. In scenarios involving dense crowds, severe occlusions and overlapping individuals would significantly degrade both the YOLO detector’s performance and the quality of the extracted features. For such large-scale crowd scenarios, regardless of whether they are indoor or outdoor, density map estimation techniques are generally more appropriate and effective than instance-level detection and clustering [67,68]. Furthermore, while existing tracking and re-identification frameworks are powerful, they are typically optimized for static viewpoints or continuous temporal data [65,66]. This presents significant methodological challenges when applying them to the dynamic camera movements and discontinuous observations inherent to our mobile robotic platform. In contrast, our clustering-based formulation avoids reliance on persistent trajectories, which allows the system to remain robust in the face of frequent track fragmentation and more effectively handle repeated person appearances across the sequence.

7. Conclusions

In this paper, we have presented a novel approach to visual people counting in dynamic environments using images also recorded by mobile robots. The proposed method combines YOLO-based people detection with feature clustering to estimate the number of individuals in an image sequence. During the experiments, different parameters, such as the backbone layer from which features were extracted, the confidence score threshold, and the minimal ROI area, were compared, and the best configuration was selected. Three variants of YOLOv10 were compared, and the nano version was selected for the remaining experiments due to its good performance and low inference time. Each subset was tested separately to evaluate performance from a varying perspective. Particularly challenging were the Pi Camera subset data, which represent views from a difficult camera perspective on the robot. In such scenarios, the camera can often only capture the lower parts of the human body, making accurate detection more difficult. The method utilizes an encoder, which was compared in two variants and proved beneficial in improving clustering efficiency and reducing computational costs, particularly on resource-limited platforms such as Jetson Nano. An evaluation on a dataset with four different clustering methods demonstrated the effectiveness of the approach. The best results were achieved using YOLOv10n alongside K-means and SK-means clustering. These results highlight the potential of integrating deep learning-based detection with feature clustering for real-time people counting in mobile robotic applications. This work and the collected dataset may serve as a foundation for future research and development in vision-based people detection, re-identification, and counting. Future efforts will focus on transitioning the proposed framework to real-time online deployment on mobile robotic platforms. By leveraging advanced hardware, such as the Jetson Orin series, we aim to further enhance computational efficiency and facilitate integration in dynamic, real-world environments.

Author Contributions

Conceptualization, P.W.; Methodology, P.W. and T.K.; Software, K.G. and P.W.; Validation, K.G. and P.W.; Formal Analysis, K.G., P.W. and T.K.; Investigation, K.G., P.W. and T.K.; Resources, K.G. and P.W.; Data Curation, K.G., P.W. and T.K.; Writing—Original Draft Preparation, K.G., P.W. and T.K.; Writing—Review & Editing, K.G., P.W. and T.K.; Visualization, K.G.; Supervision, T.K.; Project Administration, T.K. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The datasets, annotations, and source code used in this study are publicly available on the GitHub platform at https://github.com/GomulkaK/PeopleCounting [55].

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Coşkun, A.; Kara, A.; Parlaktuna, M.; Ozkan, M.; Parlaktuna, O. People counting system by using kinect sensor. In Proceedings of the International Symposium on Innovations in Intelligent Systems and Applications (INISTA); IEEE: Piscataway, NJ, USA, 2015; pp. 1–7. [Google Scholar] [CrossRef]
  2. Choi, J.W.; Yim, D.H.; Cho, S.H. People Counting Based on an IR-UWB Radar Sensor. IEEE Sens. J. 2017, 17, 5717–5727. [Google Scholar] [CrossRef]
  3. Nguyen, H.H.; Ta, T.N.; Nguyen, N.C.; Bui, V.T.; Pham, H.M.; Nguyen, D.M. YOLO Based Real-Time Human Detection for Smart Video Surveillance at the Edge. In Proceedings of the 2020 IEEE 18th International Conference on Communications and Electronics (ICCE); IEEE: Piscataway, NJ, USA, 2021; pp. 439–444. [Google Scholar] [CrossRef]
  4. Kajabad, E.N.; Ivanov, S.V. People Detection and Finding Attractive Areas by the use of Movement Detection Analysis and Deep Learning Approach. Procedia Comput. Sci. 2019, 156, 327–337. [Google Scholar] [CrossRef]
  5. Ren, P.; Wang, L.; Fang, W.; Song, S.; Djahel, S. A novel squeeze YOLO-based real-time people counting approach. Int. J. Bio-Inspir. Comput. 2020, 16, 94–101. [Google Scholar] [CrossRef]
  6. Zheng, L.; Yang, Y.; Hauptmann, A. Person Re-identification: Past, Present and Future. arXiv 2016, arXiv:1610.02984. [Google Scholar] [CrossRef]
  7. Zhou, Y. Deep Learning Based People Detection, Tracking and Re-identification in Intelligent Video Surveillance System. In Proceedings of the International Conference on Computing and Data Science (CDS); IEEE: Piscataway, NJ, USA, 2020; pp. 443–447. [Google Scholar] [CrossRef]
  8. Ding, L.; Wang, S.; Li, R.; Chen, L.; Dong, J. PC-PINet: Partial Re-identification Network for People Counting with Overlapping Cameras. In Proceedings of the 6th International Conference on Image, Vision and Computing (ICIVC), Qingdao, China, 23–25 July 2021; IEEE: Piscataway, NJ, USA, 2021; pp. 66–71. [Google Scholar] [CrossRef]
  9. Ndayishimiye, F.; Yoon, G.J.; Lee, J.; Yoon, S.M. Person re-identification transformer with patch attention and pruning. J. Vis. Commun. Image Represent. 2025, 106, 104348. [Google Scholar] [CrossRef]
  10. Fan, H.; Zheng, L.; Yan, C.; Yang, Y. Unsupervised Person Re-identification: Clustering and Fine-tuning. ACM Trans. Multimed. Comput. Commun. Appl. 2018, 14, 83. [Google Scholar] [CrossRef]
  11. Narayan, N.; Sankaran, N.; Arpit, D.; Dantu, K.; Setlur, S.; Govindaraju, V. Person Re-identification for Improved Multi-person Multi-camera Tracking by Continuous Entity Association. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), Honolulu, HI, USA, 21–26 July 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 566–572. [Google Scholar] [CrossRef]
  12. Zhang, Z.Z.; Kayacan, E.; Thompson, B.G.; Chowdhary, G.V. High precision control and deep learning-based corn stand counting algorithms for agricultural robot. Auton. Robot. 2020, 44, 1289–1302. [Google Scholar] [CrossRef]
  13. Kejriwal, N.; Garg, S.; Kumar, S. Product counting using images with application to robot-based retail stock assessment. In Proceedings of the International Conference on Technologies for Practical Robot Applications (TePRA), Woburn, MA, USA, 11–12 May 2015; IEEE: Piscataway, NJ, USA, 2015; pp. 1–6. [Google Scholar] [CrossRef]
  14. Bhangale, U.; Patil, S.; Vishwanath, V.; Thakker, P.; Bansode, A.; Navandhar, D. Near Real-time Crowd Counting using Deep Learning Approach. Procedia Comput. Sci. 2020, 171, 770–779. [Google Scholar] [CrossRef]
  15. Konrad, J.; Cokbas, M.; Ishwar, P.; Little, T.D.; Gevelber, M. High-accuracy people counting in large spaces using overhead fisheye cameras. Energy Build. 2024, 307, 113936. [Google Scholar] [CrossRef]
  16. Moussaïd, M.; Schinazi, V.R.; Kapadia, M.; Thrash, T. Virtual Sensing and Virtual Reality: How New Technologies Can Boost Research on Crowd Dynamics. Front. Robot. AI 2018, 5, 82. [Google Scholar] [CrossRef] [PubMed]
  17. Wozniak, P.; Krzeszowski, T.; Kwolek, B. Multi-Domain Indoor Dataset for Visual Place Recognition and Anomaly Detection by Mobile Robots. Sci. Data 2025, 12, 817. [Google Scholar] [CrossRef] [PubMed]
  18. Yuan, Y.; Qiu, C.; Xi, W.; Zhao, J. Crowd Density Estimation Using Wireless Sensor Networks. In Proceedings of the Seventh International Conference on Mobile Ad-Hoc and Sensor Networks, Beijing, China, 16–18 December 2011; IEEE: Piscataway, NJ, USA, 2011; pp. 138–145. [Google Scholar] [CrossRef]
  19. Hashimoto, M.; Tsuji, A.; Nishio, A.; Takahashi, K. Laser-based tracking of groups of people with sudden changes in motion. In Proceedings of the IEEE International Conference on Industrial Technology (ICIT), Seville, Spain, 17–19 March 2015; IEEE: Piscataway, NJ, USA, 2015; pp. 315–320. [Google Scholar] [CrossRef]
  20. Raykov, Y.P.; Ozer, E.; Dasika, G.; Boukouvalas, A.; Little, M.A. Predicting room occupancy with a single passive infrared (PIR) sensor through behavior extraction. In Proceedings of the International Joint Conference on Pervasive and Ubiquitous Computing, UbiComp’16, New York, NY, USA, 12–16 September 2016; ACM: New York, NY, USA, 2016; pp. 1016–1027. [Google Scholar] [CrossRef]
  21. Kuchár, P.; Pirník, R.; Janota, A.; Malobický, B.; Kubík, J.; Šišmišová, D. Passenger Occupancy Estimation in Vehicles: A Review of Current Methods and Research Challenges. Sustainability 2023, 15, 1332. [Google Scholar] [CrossRef]
  22. Lin, T.Y.; Maire, M.; Belongie, S.; Hays, J.; Perona, P.; Ramanan, D.; Dollár, P.; Zitnick, C.L. Microsoft COCO: Common Objects in Context. In Proceedings of the Computer Vision—ECCV 2014; Fleet, D., Pajdla, T., Schiele, B., Tuytelaars, T., Eds.; Springer International Publishing: Cham, Switzerland, 2014; pp. 740–755. [Google Scholar] [CrossRef]
  23. Shao, S.; Li, Z.; Zhang, T.; Peng, C.; Yu, G.; Zhang, X.; Li, J.; Sun, J. Objects365: A Large-Scale, High-Quality Dataset for Object Detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Republic of Korea, 27 October–2 November 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 8429–8438. [Google Scholar] [CrossRef]
  24. Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.Y.; Berg, A.C. SSD: Single Shot MultiBox Detector. In Computer Vision—ECCV 2016; Lecture Notes in Computer Science; Springer International Publishing: Cham, Switzerland, 2016; pp. 21–37. [Google Scholar] [CrossRef]
  25. Howard, A.G.; Zhu, M.; Chen, B.; Kalenichenko, D.; Wang, W.; Weyand, T.; Andreetto, M.; Adam, H. MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications. arXiv 2017, arXiv:1704.04861. [Google Scholar] [CrossRef]
  26. Ren, S.; He, K.; Girshick, R.; Sun, J. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. IEEE Trans. Pattern Anal. Mach. Intell. 2017, 39, 1137–1149. [Google Scholar] [CrossRef] [PubMed]
  27. Carion, N.; Massa, F.; Synnaeve, G.; Usunier, N.; Kirillov, A.; Zagoruyko, S. End-to-End Object Detection with Transformers. In Proceedings of the Computer Vision—ECCV; Vedaldi, A., Bischof, H., Brox, T., Frahm, J.M., Eds.; Springer International Publishing: Cham, Switzerland, 2020; pp. 213–229. [Google Scholar] [CrossRef]
  28. Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You Only Look Once: Unified, Real-Time Object Detection. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; IEEE: Piscataway, NJ, USA, 2016; pp. 779–788. [Google Scholar] [CrossRef]
  29. Vu, T.T.H.; Pham, D.L.; Chang, T.W. A YOLO-based Real-time Packaging Defect Detection System. Procedia Comput. Sci. 2023, 217, 886–894. [Google Scholar] [CrossRef]
  30. Ge, Y.; Lin, S.; Zhang, Y.; Li, Z.; Cheng, H.; Dong, J.; Shao, S.; Zhang, J.; Qi, X.; Wu, Z. Tracking and Counting of Tomato at Different Growth Period Using an Improving YOLO-Deepsort Network for Inspection Robot. Machines 2022, 10, 489. [Google Scholar] [CrossRef]
  31. Yang, X.; Gao, Y.; Yin, M.; Li, H. Automatic Apple Detection and Counting with AD-YOLO and MR-SORT. Sensors 2024, 24, 7012. [Google Scholar] [CrossRef] [PubMed]
  32. Krishna, N.M.; Reddy, R.Y.; Reddy, M.S.C.; Madhav, K.P.; Sudham, G. Object Detection and Tracking Using Yolo. In Proceedings of the 3rd International Conference on Inventive Research in Computing Applications (ICIRCA), Coimbatore, India, 2–4 September 2021; IEEE: Piscataway, NJ, USA, 2021; pp. 1–7. [Google Scholar] [CrossRef]
  33. McCarthy, C.; Ghaderi, H.; Martí, F.; Jayaraman, P.; Dia, H. Video-based automatic people counting for public transport: On-bus versus off-bus deployment. Comput. Ind. 2025, 164, 104195. [Google Scholar] [CrossRef]
  34. Ye, S.; Bohush, R.; Chen, H.; Zakharava, I.; Ablameyko, S. Person Tracking and Reidentification for Multicamera Indoor Video Surveillance Systems. Pattern Recognit. Image Anal. 2020, 30, 827–837. [Google Scholar] [CrossRef]
  35. Fayyaz, M.; Yasmin, M.; Sharif, M.; Shah, J.H.; Raza, M.; Iqbal, T. Person re-identification with features-based clustering and deep features. Neural Comput. Appl. 2020, 32, 10519–10540. [Google Scholar] [CrossRef]
  36. Lin, Y.; Dong, X.; Zheng, L.; Yan, Y.; Yang, Y. A Bottom-Up Clustering Approach to Unsupervised Person Re-Identification. Proc. AAAI Conf. Artif. Intell. 2019, 33, 8738–8745. [Google Scholar] [CrossRef]
  37. Zhao, Y.; Shu, Q.; Shi, X.; Zhan, J. Unsupervised person re-identification by dynamic hybrid contrastive learning. Image Vis. Comput. 2023, 137, 104786. [Google Scholar] [CrossRef]
  38. Zhai, Y.; Lu, S.; Ye, Q.; Shan, X.; Chen, J.; Ji, R.; Tian, Y. AD-Cluster: Augmented Discriminative Clustering for Domain Adaptive Person Re-Identification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 16–18 June 2020; IEEE: Piscataway, NJ, USA, 2020; pp. 9018–9027. [Google Scholar] [CrossRef]
  39. Gao, Q.; Jia, M.; Chen, J.; Zhang, J. SAFA: Lifelong Person Re-Identification learning by statistics-aware feature alignment. J. Vis. Commun. Image Represent. 2025, 107, 104378. [Google Scholar] [CrossRef]
  40. Yıldırım, Ş.; Ulu, B. Deep Learning Based Apples Counting for Yield Forecast Using Proposed Flying Robotic System. Sensors 2023, 23, 6171. [Google Scholar] [CrossRef] [PubMed]
  41. Ye, H.; Zhao, J.; Zhan, Y.; Chen, W.; He, L.; Zhang, H. Person Re-Identification for Robot Person Following With Online Continual Learning. IEEE Robot. Autom. Lett. 2024, 9, 9151–9158. [Google Scholar] [CrossRef]
  42. Banerjee, S.; Kumar, A.; Shekhar, A. Indoor Surveillance Robot with Person Following and Re-identification. In Proceedings of the International Joint Conferenceon Neural Networks (IJCNN), Yokohama, Japan, 30 June–5 July 2024; IEEE: Piscataway, NJ, USA, 2024; pp. 1–8. [Google Scholar] [CrossRef]
  43. Li, S.; Hishiyama, R. An Indoor People Counting and Tracking System using mmWave sensor and sub-sensors. IFAC-PapersOnLine 2023, 56, 7096–7101. [Google Scholar] [CrossRef]
  44. Yang; Gonzalez-Banos; Guibas. Counting people in crowds with a real-time network of simple image sensors. In Proceedings of the Ninth IEEE International Conference on Computer Vision, Nice, France, 13–16 October 2003; IEEE: Piscataway, NJ, USA, 2003; Volume 1, pp. 122–129. [Google Scholar] [CrossRef]
  45. Girshick, R.; Donahue, J.; Darrell, T.; Malik, J. Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation. In Proceedings of the 2014 IEEE Conference on Computer Vision and Pattern Recognition, CVPR’14, Columbus, OH, USA, 23–28 June 2014; IEEE: Piscataway, NJ, USA, 2014; pp. 580–587. [Google Scholar] [CrossRef]
  46. Girshick, R. Fast R-CNN. In Proceedings of the IEEE International Conference on Computer Vision (ICCV). IEEE Computer Society, Santiago, Chile, 7–13 December 2015; IEEE: Piscataway, NJ, USA, 2015; pp. 1440–1448. [Google Scholar] [CrossRef]
  47. Redmon, J.; Farhadi, A. YOLOv3: An Incremental Improvement. arXiv 2018, arXiv:1804.02767. [Google Scholar] [CrossRef]
  48. Bochkovskiy, A.; Wang, C.Y.; Liao, H.Y.M. YOLOv4: Optimal Speed and Accuracy of Object Detection. arXiv 2020, arXiv:2004.10934. [Google Scholar] [CrossRef]
  49. Weng, K.; Chu, X.; Xu, X.; Huang, J.; Wei, X. EfficientRep: An Efficient Repvgg-style ConvNets with Hardware-aware Neural Network Design. arXiv 2023, arXiv:2302.00386. [Google Scholar] [CrossRef]
  50. Wang, A.; Chen, H.; Liu, L.; Chen, K.; Lin, Z.; Han, J.; Ding, G. YOLOv10: Real-Time End-to-End Object Detection. In Proceedings of the Advances in Neural Information Processing Systems; Globerson, A., Mackey, L., Belgrave, D., Fan, A., Paquet, U., Tomczak, J., Zhang, C., Eds.; Curran Associates, Inc.: Red Hook, NY, USA, 2024; Volume 37, pp. 107984–108011. [Google Scholar] [CrossRef]
  51. Hartigan, J.A.; Wong, M.A. Algorithm AS 136: A K-Means Clustering Algorithm. J. R. Stat. Soc. Ser. C (Appl. Stat.) 1979, 28, 100–108. [Google Scholar] [CrossRef]
  52. Zhong, S. Efficient online spherical k-means clustering. In Proceedings of the IEEE International Conference on Neural Networks, Montreal, QC, Canada, 31 July–4 August 2005; IEEE: Piscataway, NJ, USA, 2005; Volume 5, pp. 3180–3185. [Google Scholar] [CrossRef]
  53. Comaniciu, D.; Meer, P. Mean shift: A robust approach toward feature space analysis. IEEE Trans. Pattern Anal. Mach. Intell. 2002, 24, 603–619. [Google Scholar] [CrossRef]
  54. Ester, M.; Kriegel, H.P.; Sander, J.; Xu, X. A density-based algorithm for discovering clusters in large spatial databases with noise. In Proceedings of the Second International Conference on Knowledge Discovery and Data Mining, KDD’96, Portland, OR, USA, 2–4 August 1996; AAAI Press: Washington, DC, USA, 1996; pp. 226–231. [Google Scholar]
  55. Gomulka, K.; Wozniak, P.; Krzeszowski, T. People Counting Using YOLO-Based Detection and Clustering. 2026. Available online: https://github.com/GomulkaK/PeopleCounting (accessed on 14 July 2026).
  56. Everingham, M.; Van Gool, L.; Williams, C.K.I.; Winn, J.; Zisserman, A. The Pascal Visual Object Classes (VOC) Challenge. Int. J. Comput. Vis. 2010, 88, 303–338. [Google Scholar] [CrossRef]
  57. Powers, D. Evaluation: From Precision, Recall and F-Measure to ROC, Informedness, Markedness & Correlation. J. Mach. Learn. Technol. 2011, 2, 37–63. [Google Scholar]
  58. Ren, P.; Fang, W.; Djahel, S. A novel YOLO-Based real-time people counting approach. In Proceedings of the International Smart Cities Conference (ISC2), Wuxi, China, 14–17 September 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 1–2. [Google Scholar] [CrossRef]
  59. Lin, T.Y.; Goyal, P.; Girshick, R.; He, K.; Dollár, P. Focal Loss for Dense Object Detection. IEEE Trans. Pattern Anal. Mach. Intell. 2020, 42, 318–327. [Google Scholar] [CrossRef] [PubMed]
  60. Ge, Z.; Liu, S.; Wang, F.; Li, Z.; Sun, J. YOLOX: Exceeding YOLO Series in 2021. arXiv 2021, arXiv:2107.08430. [Google Scholar] [CrossRef]
  61. Khanam, R.; Hussain, M. What is YOLOv5: A deep look into the internal features of the popular object detector. arXiv 2024, arXiv:2407.20892. [Google Scholar] [CrossRef]
  62. Varghese, R.; Sambath, M. YOLOv8: A Novel Object Detection Algorithm with Enhanced Performance and Robustness. In Proceedings of the International Conference on Advances in Data Engineering and Intelligent Computing Systems (ADICS), Chennai, India, 18–19 April 2024; IEEE: Piscataway, NJ, USA, 2024; pp. 1–6. [Google Scholar] [CrossRef]
  63. Zhao, Y.; Lv, W.; Xu, S.; Wei, J.; Wang, G.; Dang, Q.; Liu, Y.; Chen, J. DETRs Beat YOLOs on Real-time Object Detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 16–22 June 2024; IEEE: Piscataway, NJ, USA, 2024; pp. 16965–16974. [Google Scholar] [CrossRef]
  64. Tian, Z.; Shen, C.; Chen, H.; He, T. FCOS: A Simple and Strong Anchor-Free Object Detector. IEEE Trans. Pattern Anal. Mach. Intell. 2022, 44, 1922–1933. [Google Scholar] [CrossRef] [PubMed]
  65. Wojke, N.; Bewley, A.; Paulus, D. Simple online and realtime tracking with a deep association metric. In Proceedings of the IEEE International Conference on Image Processing (ICIP), Beijing, China, 17–20 September 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 3645–3649. [Google Scholar] [CrossRef]
  66. Aharon, N.; Orfaig, R.; Bobrovsky, B.Z. BoT-SORT: Robust Associations Multi-Pedestrian Tracking. arXiv 2022, arXiv:2206.14651. [Google Scholar] [CrossRef]
  67. Liang, D.; Chen, X.; Xu, W.; Zhou, Y.; Bai, X. Transcrowd: Weakly-supervised crowd counting with transformers. Sci. China Inf. Sci. 2022, 65, 160104. [Google Scholar] [CrossRef]
  68. Liang, D.; Xu, W.; Zhu, Y.; Zhou, Y. Focal Inverse Distance Transform Maps for Crowd Localization. Trans. Multi. 2023, 25, 6040–6052. [Google Scholar] [CrossRef]
Figure 1. General schematic of the proposed visual people counting method. The architecture integrates a YOLO-based detection and feature extraction stage, followed by an encoder block for dimensionality reduction. The final count is derived through sequence-level feature clustering, ensuring consistency across multiple frames.
Figure 1. General schematic of the proposed visual people counting method. The architecture integrates a YOLO-based detection and feature extraction stage, followed by an encoder block for dimensionality reduction. The final count is derived through sequence-level feature clustering, ensuring consistency across multiple frames.
Sensors 26 04664 g001
Figure 2. Architecture of the YOLO version 10 nano (YOLOv10n) model.
Figure 2. Architecture of the YOLO version 10 nano (YOLOv10n) model.
Sensors 26 04664 g002
Figure 3. Example t-SNE visualization of features extracted from dataset subsets.
Figure 3. Example t-SNE visualization of features extracted from dataset subsets.
Sensors 26 04664 g003
Figure 4. Encoder 64 architecture during training phase.
Figure 4. Encoder 64 architecture during training phase.
Sensors 26 04664 g004
Figure 5. Example of visualization of extracted features from the iPhone subset.
Figure 5. Example of visualization of extracted features from the iPhone subset.
Sensors 26 04664 g005
Figure 6. Overview of the experimental configuration and dataset samples including (a) a mobile workstation equipped with a mounted Pi Camera, and (b) sample images captured during the experiment showing ground truth labels in blue.
Figure 6. Overview of the experimental configuration and dataset samples including (a) a mobile workstation equipped with a mounted Pi Camera, and (b) sample images captured during the experiment showing ground truth labels in blue.
Sensors 26 04664 g006
Figure 7. Examples of people detection errors encountered in YOLOv10, where blue boxes represent ground truth labels and green boxes indicate detections, resulting from (a) reflective surfaces, (b) visual occlusions, and (c) the presence of objects such as clothing.
Figure 7. Examples of people detection errors encountered in YOLOv10, where blue boxes represent ground truth labels and green boxes indicate detections, resulting from (a) reflective surfaces, (b) visual occlusions, and (c) the presence of objects such as clothing.
Sensors 26 04664 g007
Figure 8. People counting example using YOLOv10n + Enc. 32 on nine P40Pro dataset sequences, with predictions made for every 30 images.
Figure 8. People counting example using YOLOv10n + Enc. 32 on nine P40Pro dataset sequences, with predictions made for every 30 images.
Sensors 26 04664 g008
Figure 9. People counting example using YOLOv10n + Enc. 32 on nine Xtion dataset sequences, with predictions made for every 20 images.
Figure 9. People counting example using YOLOv10n + Enc. 32 on nine Xtion dataset sequences, with predictions made for every 20 images.
Sensors 26 04664 g009
Table 1. Properties of the used subsets.
Table 1. Properties of the used subsets.
SubsetCameraResolution [px]Aspect RatiomFPSNo. ImagesNo. BBox
iPhoneHuman960 × 5401.78.845008405
GoProHuman960 × 5401.79.345006480
P40ProHuman640 × 3601.74.331506849
Pi CameraRobot640 × 4801.36.054008817
XtionRobot640 × 4801.31.318001843
Table 2. Average number of bounding boxes (number of persons) per image for subsets.
Table 2. Average number of bounding boxes (number of persons) per image for subsets.
CameraCorridor1Corridor2Corridor3D3AD7F102F104F105F107
GoPro1.881.711.150.930.792.102.802.482.98
iPhone1.731.281.070.260.741.322.161.632.77
P40Pro1.702.422.741.970.812.442.721.403.34
Pi Camera1.702.892.721.520.561.051.670.901.70
Xtion0.641.632.201.110.530.741.030.520.84
Avg.1.731.991.981.360.691.532.081.392.33
Table 3. Specifications of the platforms used in the experiments.
Table 3. Specifications of the platforms used in the experiments.
FeaturePlatform
Mobile WorkstationWorkstationJetson Nano
Operating SystemWindowsUbuntu 22.04 LTSUbuntu 20.04
CPU ModelIntel Core i7-11800HAMD Ryzen Threadripper 3970XARM Cortex-A57
CPU Clock Speed/Turbo2.3/4.6 GHz3.7/4.5 GHz1.43 GHz
CPU Cores/Threads8/1632/644
RAM16 GB64 GB4 GB
GPU ModelNVIDIA GeForce RTX 3060 MNVIDIA GeForce RTX 2080 TiNVIDIA Maxwell GPU
GPU Memory6 GB11 GB0.5 GB
GPU Cores38404352128
GPU Clock Speed1.6 GHz2.2 GHz0.8 GHz
GPU ArchitectureAmpereTuringMaxwell
AI Performance10.9 TFLOPS13.5 TFLOPS0.5 TFLOPS
Python Version3.83.103.8
PyTorch Version2.22.21.13
Compute Capability8.67.55.3
CUDA Version11.812.410.8
Table 4. Comparison of different detection methods. The best score is bolded, while the second-best score is underlined.
Table 4. Comparison of different detection methods. The best score is bolded, while the second-best score is underlined.
ModelBackboneParamsInput Size [px] AP 50 [%] AP 50:95 [%] F 1 - Score [%]Time [ms] *
DETR [27]ResNet-5041.3 M640 × 64071.2951.9980.4235.90
320 × 32061.4736.6772.9731.43
FasterRCNN [26]ResNet-50FPN43.7 M640 × 64073.8754.1081.5366.41
320 × 32070.0350.3679.2448.99
FCOS [64]ResNet-50FPN32.3 M640 × 64063.8144.2175.2442.00
320 × 32042.5529.0857.4938.88
RT-DETR-L [63]CSPResNet-5033.0 M640 × 64080.0865.4185.8742.52
320 × 32074.5855.7782.4930.26
RetinaNet [59]ResNet-50FPN38.2 M640 × 64060.2942.2371.8347.59
320 × 32051.1534.3965.0727.89
YOLOXm [60]CSPDarknet5325.3 M640 × 64065.5947.8576.4622.26
320 × 32062.6844.1674.0921.16
YOLOv5m [61]CSPDarknet5321.2 M640 × 64074.2756.3082.7320.97
320 × 32074.6656.1482.8414.63
YOLOv8m [62]CSPDarknet5325.9 M640 × 64079.8463.4185.3329.15
320 × 32077.8261.7384.2917.78
YOLOv10m [50]CSPDarknet5315.4 M640 × 64078.0662.5084.6723.51
320 × 32075.0059.3582.5614.72
* Time for a Mobile Workstation.
Table 5. Comparison of YOLOv10s with varying parameters configurations. The table presents the M A E for people counting for different clustering techniques based on model configurations. Bold values indicate the best result.
Table 5. Comparison of YOLOv10s with varying parameters configurations. The table presents the M A E for people counting for different clustering techniques based on model configurations. Bold values indicate the best result.
Model Configuration MAE
ModelBlockMin. ROI [px%]Score Thr.    K-MeansMean-ShiftDBSCANSK-Means
YOLOv10s1510.71.472.002.581.31
2010.71.361.962.001.29
2110.71.271.842.291.29
2120.71.361.932.271.62
2140.71.421.932.221.20
2110.51.311.871.961.51
2110.61.271.782.111.44
2140.81.382.072.531.51
Table 6. Comparison of people counting results for different subsets, best results are bolded.
Table 6. Comparison of people counting results for different subsets, best results are bolded.
MAE
ModelMethodGoProiPhoneP40ProPi CameraXtionAvg.
YOLOv10nK-means1.441.110.671.551.111.18
YOLOv10s 1.151.110.881.890.891.26
YOLOv10m 1.111.221.442.111.221.42
YOLOv10nSK-means1.220.890.332.330.891.13
YOLOv10s 1.221.771.002.330.891.44
YOLOv10m 1.001.221.002.111.331.33
YOLOv10nDeepSORT [65]1.783.005.222.891.562.89
YOLOv10nBoT-SORT [66]3.784.223.334.892.783.80
Table 7. Comparison of people counting results with different encoder variants, best results are bolded.
Table 7. Comparison of people counting results with different encoder variants, best results are bolded.
MAE *
ModelClustering MethodiPhoneP40ProPi CameraXtionAvg.
YOLOv10nK-means1.110.671.551.111.11
YOLOv10n + Enc. 32 1.000.672.220.781.16
YOLOv10n + Enc. 64 1.110.772.220.781.22
YOLOv10nSK-means0.890.332.330.891.11
YOLOv10n + Enc. 32 1.000.562.220.891.16
YOLOv10n + Enc. 64 1.110.662.221.001.25
* GoPro was used to train the encoder.
Table 8. Processing times from sample sequence with different hardware configurations and methods, where the lowest total times are highlighted in bold.
Table 8. Processing times from sample sequence with different hardware configurations and methods, where the lowest total times are highlighted in bold.
HardwareModelPer-Frame [s]Clustering [s]Total *
[s]
DetectionExtractionEncoderDet. + Ex. + En.100300500
Mobile workstationYOLOv10n2.63 × 10 2 0.70 × 10 3 2.70 × 10 2 1.241.362.232.26
YOLOv10n + Enc. 322.51 × 10 2 0.41 × 10 3 1.52 × 10 3 2.70 × 10 2 1.141.231.381.41
YOLOv10n + Enc. 642.61 × 10 2 0.45 × 10 3 1.45 × 10 3 2.80 × 10 2 1.171.311.571.60
WorkstationYOLOv10n2.12 × 10 2 0.22 × 10 3 2.15 × 10 2 0.280.670.960.98
YOLOv10n + Enc. 321.86 × 10 2 0.22 × 10 3 1.03 × 10 3 1.99 × 10 2 0.220.290.480.50
YOLOv10n + Enc. 642.08 × 10 2 0.21 × 10 3 1.05 × 10 3 2.20 × 10 2 0.230.450.570.59
Jetson NanoYOLOv10n1.36 × 10 1 1.53 × 10 3 1.37 × 10 1 7.252.30 × 102.61 × 102.62 × 10
YOLOv10n + Enc. 321.48 × 10 1 1.72 × 10 3 5.13 × 10 3 1.55 × 10 1 1.753.569.941.01 × 10
YOLOv10n + Enc. 641.88 × 10 1 4.34 × 10 3 5.42 × 10 3 1.98 × 10 1 2.977.731.04 × 101.06 × 10
* Total latency calculated specifically for the 500-frame mark, representing the sum of a single frame’s processing time (Det. + Ex. + En.) and the clustering execution time over 500 accumulated features.
Table 9. Comparison of results with additional features with YOLOv10n as base detector and an Enc. 64, lowest average M A E highlighted in bold.
Table 9. Comparison of results with additional features with YOLOv10n as base detector and an Enc. 64, lowest average M A E highlighted in bold.
ModelAdditional ModelFeature Size * MAE **
iPhoneP40ProPi CameraXtionAvg.
YOLOv10n3841.000.672.220.781.16
YOLOv10nMobilenetv3384 + 5761.000.672.220.781.17
YOLOv10nResNet-18384 + 5121.000.562.220.781.14
YOLOv10nSqueezeNet384 + 5121.000.562.330.781.17
YOLOv10nViT384 + 7681.110.782.221.111.31
* Feature size before dimension reduction; ** The GoPro subset was used to train the encoder.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Gomulka, K.; Wozniak, P.; Krzeszowski, T. People Counting Using YOLO-Based Detection and Clustering for a Mobile Robot. Sensors 2026, 26, 4664. https://doi.org/10.3390/s26154664

AMA Style

Gomulka K, Wozniak P, Krzeszowski T. People Counting Using YOLO-Based Detection and Clustering for a Mobile Robot. Sensors. 2026; 26(15):4664. https://doi.org/10.3390/s26154664

Chicago/Turabian Style

Gomulka, Kamil, Piotr Wozniak, and Tomasz Krzeszowski. 2026. "People Counting Using YOLO-Based Detection and Clustering for a Mobile Robot" Sensors 26, no. 15: 4664. https://doi.org/10.3390/s26154664

APA Style

Gomulka, K., Wozniak, P., & Krzeszowski, T. (2026). People Counting Using YOLO-Based Detection and Clustering for a Mobile Robot. Sensors, 26(15), 4664. https://doi.org/10.3390/s26154664

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop