Electric vehicle identification system and method based on machine vision

By improving the YOLOv8 model, combining DCNv3 and Bi-Level Routing Attention, and combining AUGMIX image enhancement algorithm, the problem of low recognition efficiency of electric vehicles in the elevator is solved, efficient and accurate recognition of electric vehicles is achieved, and the misdiagnosis rate is reduced. It is suitable for elevators Real-time detection of the car.

CN118941922APending Publication Date: 2024-11-12NANJING SPECIAL EQUIP SAFETY SUPERVISION & INSPECTION INST
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411070749.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The existing electric vehicle identification methods in the elevator are inefficient, making it difficult to meet the detection needs of diverse electric vehicle types and shading situations, and there are missed detection and safety hazards.

Method used

The improved YOLOv8 model is adopted, combined with the variability convolutional network operator DCNv3 and the dynamic sparse attention mechanism Bi-Level Routing Attention, and combined with the AUGMIX image enhancement algorithm, real-time and efficient identification of electric vehicles in the elevator car is achieved.

Benefits of technology

It improves the accuracy and robustness of electric vehicle detection, reduces the misdiagnosis rate, is suitable for real-time systems with limited resources, and enhances detection capabilities in different environments and scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118941922A_ABST
    Figure CN118941922A_ABST
Patent Text Reader

Abstract

The invention discloses an electric vehicle identification system and method based on machine vision. The system comprises a data acquisition module, a data preprocessing module, an image enhancement module, an identification module and an output unit. The data acquisition module comprises a camera, and the camera is arranged in an elevator car and used for acquiring image data in the elevator car. And the image enhancement module is deployed with an AUGMIX image enhancement algorithm and is used for carrying out image enhancement processing on the preprocessed data. The identification module is provided with an improved YOLOv8 model and is used for identifying the electric vehicle in the image data; the improvement on the YOLOv8 model comprises the following steps: combining a variable convolutional network operator DCNv3 with a C2F module in the YOLOv8 model; and a dynamic sparse attention mechanism is introduced into the YOLOv8 model. The method has the advantages that the electric vehicle in the elevator car can be efficiently recognized in real time, and the elevator can be managed and controlled more safely.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of elevator safety technology, and in particular to an electric vehicle identification system and method based on machine vision. Background Art

[0002] When electric vehicles enter the elevator car, they not only occupy the passenger space, but also produce a large amount of flames and high-temperature toxic gases once they spontaneously combust, filling the entire car in a short time, making it difficult for people to evacuate and escape; in addition, if the electric vehicles are not operated properly when entering and exiting the car, it is easy to cause the floor car door to collide and derail, or the car to collide and deform, creating safety hazards and shortening the service life of the elevator. Therefore, there is a great safety hazard when electric vehicles enter the elevator car.

[0003] At present, there are three main ways to identify electric vehicles in elevators: manual monitoring and identification, physical blocking and visual identification. Manual monitoring and identification is that the property staff monitors the passengers in the car through cameras, and reminds the electric vehicle to exit the car through voice when an electric vehicle enters the car. Physical blocking is to set up blocking railings at the entrance and inner wall of the car. Visual recognition is to collect and analyze video data through the camera in the car, and identify it through computer vision technology. Manual monitoring and identification consumes a lot of manpower and material resources, and requires uninterrupted monitoring by relevant personnel. It is inefficient and cannot stop the behavior of electric vehicles entering the car in time. The physical blocking method not only blocks electric vehicles, but also restricts the entry of tools such as wheelchairs and baby carriages. It is easy to cause tripping, falling and trampling accidents in places with large traffic. Visual recognition is an electric vehicle detection system based on a machine vision system. It detects according to camera data information, collects electric vehicle image information, and performs algorithm matching to achieve electric vehicle detection. It has the advantages of high precision and rapid response, and has broad application prospects.

