A chunked image annotation method based on local features is presented to improve electric bike detection in complex elevator scenarios using the EBike-DET dataset and mainstream object detection models.
Method Article
A chunked image annotation method based on local features is presented to improve electric bike detection in complex elevator scenarios using the EBike-DET dataset and mainstream object detection models.
The increasing use of electric bikes (EBikes) in confined environments such as residential elevators has raised serious safety concerns and introduced considerable challenges for automated object detection, particularly due to frequent occlusions. Traditional detection approaches, which rely primarily on holistic annotations, often fail to accurately recognize partially occluded EBikes in visually complex scenes. To overcome these limitations, this study proposes a novel chunked annotation method based on local features, offering a more interpretable annotation strategy. By decomposing an EBike into multiple key regions for independent labeling, the proposed method enables detection models to learn fine-grained structural information, thereby improving robustness in occlusion-heavy conditions. Additionally, a dedicated dataset, EBike-DET, has been developed to support detection tasks in realistic elevator scenarios. Annotated using the chunked approach and augmented with simulated environmental conditions, the dataset enhances both model performance and adaptability. The proposed method promotes the development of explainable artificial intelligence (XAI) by making object detection more transparent and structurally interpretable, which is especially valuable in safety-critical applications. Extensive experiments are conducted using three mainstream models (YOLOv5, YOLOv10, and SSD). Results show that YOLOv5, when trained on EBike-DET with chunked annotations, achieves improvements of 3.7% in precision, 5.3% in recall, 4.5% in F1 score, and 4.4% in mAP. Compared to public datasets, EBike-DET demonstrates greater stability and robustness under occlusion. This study not only advances detection accuracy but also provides a step toward more interpretable and explainable AI solutions for deployment in real-world safety monitoring systems.
With the rapid proliferation of electric bikes (EBikes) worldwide, particularly in China, where the total exceeded 350 million units by 2022, EBikes have become a dominant mode of short-distance transportation. However, their frequent use in confined spaces such as residential elevators introduces serious safety risks, including abnormal vibrations, equipment damage, unpleasant odors, and fire hazards. A recent study estimates that EBike-related fire incidents occur with a probability of approximately 1.44%1. These risks highlight the urgent need for efficient and accurate EBike detection methods to enhance safety in elevator environments.
Despite progress in computer vision and deep learning, EBike detection in elevators remains challenging. Publicly available datasets are scarce and often lack diversity in EBike models, colors, and occlusion conditions, limiting model generalization2. Moreover, elevator scenarios frequently involve complex occlusions, where EBikes are partially hidden by passengers or structural components, further reducing detection precision3,4,5. Existing holistic annotation methods, which treat EBikes as a single bounding box, often fail under such conditions, demonstrating the need for improved annotation and detection strategies. As shown in Table 1, holistic annotation leads to markedly reduced performance, with up to a 21.5% reduction in mean Average Precision at an Intersection over Union (IoU) threshold of 0.5 (mAP@0.5) compared with chunked annotation.
Advances in deep learning-based detection
Deep learning methods, especially convolutional neural networks (CNNs), have been widely applied in object detection. The You Only Look Once (YOLO) family demonstrates strong real-time performance. However, when detecting occluded or overlapping objects, YOLO models tend to produce redundant bounding boxes. For instance, YOLOv5 enhances multi-scale feature extraction through deep convolution and feature pyramid networks6,7, while YOLOv10 eliminates non-maximum suppression and employs path aggregation networks to improve speed and multi-scale fusion8,9. Despite these improvements, redundant bounding boxes and decreasing robustness in occlusion-heavy environments remain unresolved issues. Yet both suffer when key EBike structures are partially blocked, because holistic annotation provides limited local cues. As shown in Figure 1A-C, this limitation leads to redundant bounding boxes and unstable detection confidence under moderate or heavy occlusion. By contrast, chunked annotation mitigates this issue by enabling the model to detect separate regions-such as wheels or the rear area-thereby reducing redundant bounding boxes under occlusion. Figure 1D-F further demonstrates that chunked annotation improves feature localization and maintains detection stability when only partial EBike components remain visible.
Similarly, the Single Shot MultiBox Detector (SSD) model10,11, based on the VGG-16 backbone, provides efficient detection across scales and performs well on small objects12. However, SSD also struggles when feature continuity is broken by heavy occlusion, leading to missed detections or unstable box regression-even when attention mechanisms are introduced13.Chunked annotation provides an advantage here as well: the model can still rely on remaining visible local parts, improving detection stability in multi-scale and occluded conditions.
Annotation strategies and local feature learning
Most current detection methods adopt holistic annotation, which simplifies annotation but relies mainly on global features14,15. This approach struggles when critical EBike regions-such as the wheels, front area, or rear area-are partially missing. A recent study16 has shown that local feature learning, which segments objects into multiple annotated parts, can improve robustness and precision in challenging scenarios. Consistent with this, results in Table 2 show that chunked annotation remains effective when at least 40%-60% of key EBike components remain visible, particularly when annotating the wheels, front area, and rear area. In contrast, holistic bounding boxes remain sufficient in low-occlusion scenarios (e.g., <20% occlusion) or when image resolution is ≥1280 x 720, where the full silhouette is preserved. The benefit of chunking diminishes when occlusion exceeds ≈70%, or when feature-level regions become too small to provide discriminative spatial information.
Methodological Justification for Using Harris Corner Detection
Harris corner detection is selected for local feature extraction due to its deterministic behavior, computational efficiency, and training-free property, which are essential for reliable annotation in elevator environments. Unlike learned keypoint detectors such as SuperPoint and LoFTR, it avoids additional training and reduces domain shift under limited annotated data and heavy occlusion. Compared with edge-based operators such as Canny and Sobel, Harris corners emphasize geometrically meaningful junctions rather than noisy background edges, enabling stable localization of EBike structures, including wheels and frame intersections. Moreover, Harris corner detection provides interpretable hyperparameters. The empirical constant k controls corner sensitivity and stability. As shown in Section 2.6.2.4 and Figure 2, adjusting k supports a controlled balance between robustness and over-detection, which aligns well with the proposed rule-based chunked annotation strategy.
Data augmentation for robustness
Data augmentation has proven effective in enhancing the diversity and adaptability of detection models. Common techniques include geometric transformations (e.g., rotation, scaling, cropping) and color adjustments (e.g., grayscaling, luminance modifications), which simulate real-world conditions and lighting variations17,18,19. By incorporating these strategies, detection models become more resilient to variability and better suited for real-world deployment.
To address the aforementioned limitations, this study proposes an improved chunked annotation method based on local features. The method enhances feature learning and robustness by dividing EBikes into multiple independent annotated parts, enabling more effective detection under complex occlusion. Additionally, a dedicated Electric Bike Detection (EBike-DET) dataset tailored to elevator environments is constructed, enriched through diverse data augmentations to improve model adaptability. Finally, the method is validated on YOLOv5, YOLOv10, and SSD, demonstrating consistent performance gains of +5.69% to +39.81% mAP, as summarized in Table 3. The contributions can be summarized as follows: an improved chunked annotation method that strengthens feature learning under occlusion conditions, construction of a specialized EBike-DET dataset for elevator scenarios, incorporating multiple augmentation techniques, and experimental validation on mainstream detection models, showing enhanced precision and robustness compared to holistic annotation.
Access restricted. Please log in or start a trial to view this content.
The EBike-DET dataset used in this study consists of images collected by the authors through on-site photography in elevator, parking-lot, and street environments, as well as publicly available EBike images obtained from web-based platforms. All on-site image collection was conducted in non-private environments solely for safety-related technical research on EBike detection. Images do not intentionally target individuals, and any incidentally captured persons are non-identifiable due to distance, occlusion, back-facing views, or appropriate processing that removes facial features and other personal identifiers. Web-sourced images were obtained exclusively from platforms that permit reuse for academic research or from resources released under open licenses. All images are used strictly for non-commercial research and educational purposes. As no identifiable personal data were collected and no direct interaction with human subjects occurred, this study did not require approval from an institutional ethics committee in accordance with the author’s institutional guidelines.
1. Dataset construction
2. Local-feature chunked annotation
NOTE: To enhance the detection precision of EBikes in complex occlusion scenarios, a chunked annotation method based on improved local features is proposed. This method segments the EBike region by extracting its local feature points and determines whether a region should be annotated based on the degree of occlusion in the corresponding feature region. The detailed experimental process is illustrated in Figure 3.
(2)
(3)
(4)
(5)
,
(9)
(10)
(14)
and
are the coordinates of the upper-left and lower-right corners, respectively.
(15)
(16)
(17) 3. Data augmentation
NOTE: A previous study has shown that training datasets lacking sufficient preprocessing and data augmentation often result in degraded model performance22. To address these challenges, the following procedure was followed.
4. Experimental environment
5. Evaluation metrics
NOTE: Although chunked annotations are used during training and inference, evaluation is performed at the e-bike object level. Part-level detections are aggregated into a single e-bike decision according to the rules defined in Section 2.4,3.
(18)
(19)
(20)
(21) Access restricted. Please log in or start a trial to view this content.
Comparison of holistic annotation and chunked annotation on public dataset
The evaluation was conducted on a public dataset comprising 210 EBike images collected from open surveillance and traffic monitoring scenes, with diverse lighting conditions, EBike colors, and varying degrees of occlusion. Each image was annotated using both the holistic method (single bounding box) and the proposed chunked method (dividing EBikes into wheels, front area, and rear areas).
Access restricted. Please log in or start a trial to view this content.
Critical steps
A critical step in this protocol is the chunked annotation method based on local features, where EBikes are segmented into wheel, front, and rear areas. This division ensures that detection models can learn fine-grained representations, which proved essential in occlusion-heavy elevator environments. For instance, YOLOv5 trained with chunked annotations on the EBike-DET dataset improved its mAP@0.5 from 0.925 to 0.966, underscoring the necessity of accurate loc...
Access restricted. Please log in or start a trial to view this content.
The authors have no conflicts of interest.
This work was supported by the 2025 Humanities and Social Sciences Research Planning Fund of the Ministry of Education of China (Grant No.25YJAZH002), the 2024 Guangdong Province Key Discipline Research Capacity Enhancement Project (Grant No.2024ZDJS086), the Guangdong Provincial Undergraduate Innovation and Entrepreneurship Training Program in 2024 (Grant No.S202413714017), and The Ministry of Education's Employment-Education Connection Program: "Innovation and Practice of Talent Cultivation Mechanism for Computer Application Majors Oriented to Artificial Intelligence Technology" (Grant No. 2025072869464).
Access restricted. Please log in or start a trial to view this content.
| Name | Company | Catalog Number | Comments |
|---|---|---|---|
| h5py (SSD) | HDF Group | 2.10.0 | |
| matplotlib (SSD) | Matplotlib Community | 3.1.2 | |
| matplotlib (YOLOv10) | Matplotlib Community | 3.9.0 | |
| matplotlib (YOLOv5) | Matplotlib Community | 3.8.4 | |
| matplotlib (YOLOv5+SAHI) | Matplotlib Community | 3.8.4 | |
| matplotlib (YOLOv8-Seg) | Matplotlib Community | 3.9.0 | |
| numpy (SSD) | NumPy Community | 1.17.0 | |
| numpy (YOLOv10) | NumPy Community | 1.26.3 | |
| numpy (YOLOv5) | NumPy Community | 1.26.4 | |
| numpy (YOLOv5+SAHI) | NumPy Community | 1.26.4 | |
| numpy (YOLOv8-Seg) | NumPy Community | 1.26.3 | |
| onnx (YOLOv10) | ONNX | 1.14.0 | |
| onnx (YOLOv5) | ONNX | 1.14.0 | |
| onnx (YOLOv5+SAHI) | ONNX | 1.14.0 | |
| onnxruntime (YOLOv10) | Microsoft | 1.15.1 | |
| onnxruntime (YOLOv5) | Microsoft | 1.15.1 | |
| onnxruntime (YOLOv5+SAHI) | Microsoft | 1.15.1 | |
| opencv-python (SSD) | OpenCV | 4.1.2.30 | |
| opencv-python (YOLOv10) | OpenCV | 4.9.0.80 | |
| opencv-python (YOLOv5) | OpenCV | 4.9.0.80 | |
| opencv-python (YOLOv5+SAHI) | OpenCV | 4.9.0.80 | |
| opencv-python (YOLOv8-Seg) | OpenCV | 4.9.0.80 | |
| pandas (YOLOv10) | Pandas Community | 2.2.2 | |
| pandas (YOLOv5) | Pandas Community | 2.2.2 | |
| pandas (YOLOv5+SAHI) | Pandas Community | 2.2.2 | |
| pandas (YOLOv8-Seg) | Pandas Community | 2.2.2 | |
| Pillow (SSD) | Pillow Developers | 8.2.0 | |
| Pillow (YOLOv10) | Pillow Developers | 10.2.0 | |
| Pillow (YOLOv5) | Pillow Developers | 8.5.0 | |
| Pillow (YOLOv5+SAHI) | Pillow Developers | 8.5.0 | |
| Pillow (YOLOv8-Seg) | Pillow Developers | 10.2.0 | |
| psutil (YOLOv10) | Psutil Developers | 5.9.8 | |
| psutil (YOLOv5) | Psutil Developers | 5.9.8 | |
| psutil (YOLOv5+SAHI) | Psutil Developers | 5.9.8 | |
| pycocotools (YOLOv10) | COCO Consortium | 2.0.7 | |
| pycocotools (YOLOv5) | COCO Consortium | 2.0.7 | |
| pycocotools (YOLOv5+SAHI) | COCO Consortium | 2.0.7 | |
| pycocotools (YOLOv8-Seg) | COCO Consortium | 2.0.7 | |
| py-cpuinfo (YOLOv10) | Py-CPUInfo Developers | 9.0.0 | |
| py-cpuinfo (YOLOv5) | Py-CPUInfo Developers | 9.0.0 | |
| py-cpuinfo (YOLOv5+SAHI) | Py-CPUInfo Developers | 9.0.0 | |
| PyYAML (YOLOv10) | PyYAML | 6.0.1 | |
| PyYAML (YOLOv5) | PyYAML | 6.0.1 | |
| PyYAML (YOLOv5+SAHI) | PyYAML | 6.0.1 | |
| PyYAML (YOLOv8-Seg) | PyYAML | 6.0.1 | |
| requests (SSD) | Python Requests | 2.27.1 | |
| requests (YOLOv10) | Python Requests | 2.32.3 | |
| requests (YOLOv5) | Python Requests | 2.31.0 | |
| requests (YOLOv5+SAHI) | Python Requests | 2.31.0 | |
| SAHI | SAHI Developers | 0.3.4+ | |
| scipy (SSD) | SciPy Community | 1.2.1 | |
| scipy (YOLOv10) | SciPy Community | 1.13.0 | |
| scipy (YOLOv5) | SciPy Community | 1.13.0 | |
| scipy (YOLOv5+SAHI) | SciPy Community | 1.13.0 | |
| scipy (YOLOv8-Seg) | SciPy Community | 1.13.0 | |
| seaborn (YOLOv10) | Seaborn Developers | 0.13.2 | |
| seaborn (YOLOv5) | Seaborn Developers | 0.13.2 | |
| seaborn (YOLOv5+SAHI) | Seaborn Developers | 0.13.2 | |
| seaborn (YOLOv8-Seg) | Seaborn Developers | 0.13.2 | |
| shapely (YOLOv5+SAHI) | Shapely Developers | 2.0.4 | |
| SSD | Caffe/Original SSD Authors | Python 3.6.13+; PyTorch 1.2.0+; CUDA 10.0; CUDNN 7.4.1 | |
| tensorboard (SSD) | 2.10.1 | ||
| tensorboard (YOLOv5) | 2.16.2 | ||
| tensorboard (YOLOv5+SAHI) | 2.16.2 | ||
| torchvision (SSD) | PyTorch | 0.4.0 | |
| torchvision (YOLOv10) | PyTorch | 0.15.2 | |
| torchvision (YOLOv5) | PyTorch | 0.17.2 | |
| torchvision (YOLOv5+SAHI) | PyTorch | 0.17.2 | |
| torchvision (YOLOv8-Seg) | PyTorch | 0.16.1+ | |
| tqdm (SSD) | TQDM Developers | 4.60.0 | |
| tqdm (YOLOv10) | TQDM Developers | 4.66.4 | |
| tqdm (YOLOv5) | TQDM Developers | 4.66.2 | |
| tqdm (YOLOv5+SAHI) | TQDM Developers | 4.66.2 | |
| ultralytics (YOLOv8-Seg) | Ultralytics | 8.2.99+ | |
| YOLOv10 | YOLOv10 Team | Python 3.8.0+; PyTorch 2.0.1+cu118; CUDA 11.8; CUDNN 8.7 | |
| YOLOv5 | Ultralytics | Python 3.8.0+; PyTorch 2.2.2+; CUDA 11.2; CUDNN 8.1.2 | |
| YOLOv5 + SAHI | Ultralytics + SAHI Developers | Python 3.8.0+; PyTorch 2.2.2+; CUDA 11.2; CUDNN 8.1.2 | |
| YOLOv8-Seg | Ultralytics | Python 3.8.0+; PyTorch 2.0.1+cu118; CUDA 11.8; CUDNN 8.6.0+ |
Access restricted. Please log in or start a trial to view this content.
Request permission to reuse the text or figures of this JoVE article
Request Permission