[0004] However, due to the wide variety of electric vehicles on the market, their various shapes, and the fact that they are easily partially blocked by people in elevators, conventional visual inspection methods are prone to missed detections, and the inspection efficiency of electric vehicles is low, making it difficult to meet the application needs of real-world scenarios. Summary of the invention

[0005] The present application provides an electric vehicle identification system and method based on machine vision, which has the advantage of being able to efficiently identify electric vehicles in an elevator car in real time, which is conducive to safer management and control of the elevator.

[0006] On the one hand, the present invention provides an electric vehicle identification system based on machine vision, characterized in that it includes:

[0007] A data acquisition module, the data acquisition module includes a camera, and the camera is arranged in the elevator car to collect image data in the elevator car;

[0008] A recognition module, wherein the recognition module is deployed with an improved YOLOv8 model for identifying electric vehicles in image data; the improvements to the YOLOv8 model include: combining the variable convolutional network operator DCNv3 with the C2F module in the YOLOv8 model; and introducing a dynamic sparse attention mechanism Bi-Level Routing Attention in the YOLOv8 model;

[0009] And an output unit, used for outputting the detection result of the recognition module.

[0010] Furthermore, the output unit includes a switch output module, and the switch output module is connected to the elevator control system.

[0011] Furthermore, the output unit includes a display unit for visually displaying the recognition result.

[0012] Furthermore, it also includes a data preprocessing module for preprocessing the image data obtained by the data acquisition module, and the preprocessing includes grayscale, geometric transformation, and normalization.

[0013] Furthermore, it also includes an image enhancement module, which deploys an AUGMIX image enhancement algorithm for performing image enhancement processing on the preprocessed data.

[0014] On the other hand, the present application provides an electric vehicle identification method based on machine vision, characterized in that it includes the following steps:

[0015] S1: Acquire image data inside the elevator car;

[0016] S2: Improve the YOLOv8 model. The improvements to the YOLOv8 model include: combining the variable convolutional network operator DCNv3 with the C2F module in the YOLOv8 model; introducing the dynamic sparse attention mechanism Bi-Level Routing Attention in the YOLOv8 model;

[0017] S3: Train the improved YOLOv8 model;

[0018] S4: Input the image data obtained in step S1 into the trained improved YOLOv8 model to identify and mark the electric vehicles in the image data.

[0019] Furthermore, step S1 also includes: preprocessing the obtained image data, performing image enhancement processing on the preprocessed data, and the image enhancement processing adopts AUGMIX image enhancement algorithm.

[0020] Furthermore, in the improvement of the YOLOv8 model in step S2, the C2F module is combined with the deformable convolutional network operator DCNv3 into a C2F_DCNv3 module, replacing the C2F module of the neck network in the YOLOv8 model.

[0021] Furthermore, in the improvement of the YOLOv8 model in step S2, in the dynamic sparse attention mechanism, for a given two-dimensional input feature map X∈R H×W×C , first divide it into S×S non-overlapping regions, so that each region contains feature vectors; then the Q, K, and V tensors are obtained through linear mapping:

[0022] Q=X r W q ,K=X r W k ,V=X r W v

[0023] Then, the region-to-region attention relationships are associated through a directed graph. First, the region-level Q is derived by applying the per-region average on Q and K respectively. r , Secondly, through Q r and transpose K r The matrix multiplication between them derives the adjacency matrix of the region-to-region affinity graph

[0024] A r =Q r (K r ) T

[0025] Adjacency Matrix A r The entries in measure the semantic relevance of two regions; by retaining only the top k most closely related regions for each region, is a routing index matrix with row-by-row topk operators:

[0026] I r =topkIndex(A r )

[0027] Line i r Contains the indices of the k most relevant regions for the ith region;

[0028] For each Q in region i, it will focus on r (i,1) , I r (i,2) ,…,I r (i,k)The index is the k most concerned routing areas, and gather all K and V in these k areas; therefore, first collect the K and V tensors:

[0029] K g =gather(K,I r ),V g =gather(V,I r )

[0030] Where K g , Then, attention is applied to the collected K g , V g :

[0031] O=Attention(Q,K g ,V g )+LCE(V)

[0032] A local context enhancement term LCE(V) is introduced, and the function LCE(·) is parameterized using depthwise convolution.

[0033] Furthermore, the method further comprises step S5: after it is identified in step S4 that there is an electric car in the elevator, the elevator is controlled to stop running, and the identification result is visually displayed.

[0034] In summary, the beneficial effects of this application are:

[0035] 1. This application uses an improved YOLOv8 model to identify electric vehicles in elevator cars, which has a higher detection effect.

[0036] 2. This application uses the AUGMIX method to perform image enhancement. By introducing a variety of image changes, such as rotation, shearing, and color transformation, AUGMIX improves the generalization performance of the deep learning model, reduces the risk of overfitting, and enhances the robustness of the model for detecting elevator car electric vehicles in different environments and scenarios. In addition, AUGMIX also effectively expands the training data set, providing more samples to train the model, which is particularly suitable for situations where the amount of data is limited, such as elevator cars.

[0037] 3. Compared with the traditional license plate detection method, this application adopts end-to-end detection (i.e., a one-stage method of direct detection in one-stage monitoring), which can simultaneously detect and locate objects, maintaining high efficiency and directness; its high real-time performance makes it suitable for scenes with high speed requirements; multi-scale detection strategy enhances the robustness on targets of different sizes; powerful feature learning improves the accuracy of detection through deep neural networks; end-to-end training simplifies system design and improves generalization ability. These features enable YOLOv8 to have more accurate detection effects on elevator car electric vehicles and reduce the misdiagnosis rate.

[0038] 4. This application uses the deformable convolutional network operator (DCNv3) and dynamic sparse attention (Bi-Level Routing Attention) to improve the YOLOv8 model. The deformable convolution layer in the deformable convolutional network (DCNv3) allows the model to adaptively adjust the receptive field during the learning process to adapt to the shape and structure of the target object. Dynamic sparse attention (Bi-Level Routing Attention) is a new type of attention mechanism. The main idea is to use two levels of routing to achieve dynamic sparse processing of input. The two-level routing attention mechanism first realizes sparsity at the module level, and then realizes sparsity again within the module, thereby greatly reducing the computational complexity while maintaining the model performance. It is particularly suitable for real-time systems and resource-limited environments, and is therefore particularly suitable for elevator car electric vehicle detection environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 is a schematic diagram of the overall structure of an electric vehicle identification system based on machine vision in one embodiment of the present application;

[0040] Figure 2 It is a calculation architecture diagram of the improved YOLOv8 model in one embodiment of the present application;

[0041] Figure 3 is a schematic diagram of a confusion matrix of electric vehicle detection accuracy in one embodiment of the present application;

[0042] Figure 4 is a diagram of aspect ratio analysis of a data set in one embodiment of the present application;

[0043] Figure 5 It is a curve diagram of model training and validation set iteration in one embodiment of the present application;

[0044] Figure 6 This is an electric vehicle detection effect diagram in one embodiment of the present application;

[0045] Figure 7 This is a comparison chart of the detection efficiency before and after the improvement of the YOLOv8 model in one embodiment of the present application;

[0046] Figure 8 It is an overall framework diagram of an electric vehicle identification system based on machine vision in one embodiment of the present application. DETAILED DESCRIPTION

[0047] The specific implementation of the present application is described in detail below with reference to the accompanying drawings.

[0048] In a specific embodiment of the present application, a system for identifying electric vehicles based on machine vision is provided. Figure 1As shown, it includes a data acquisition module, a data preprocessing module, an image enhancement module, a recognition module and an output unit.

[0049] The data acquisition module includes a camera, which is arranged in the elevator car and is used to collect image data in the elevator car.

[0050] The data preprocessing module is used to preprocess the image data obtained by the data acquisition module, and the preprocessing includes grayscale conversion, geometric transformation, and normalization.

[0051] The image enhancement module deploys the AUGMIX image enhancement algorithm to perform image enhancement processing on the preprocessed data.

[0052] The recognition module is deployed with an improved YOLOv8 model for identifying electric vehicles in image data; the improvements to the YOLOv8 model include: combining the variable convolutional network operator DCNv3 with the C2F module in the YOLOv8 model; and introducing a dynamic sparse attention mechanism Bi-Level Routing Attention in the YOLOv8 model.

[0053] The output unit is used to output the detection result of the recognition module. The output unit includes a switch output module and a display unit, and the switch output module is connected to the elevator control system. The display unit is used to visually display the recognition result.

[0054] In this embodiment, the recognition module is a Raspberry Pi 5B unit processor, which is deployed with an improved YOLOv8 model. The improved YOLOv8 algorithm is run in the Raspberry Pi to realize real-time processing of the data collected by the camera. Figure 8 As shown in the figure, the elevator operates normally when no electric vehicle is found to enter the car. If an abnormal situation of an electric vehicle entering the elevator car is found, it will be fed back to the elevator control system in real time to control the elevator to stop running, and the detected abnormal information will be sent to the terminal for visual display, thereby realizing real-time monitoring and alarm processing of electric vehicles in the car.

[0055] In another specific embodiment of the present application, a method for identifying an electric vehicle based on machine vision is provided, comprising the following steps:

[0056] S1: Acquire image data inside the elevator car.

[0057] Step S1 also includes: preprocessing the acquired image data, performing image enhancement processing on the preprocessed data, and the image enhancement processing adopts AUGMIX image enhancement algorithm.

[0058] S2: Improve the YOLOv8 model. The improvements to the YOLOv8 model include: combining the variable convolutional network operator DCNv3 with the C2F module in the YOLOv8 model; introducing the dynamic sparse attention mechanism Bi-Level Routing Attention in the YOLOv8 model.

[0059] YOLOv8 is an efficient single-step target detection model that can realize complex target detection and positioning functions, annotate multiple targets in the image frame, and obtain detection results. Among the machine vision technologies currently under research, the single-step method with the YOLO series as the core is of great application value in environments such as elevator cars. Compared with the two-step detection method, YOLOv8 extracts the feature map of the image at one time through a neural network, and directly infers the position and category of the anchor frame based on this. Compared with the two-step method, the single-step detection process is faster, especially in real-time applications that require fast response.

[0060] YOLO v8 consists of four parts: input, backbone, neck, and prediction. The detection head consists of three output layers, each responsible for detecting objects of different scales. The model uses the Mish activation function and makes predictions on bounding box coordinates, target category probabilities, and confidence scores, aiming to improve detection accuracy while maintaining real-time performance.

[0061] The backbone network structure is one of the main components of YOLO v8. The backbone network is mainly used to extract the feature information of the image. Compared with other algorithms in the same series, YOLOv8 uses the C2F (CrossStagePartial Network Bottleneck with 2Convolutions) module in the backbone network structure, which can effectively improve the network calculation speed while reducing the computational complexity. The bottleneck network part enhances the feature information extracted by the backbone network. The prediction network module mainly includes bounding box generation and loss function calculation.

[0062] The principle of the C2F module in the YOLOv8 model is as follows. After the C2F technology processes the input features through the Conv module, the Split function will split the processed features into two parts for independent processing by the subsequent two Bottleneck modules. The Split function is responsible for dividing the features according to specific rules to ensure that the neural network can perform tasks more effectively. In the Bottleneck module, after a series of convolution and pooling operations, the module will weightedly superimpose the features of each stage, which enables the neural network to capture deeper and more comprehensive feature information. Enhance the feature expression ability and anti-interference ability of the ANN. Improve the training and extraction of image feature information. At the same time, the Bottleneck module can also reduce the dimensionality of the image, thereby reducing the computational complexity of the ANN while retaining the effective features.

[0063] This embodiment improves the C2F module in combination with the deformable convolutional network (DCNv3).

[0064] Deformable Convolutional Networks (DCNs) are an extension of a class of convolutional neural networks (CNNs) that introduces deformable convolutional layers, allowing the network to better adapt to geometric and shape changes in images. This type of network is particularly suitable for handling non-rigid deformations in images, such as posture changes, perspective changes, or deformations inside objects.

[0065] In traditional convolutional layers, the kernels slide in a fixed manner over the input feature map, which means that their spatial sampling positions are fixed. However, this fixed sampling may not capture all the useful information in the image, especially when the input data contains deformations. Deformable convolution changes this fixed sampling approach by adding an additional learnable offset to the standard convolution. This allows the kernel to adaptively adjust its sampling position to better align with the actual content of the input features.

[0066] This embodiment uses the latest DCNv3 to integrate the C2F module. DCNv3 has the following three advantages.

[0067] In the optimization of the deep deformable convolutional network (DCNv2), by introducing a strategy of shared projection weights, position-independent weights are used instead of independent projection weights, thereby effectively reducing parameter and memory complexity. In addition, a multi-group mechanism is adopted to divide the spatial aggregation process into different groups, each with an independent sampling offset to improve feature diversity. In order to alleviate the instability problem when the model capacity is expanded, Softmax normalization of each sampling point is adopted as the normalization mode, which not only improves the training stability of large-scale models, but also constructs the connection relationship between all sampling points. These improvements are collectively aimed at improving model efficiency, reducing the number of parameters, enhancing feature diversity, and improving the robustness of model training. The formula is shown below

[0068]

[0069] Among them, p0 is the reference point of the convolution kernel position; G is the total number of aggregation groups. For the g-th group, w g ∈R C×C′ Represents the location-irrelevant projection weights of the group, where C'=C / G represents the group dimension. gk ∈R represents the modulation scalar of the k-th sample point in the g-th group, normalized by the softmax function along the k-th dimension. g ∈R C′×H×W Represents the input feature map after slicing. Δp gk is the sampling position p of the g-th group of networks k The corresponding offset.

[0070] like Figure 2 As shown in the figure, in the improvement of the YOLOv8 model, the C2F module is fused with the deformable convolutional network operator DCNv3 into the C2F_DCNv3 module, replacing the C2F module of the neck network in the YOLOv8 model.

[0071] In the improvement of the YOLOv8 model, in the dynamic sparse attention mechanism, for a given two-dimensional input feature map X∈R H×W×C , H is the height of the image or feature map, W is the width of the image or feature map, and C is the number of channels, indicating the number of depth or color channels in the image or feature map.

[0072] First, it is divided into S×S non-overlapping regions, so that each region contains feature vectors, this step is transformed into to complete; then the Q, K, V tensors are obtained through linear mapping:

[0073] Q=Xr W q ,K=X r W k ,V=X r W v

[0074] Among them, Q (Query) is the query vector, which is the component used in the attention mechanism to interact with other vectors (keys and values). K (Key) is the key vector, which is used to match the query vector and determine the importance of each value. V (Value) is the value vector, which is used to calculate the actual content of the output after the attention weights have been determined. The superscript r represents the regional average.

[0075] Then, the region-to-region attention relationships are associated through a directed graph. First, the region-level Q is derived by applying the per-region average on Q and K respectively. r , Secondly, through Q r and transpose K r The matrix multiplication between them derives the adjacency matrix of the region-to-region affinity graph

[0076] A r =Q r (K r ) T

[0077] Q r The region-level query vector is obtained by averaging the elements of each region in Q. Adjacency matrix A r The entries in measure the semantic relevance of two regions; by retaining only the top k most closely related regions for each region, is a routing index matrix with row-by-row topk operators:

[0078] I r =topkIndex(A r )

[0079] Line i r Contains the indices of the k most relevant regions of the i-th region; with the region-to-region routing index matrix I r , the least relevant tokens are filtered out at a coarse-grained level, so we can apply fine-grained token-to-token attention.

[0080] For each Q in region i, it will focus on r (i,1) , I r (i,2) ,…,I r (i,k)The index is the k most concerned routing areas, and gather all K and V in these k areas; therefore, first collect the K and V tensors:

[0081] K g =gather(K,I r ), V g =gather(V,I r )

[0082] Among them, the superscript g represents the subset after the gather operation, such as K g represents the filtered key vector subset. K g , Then, attention is applied to the collected K g , V g :

[0083] O=Attention(Q,K g ,V g )+LCE(V)

[0084] A local context enhancement term LCE(V) is introduced, and the function LCE(·) is parameterized using depthwise convolution. The convolution kernel size is selected based on the actual situation.

[0085] S3: Train the improved YOLOv8 model; conduct experimental tests on the relevant data of the collected image dataset, select the most common recognition targets in the elevator car for testing, and divide the dataset into training set, validation set and test set in a ratio of 6:1:1.

[0086] S4: Input the image data obtained in step S1 into the trained improved YOLOv8 model to identify and mark the electric vehicles in the image data.

[0087] Step S5: After the electric vehicle is identified in step S4, the elevator is controlled to stop running, and the identification result is visualized.

[0088] In a specific application scenario, 9,000 on-site photos were used to test the improved model proposed in this embodiment. The most common recognition targets in the elevator car were selected for testing, and the data set was divided into a training set, a validation set, and a test set at a ratio of 6:1:1. The number of training iterations was 20, the initial learning rate was set to 0.001, the optimizer used Adam, the momentum parameter value was 0.8, and the confidence threshold was 0.5. The mean average precision (MAP), accuracy (Precision), recall (Recall) and single detection accuracy were selected as evaluation indicators. The photos included electric vehicles, passengers, bicycles, and the electric vehicle detection accuracy confusion matrix is ​​as follows Figure 3 As shown, the aspect ratio analysis diagram of the data set is as follows Figure 4 As shown, the model training and validation set iteration curves are as follows Figure 5 The test results are shown in Figure 6 shown.

[0089] like Figure 7 It can be seen that for the comparison of elevator car detection accuracy of electric vehicles, passengers, and bicycles, the mean average precision (MAP), accuracy (Precision), recall (Recall) and single detection accuracy are selected as evaluation indicators to evaluate the effectiveness and application value of the detection model. Among them, YOLOv8 is the basic algorithm to be improved, the YOLOv8-C2F_DCNV3 algorithm model represents the addition of the fused module C2F_DCNV3 on the basis of the YOLOv8 algorithm, the YOLOv8-BRA algorithm model represents the addition of the dynamic sparse attention mechanism BRA in the YOLOv8 algorithm, and the AUGMIX-YOLOv8-org algorithm model represents the addition of the fused module C2F_DCNV3 and the dynamic sparse attention mechanism BRA in the YOLOv8 algorithm. As shown in the figure, the improved electric vehicle detection algorithm has an electric vehicle detection rate of 95.8% and a passenger detection accuracy of 95.2%. While reducing the amount of calculation, it also reduces the probability of bicycle misdetection, and this improvement will continue to expand with the increase in the number of random elevators.

[0090] This application has superior accuracy compared to existing license plate detection methods. It also improves the problem of electric vehicles entering elevator cars, using the DNCV3 operator and dynamic sparse attention method to make the model lighter, more accurate, and more suitable for elevator car application scenarios.

[0091] The above is only a preferred implementation of the present application. It should be pointed out that a person skilled in the art can make several modifications and improvements without departing from the inventive concept of the present application, and these all fall within the scope of protection of the present application.

Claims

1. An electric vehicle recognition system based on machine vision, characterized in that: include: A data acquisition module, the data acquisition module includes a camera, and the camera is arranged in the elevator car to collect image data in the elevator car; A recognition module, wherein the recognition module is deployed with an improved YOLOv8 model for identifying electric vehicles in image data; Improvements to the YOLOv8 model include: combining the variable convolutional network operator DCNv3 with the C2F module in the YOLOv8 model; introducing the dynamic sparse attention mechanism Bi-Level Routing Attention in the YOLOv8 model; And an output unit, used for outputting the detection result of the recognition module.

2. The electric vehicle identification system based on machine vision according to claim 1 is characterized in that: The output unit comprises a switch output module, and the switch output module is connected to the elevator control system.

3. The electric vehicle identification system based on machine vision according to claim 1, characterized in that: The output unit includes a display unit for visually displaying the recognition result.

4. The electric vehicle identification system based on machine vision according to claim 1, characterized in that: It also includes a data preprocessing module for preprocessing the image data obtained by the data acquisition module, and the preprocessing includes grayscale, geometric transformation, and normalization.

5. The electric vehicle identification system based on machine vision according to claim 4 is characterized in that: It also includes an image enhancement module, which deploys an AUGMIX image enhancement algorithm for performing image enhancement processing on the preprocessed data.

6. A method for identifying electric vehicles based on machine vision, characterized in that: The following steps are involved: S1: Acquire image data inside the elevator car; S2: Improve the YOLOv8 model. The improvements to the YOLOv8 model include: combining the variable convolutional network operator DCNv3 with the C2F module in the YOLOv8 model; introducing the dynamic sparse attention mechanism Bi-Level Routing Attention in the YOLOv8 model; S3: Train the improved YOLOv8 model; S4: Input the image data obtained in step S1 into the trained improved YOLOv8 model to identify and mark the electric vehicles in the image data.

7. The electric vehicle identification method based on machine vision according to claim 1, characterized in that: Step S1 also includes: preprocessing the acquired image data, performing image enhancement processing on the preprocessed data, and the image enhancement processing adopts AUGMIX image enhancement algorithm.

8. The electric vehicle identification method based on machine vision according to claim 1, characterized in that: In the improvement of the YOLOv8 model in step S2, the C2F module is combined with the deformable convolutional network operator DCNv3 into a C2F_DCNv3 module, replacing the C2F module of the neck network in the YOLOv8 model.

9. The electric vehicle identification method based on machine vision according to claim 1, characterized in that: In the improvement of the YOLOv8 model in step S2, in the dynamic sparse attention mechanism, for a given two-dimensional input feature map X∈R H×W×C , first divide it into S×S non-overlapping regions, so that each region contains feature vectors; then the Q, K, and V tensors are obtained through linear mapping: Q=X r W q ,K=X r W k ,V=X r W v Then, the region-to-region attention relationships are associated through a directed graph. First, the region-level Q is derived by applying the per-region average on Q and K respectively. r , Secondly, through Q r and transpose K r The matrix multiplication between them derives the adjacency matrix of the region-to-region affinity graph A r =Q r (K r ) T Adjacency Matrix A r The entries in measure the semantic relevance of two regions; by retaining only the top k most closely related regions for each region, is a routing index matrix with row-by-row topk operators: I r =topkIndex(A r ) Line i r Contains the indices of the k most relevant regions for the ith region; For each Q in region i, it will focus on r (i,1) , I r (i,2) ,…,I r (i,k) The index is the k most concerned routing areas, and gather all K and V in these k areas; therefore, first collect the K and V tensors: K g =gather(K,I r ),V g =gather(V,I r ) in Then, attention is applied to the collected K g , V g : O=Attention(Q,K g ,V g )+LCE(V) A local context enhancement term LCE(V) is introduced, and the function LCE(·) is parameterized using depthwise convolution.

10. The electric vehicle identification method based on machine vision according to claim 1, characterized in that: The method further comprises step S5: after it is identified in step S4 that there is an electric car in the elevator, the elevator is controlled to stop running, and the identification result is visually displayed.

Citation Information

Cited By

  • Airport bird repelling detection method based on multi-sensor fusion

    CN120009877A