A method, device, equipment and storage medium for identifying passengers on a motorcycle

By collecting images by monitoring equipment and applying contour edge and head detection algorithms, we automatically identify people on motorcycles, solving the problem of low manual recognition efficiency in the prior art, and achieving automated recognition and accuracy improvement.

CN112395976BActive Publication Date: 2024-11-12HANGZHOU HIKVISION SYST TECH CO LTD

Patent Information

Application Number
CN202011284772.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-17
Publication Date
2024-11-12
Estimated Expiration
2040-11-17

AI Technical Summary

Technical Problem

In the prior art, the identification of motorcycle manned people mainly relies on labor, resulting in large labor costs and low efficiency.

Method used

By obtaining the surveillance images collected by the monitoring equipment, identifying the motorcycle and determining the number of people based on the acquisition direction type, and using contour edge recognition and head detection algorithms to automatically identify the motorcycle's people.

Benefits of technology

Automatic recognition of motorcycle manned vehicles is realized, reducing labor consumption, improving recognition efficiency and accuracy, and adapting to image processing modes in different acquisition directions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112395976B_ABST
    Figure CN112395976B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method, device, equipment and storage medium for identifying passengers on a motorcycle. The method includes: obtaining a monitoring image collected by a monitoring device; identifying a motorcycle in the monitoring image; and determining the number of passengers on the motorcycle in the monitoring image according to the type of the direction in which the monitoring device collects the monitoring image. It can be seen that in this solution, the number of passengers on the motorcycle can be automatically determined, and automatic identification of passengers on the motorcycle is achieved. There is no need to rely on traffic police or traffic coordinators to manually identify the situation of passengers on the motorcycle, which reduces manpower consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to a method, device, equipment and storage medium for identifying a person on a motorcycle. Background Art

[0002] A motorcycle is a two-wheeled vehicle that is powered by a fuel engine and steers the front wheel with a handlebar. Motorcycles travel at high speeds, and there are certain safety risks in using motorcycles to carry passengers. Some regions have formulated relevant management measures for the situation of motorcycles carrying passengers. For example, in road traffic scenes, motorcycles are not allowed to carry passengers, or the number of riders on a motorcycle cannot exceed two, etc.

[0003] At present, it is usually necessary to rely on traffic police or traffic coordinators to manually identify whether motorcycles are carrying passengers, which consumes a lot of manpower. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a method, device, equipment and storage medium for automatically identifying passengers on a motorcycle to reduce manpower consumption.

[0005] To achieve the above object, an embodiment of the present invention provides a method for identifying a person on a motorcycle, comprising:

[0006] Acquire monitoring images collected by monitoring equipment;

[0007] Identifying a motorcycle in the surveillance image;

[0008] The number of passengers on the motorcycle in the monitoring image is determined according to the type of the acquisition direction of the monitoring image by the monitoring device.

[0009] Optionally, the identifying a motorcycle in the surveillance image includes:

[0010] Identify whether the passing target in the monitoring image is a two-wheeled vehicle and whether there is an exhaust pipe; if the passing target in the monitoring image is a two-wheeled vehicle and there is an exhaust pipe, determine that the passing target in the monitoring image is a motorcycle; or,

[0011] Identify whether the passing target in the monitoring image is a two-wheeled vehicle and whether it has a motorcycle license plate; if the passing target in the monitoring image is a two-wheeled vehicle and the license plate of the passing target is a motorcycle license plate, determine that the passing target in the monitoring image is a motorcycle.

[0012] Optionally, determining the number of passengers on the motorcycle in the surveillance image according to the type of the acquisition direction of the surveillance image by the surveillance device includes:

[0013] If the type of the acquisition direction of the monitoring image by the monitoring device is forward acquisition or backward acquisition, then in the monitoring image, identifying the outline edge of the person carried by the motorcycle;

[0014] The number of passengers on the motorcycle in the monitoring image is determined based on the number of identified contour edges.

[0015] Optionally, determining the number of passengers on the motorcycle in the surveillance image based on the number of identified contour edges includes:

[0016] Counting the number of identified contour edges as a first number;

[0017] Determine the number of ghost contour edges as a second number based on the spacing between the identified contour edges;

[0018] The number of passengers on the motorcycle in the monitoring image is determined based on the first number and the second number.

[0019] Optionally, determining the number of ghost contour edges as the second number based on the identified spacings between the contour edges includes:

[0020] For every two contour edges, determine a distance between the two contour edges as a first distance, and if the first distance is less than a second preset threshold, determine that the two contour edges are ghost contour edges;

[0021] If the first distance is not less than the second preset threshold, respectively identifying key points of a preset type associated with the two contour edges, and determining the distance between the key points of the same type associated with the two contour edges as the second distance; if the second distance is less than a third preset threshold, determining that the two contour edges are ghost contour edges;

[0022] The number of ghost contour edges is counted as the second number.

[0023] Optionally, the contour edges of the persons on the motorcycle include any one or more of the following: the contour edge of the head of each person on the motorcycle, the contour edge of the shoulder of each person on the motorcycle, the contour edge of the neck of each person on the motorcycle, and the contour edge of the legs of each person on the motorcycle.

[0024] Optionally, identifying the contour edge of the person carried by the motorcycle in the monitoring image includes:

[0025] In the monitoring image, respectively identifying the head and shoulder contour edges and leg contour edges of each person carried by the motorcycle;

[0026] The determining the number of passengers on the motorcycle in the monitoring image based on the number of identified contour edges includes:

[0027] If the number of the identified head and shoulder contour edges is the same as the number of the leg contour edges, then based on the same number, determining the number of passengers on the motorcycle in the monitoring image;

[0028] If the number of identified head and shoulder contour edges is different from the number of leg contour edges, the number of passengers on the motorcycle in the monitoring image is determined based on the larger number between the number of head and shoulder contour edges and the number of leg contour edges.

[0029] Optionally, if the type of the acquisition direction of the monitoring image by the monitoring device is lateral acquisition, the method further includes:

[0030] The number of people on the motorcycle in the monitoring image is determined by a head detection algorithm.

[0031] To achieve the above-mentioned purpose, an embodiment of the present invention further provides a motorcycle passenger recognition device, comprising:

[0032] An acquisition module is used to acquire monitoring images collected by monitoring equipment;

[0033] A recognition module, used for recognizing a motorcycle in the monitoring image;

[0034] The first determination module is used to determine the number of passengers on the motorcycle in the monitoring image according to the type of the acquisition direction of the monitoring image by the monitoring device.

[0035] To achieve the above object, an embodiment of the present invention further provides an electronic device, including a processor and a memory;

[0036] Memory, used to store computer programs;

[0037] The processor is used to implement any of the above-mentioned methods for identifying passengers on a motorcycle when executing the program stored in the memory.

[0038] To achieve the above objectives, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the above methods for identifying passengers on a motorcycle is implemented.

[0039] By using the embodiment of the present invention, a monitoring image collected by a monitoring device is obtained; a motorcycle in the monitoring image is identified; and the number of people on the motorcycle in the monitoring image is determined according to the type of the direction in which the monitoring device collects the monitoring image. It can be seen that in this solution, the number of people on the motorcycle can be automatically determined, and automatic identification of people on the motorcycle is achieved. There is no need to rely on traffic police or traffic coordinators to manually identify the situation of people on the motorcycle, which reduces manpower consumption.

[0040] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1 A schematic diagram of a first flow chart of a method for identifying a person on a motorcycle provided by an embodiment of the present invention;

[0043] Figure 2a A schematic diagram of a scenario provided by an embodiment of the present invention;

[0044] Figure 2b A monitoring image of a motorcycle collected in a forward direction by a monitoring device provided in an embodiment of the present invention;

[0045] Figure 2c A monitoring image of a motorcycle collected from the back by a monitoring device provided in an embodiment of the present invention;

[0046] Figure 2d A schematic diagram of the spacing of a contour edge provided by an embodiment of the present invention;

[0047] Figure 2e Another scenario schematic diagram provided for an embodiment of the present invention;

[0048] Figure 2f A schematic diagram of a monitoring image of a motorcycle collected from the side by a monitoring device provided in an embodiment of the present invention;

[0049] Figure 3 A second flow chart of the method for identifying a person on a motorcycle provided by an embodiment of the present invention;

[0050] Figure 4 A schematic diagram of the structure of a motorcycle passenger recognition device provided by an embodiment of the present invention;

[0051] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0053] In order to achieve the above-mentioned purpose, the embodiment of the present invention provides a method, device, equipment and storage medium for identifying passengers on a motorcycle. The method and device can be applied to various electronic devices, for example, a monitoring device with an image recognition function, or a background processing device connected to a monitoring device for communication, etc., without specific limitation. The following first introduces the method for identifying passengers on a motorcycle in detail. The various steps in the following method embodiments can be executed in a logical order, and the step numbers or the order in which the steps are introduced do not limit the execution order of the steps.

[0054] Figure 1 A first flow chart of a method for identifying a person on a motorcycle provided by an embodiment of the present invention includes:

[0055] S101: Acquire monitoring images collected by monitoring equipment.

[0056] For example, the monitoring equipment in the embodiment of the present invention can be monitoring equipment in road traffic scenes, such as gun cameras, ball cameras, snapshot cameras, etc., without specific limitation. In one case, the installation height of the monitoring equipment can be between 6-8m; the lateral monitoring range of a single sensor in the monitoring equipment can be no more than 3 lanes, and the longitudinal monitoring distance can be no more than 240m. The specific installation situation and monitoring range of the monitoring equipment are not limited.

[0057] The monitoring images collected by the monitoring equipment may be monitoring images collected for road traffic scenes, and the monitoring images may include pedestrians, bicycles, motorcycles, cars and other passing targets.

[0058] S102: Identify a motorcycle in the surveillance image.

[0059] For example, a passing target in the monitoring image may be identified first, and then it may be identified whether the passing target is a motorcycle. If yes, S103 is executed.

[0060] Passing targets can be understood as targets passing through road traffic scenes, such as pedestrians, bicycles, motorcycles, cars, etc. listed in the above content. Moving target recognition algorithms, such as frame difference method, optical flow method, background subtraction method and other algorithms, can be used to identify passing targets in monitoring images.

[0061] After identifying the passing target, it is necessary to further identify whether the passing target is a motorcycle. For example, in one embodiment, it can be identified whether the passing target in the monitoring image is a two-wheeled vehicle and whether there is an exhaust pipe; if the passing target in the monitoring image is a two-wheeled vehicle and there is an exhaust pipe, it is determined that the passing target in the monitoring image is a motorcycle.

[0062] For example, it is possible to first identify whether the passing target in the monitoring image is a two-wheeled vehicle; if it is a two-wheeled vehicle, then identify whether there is an exhaust pipe in the two-wheeled vehicle; if so, determine that the two-wheeled vehicle is a motorcycle. Alternatively, it is also possible to first identify whether there is an exhaust pipe in the passing target in the monitoring image; if so, then identify whether the passing target is a two-wheeled vehicle; if so, determine that the two-wheeled vehicle is a motorcycle.

[0063] It is understood that two-wheeled vehicles may include bicycles, electric bicycles, motorcycles, etc., but only motorcycles have exhaust pipes. Therefore, two-wheeled vehicles with exhaust pipes can be determined as motorcycles. The identification method of two-wheeled vehicles and exhaust pipes is not limited. For example, a neural network model for identifying two-wheeled vehicles can be pre-trained, and the neural network model is used to identify whether the passing target in the monitoring image is a two-wheeled vehicle. For another example, a neural network model for identifying vehicle exhaust pipes can be pre-trained, and the neural network model is used to identify whether there is an exhaust pipe in the vehicle in the monitoring image.

[0064] Alternatively, in another embodiment, it is possible to identify whether the passing target in the monitoring image is a two-wheeled vehicle and whether it has a motorcycle license plate; if the passing target in the monitoring image is a two-wheeled vehicle and whether the license plate of the passing target is a motorcycle license plate, it is determined that the passing target in the monitoring image is a motorcycle.

[0065] For example, it is possible to first identify whether the passing target in the monitoring image is a two-wheeled vehicle; if it is a two-wheeled vehicle, then identify whether the license plate of the two-wheeled vehicle is a motorcycle license plate; if it is a motorcycle license plate, determine that the two-wheeled vehicle is a motorcycle. Alternatively, it is also possible to first identify whether the license plate of the passing target in the monitoring image is a motorcycle license plate; if it is a motorcycle license plate, then identify whether the passing target is a two-wheeled vehicle; if it is a two-wheeled vehicle, determine that the two-wheeled vehicle is a motorcycle.

[0066] The style of a motorcycle license plate needs to meet relevant regulations, such as the color of the license plate, the number of digits and arrangement of the license plate number, etc., all need to meet specified standards. Therefore, based on this standard, it is possible to identify whether the license plate is a motorcycle license plate. In this embodiment, a two-wheeled vehicle with a motorcycle license plate is determined to be a motorcycle.

[0067] There is no limitation on the method for identifying license plates of two-wheeled vehicles and motorcycles. For example, a neural network model for identifying two-wheeled vehicles can be pre-trained, and the neural network model can be used to identify whether the passing target in the monitoring image is a two-wheeled vehicle. For another example, a neural network model for identifying license plates of motorcycles can be pre-trained, and the neural network model can be used to identify whether the license plate in the monitoring image is a motorcycle license plate.

[0068] S103: Determine the number of passengers on the motorcycle in the monitoring image according to the type of the acquisition direction of the monitoring image by the monitoring device.

[0069] In one implementation, S103 may include: determining a recognition mode for recognizing the surveillance image according to the type of the acquisition direction of the surveillance image by the surveillance device; and determining the number of passengers on the motorcycle in the surveillance image by using the recognition mode.

[0070] For example, the acquisition direction of the monitoring image by the monitoring device may include the following types: forward acquisition, rearward acquisition, lateral acquisition, etc. In this embodiment, if the acquisition direction of the monitoring image by the monitoring device is forward acquisition or rearward acquisition, the recognition mode for recognizing the monitoring image is determined to be the first recognition mode, and the number of passengers on the motorcycle in the monitoring image is determined using the first recognition mode; if the acquisition direction of the monitoring image by the monitoring device is lateral acquisition, the recognition mode for recognizing the monitoring image is determined to be the second recognition mode, and the number of passengers on the motorcycle in the monitoring image is determined using the second recognition mode.

[0071] The monitoring images of motorcycles collected by the monitoring equipment can be referred to Figure 2b As shown, the monitoring image of the motorcycle collected by the monitoring device facing away can be referred to Figure 2c As shown, reference Figure 2b and Figure 2c It can be seen that in the surveillance images collected in the forward and backward directions, there are occlusions between the people on the motorcycle. When determining the number of people on the motorcycle, the occlusion between the people needs to be considered. The first recognition mode is the recognition mode that takes the occlusion of people into consideration. The first recognition mode can be understood as a mode for recognizing the number of people on the surveillance images collected in the forward and backward directions, or as a recognition mode that takes the occlusion between people into consideration.

[0072] The monitoring images of the motorcycle collected from the side by the monitoring equipment can be referred to Figure 2f As shown, reference Figure 2fIt can be seen that in the surveillance image of the motorcycle collected from the side, there is little occlusion between the people on the motorcycle, or there is basically no occlusion between the people. The second recognition mode can be understood as a mode for recognizing the number of people on the motorcycle for the surveillance image collected from the side, or as a recognition mode that does not need to consider the occlusion between people.

[0073] It can be seen that in the embodiment shown in the present invention, the actual situation of images collected from different collection directions (occlusion between people) is taken into consideration, and different recognition modes are used for images collected from different collection directions. On the one hand, the accuracy of recognition can be improved, and on the other hand, a recognition mode that is more suitable for the image is selected, which can reasonably use computing resources. For example, the computational complexity of the second recognition mode can be lower than that of the first recognition mode. For monitoring images of motorcycles collected from the side, the second recognition mode with lower computational complexity can be selected, which can save computing resources; for monitoring images of motorcycles collected from the front and back, the first recognition mode with higher computational complexity can be selected, which can improve the accuracy of recognition.

[0074] In one example, the type of the direction in which the monitoring device collects the monitoring image can be determined according to the direction in which the monitoring device is installed. Figure 2a As shown in the figure, the monitoring equipment is set up in the following directions: to collect images of the motorcycle facing forward or backward. For the images of the motorcycle facing forward, please refer to Figure 2b As shown, the back-facing image of the motorcycle can be referenced Figure 2c As shown. For another example, refer to Figure 2e As shown in the figure, the monitoring equipment is installed in the direction of: collecting images from the side of the motorcycle. The images collected from the side of the motorcycle can be referred to Figure 2f shown.

[0075] In another example, the type of the acquisition direction of the monitoring image by the monitoring device is determined according to the angle between the driving direction of the motorcycle and the monitoring direction of the monitoring device.

[0076] In one case, the direction of travel of the motorcycle can be determined based on the direction of the lanes in the road.

[0077] For example, refer to Figure 2a As shown, the left side is a down lane. The motorcycle 1 can travel in the down lane according to the traffic direction of the down lane or according to the traffic signs in the down lane (such as Figure 2a The right side is the up lane, and motorcycle 2 is driving in the up lane. It can determine the direction of the motorcycle 1 according to the traffic direction of the up lane, or according to the traffic signs in the up lane (such as Figure 2a The driving direction of the motorcycle 2 is determined by using the arrow indicating the lane direction in the figure.

[0078] Alternatively, in another case, the driving track of the motorcycle can be obtained by target tracking, and the driving direction of the motorcycle can be determined based on the driving track. The specific method for determining the driving direction of the motorcycle is not limited.

[0079] In addition, the monitoring direction of the monitoring device can be determined in advance based on the installation conditions of the monitoring device.

[0080] For example, the angle between the straight line of the motorcycle's driving direction and the straight line of the monitoring direction of the monitoring device can be determined; if the angle is less than a first preset threshold, the recognition mode for identifying the monitoring image is determined to be the first recognition mode, and the first recognition mode is used to determine the number of passengers on the motorcycle in the monitoring image; if the angle is not less than the first preset threshold, the recognition mode for identifying the monitoring image is determined to be the second recognition mode, and the second recognition mode is used to determine the number of passengers on the motorcycle in the monitoring image.

[0081] The specific value of the first preset threshold is not limited, for example, it can be 10 degrees, 20 degrees, 30 degrees, etc., and will not be listed one by one.

[0082] Generally speaking, if the monitoring device collects monitoring images of a motorcycle from the front or from the back, the straight line where the motorcycle's traveling direction is located is parallel to the straight line where the monitoring direction of the monitoring device is located, or the angle between them is small; if the monitoring device collects monitoring images of the motorcycle from the side, the straight line where the motorcycle's traveling direction is located is parallel to the straight line where the monitoring direction of the monitoring device is located, or the angle between them is large.

[0083] refer to Figure 2a As shown, the left side is the down lane, the right side is the up lane, the motorcycle 1 in the down lane is traveling towards the monitoring device, the motorcycle 2 in the up lane is traveling away from the monitoring device, the straight line where the driving direction of the motorcycle 1 is located is parallel to the straight line where the monitoring direction of the monitoring device is located, or the angle is small, and the straight line where the driving direction of the motorcycle 2 is located is parallel to the straight line where the monitoring direction of the monitoring device is located, or the angle is small. In this case, the first recognition mode can be used to determine the number of people on the motorcycle in the monitoring image.

[0084] The monitoring images of motorcycles collected by the monitoring equipment can be referred to Figure 2b As shown, the monitoring image of the motorcycle collected by the monitoring device facing away can be referred to Figure 2c As shown, reference Figure 2b and Figure 2cIt can be seen that in the surveillance images collected in the forward and backward directions, there is occlusion between the people on the motorcycle. When determining the number of people on the motorcycle, the occlusion between the people needs to be considered. The above-mentioned first recognition mode is a recognition mode that takes into account the occlusion of people. The first recognition mode can be understood as a mode for recognizing the number of people on the surveillance images collected in the forward and backward directions.

[0085] In another example, the monitoring image acquired in S101 may be classified using a pre-trained classification model, and the classification result is the type of the acquisition direction of the monitoring image by the monitoring device.

[0086] For example, some sample images of traffic scenes can be obtained, which may include motorcycle images collected from the front, motorcycle images collected from the back, motorcycle images collected from the side, etc. The types of the collection directions of these motorcycle images can be annotated, and then the annotated sample images are used to train the neural network. After the training is completed, the above classification model is obtained. The specific training of the classification model is not described in detail.

[0087] In one embodiment, S103 may include: if the acquisition direction of the monitoring image by the monitoring device is forward acquisition or reverse acquisition, then in the monitoring image, identifying the contour edges of the persons on the motorcycle; based on the number of identified contour edges, determining the number of persons on the motorcycle in the monitoring image.

[0088] In this embodiment, using the first recognition mode to determine the number of people on a motorcycle in a surveillance image may include: identifying the contour edges of the people on the motorcycle in the surveillance image; and determining the number of people on the motorcycle in the surveillance image based on the number of identified contour edges.

[0089] For example, in one embodiment, the contour edges of the persons carried by the motorcycle include any one or more of the following: the contour edge of the head of each person carried by the motorcycle, the contour edge of the shoulder of each person carried by the motorcycle, the contour edge of the neck of each person carried by the motorcycle, and the contour edge of the legs of each person carried by the motorcycle. The contour edge can be the contour edge of any one or more parts of the human body, without specific limitation.

[0090] In one example, identifying the edge of the outline of the person on the motorcycle may include: in the monitoring image, according to the positioning of the feature points, determining the head and shoulder area or the leg area of ​​the person on the motorcycle; using a sharpening algorithm, sharpening the outline of the head and shoulder area or the leg area, so that the outline of the head and shoulder area or the leg area reaches a level of clear edge recognition, so that the edge of the outline of the person on the motorcycle is obtained. In addition, the occluded area between the people on the motorcycle can be blurred to reduce the interference of this part of the occluded area on the image processing process.

[0091] Alternatively, in another embodiment, in the monitoring image, the head and shoulder contour edges and leg contour edges of each person on the motorcycle are respectively identified; if the number of identified head and shoulder contour edges is the same as the number of leg contour edges, the number of people on the motorcycle in the monitoring image is determined based on the same number; if the number of identified head and shoulder contour edges is different from the number of leg contour edges, the number of people on the motorcycle in the monitoring image is determined based on the larger number between the number of head and shoulder contour edges and the number of leg contour edges.

[0092] In some cases, in the monitoring image, the head and shoulder areas of the people on the motorcycle are blocked, but the leg areas are not blocked. In these cases, the number of identified head and shoulder contour edges is less than the number of identified leg contour edges, and the number of people on the motorcycle is determined based on the number of identified leg contour edges. In other cases, in the monitoring image, the leg areas of the people on the motorcycle are blocked, but the head and shoulder areas are not blocked. In these cases, the number of identified leg contour edges is less than the number of identified head and shoulder contour edges, and the number of people on the motorcycle is determined based on the number of identified head and shoulder contour edges. It can be seen that in this embodiment, even if the people on the motorcycle are partially blocked in the monitoring image, the number of people on the motorcycle can still be determined more accurately.

[0093] In some cases, the number of identified contour edges can be directly determined as the number of passengers on the motorcycle. For example, in the above embodiment, if the number of identified head and shoulder contour edges is the same as the number of leg contour edges, the same number can be determined as the number of passengers on the motorcycle; if the number of identified head and shoulder contour edges is different from the number of leg contour edges, the larger number between the number of head and shoulder contour edges and the number of leg contour edges can be determined as the number of passengers on the motorcycle.

[0094] Alternatively, in some other cases, after the number of contour edges is identified, deduplication processing may be performed on the number of contour edges.

[0095] For example, in one embodiment, determining the number of passengers on the motorcycle in the surveillance image based on the number of identified contour edges may include: counting the number of identified contour edges as a first number; determining the number of ghost contour edges as a second number based on the spacing between the identified contour edges; and determining the number of passengers on the motorcycle in the surveillance image based on the first number and the second number.

[0096] For example, if the distance between two or more identified contour edges is very small and less than the second preset threshold, the two or more contour edges can be determined as ghost contour edges, and the two or more contour edges can be determined as contour edges of the same person. The specific value of the second preset threshold is not limited, for example, it can be 1 mm, 1 cm, etc., and will not be listed one by one.

[0097] For example, assuming that four contour edges are identified: contour edge 1, contour edge 2, contour edge 3, and contour edge 4, assuming that the second preset threshold is 1 mm, assuming that the spacing between contour edge 1 and contour edge 2 is 0.5 mm, the spacing between contour edge 2 and contour edge 3 is 5 cm, and the spacing between contour edge 3 and contour edge 4 is 0.8 mm, then contour edge 1 and contour edge 2 are determined to be ghost contour edges, and contour edge 3 and contour edge 4 are determined to be ghost contour edges. In this case, contour edge 1 and contour edge 2 are determined to be contour edges of the same person, and contour edge 3 and contour edge 4 are determined to be contour edges of the same person, so the number of people on the motorcycle in the monitoring image is determined to be 2.

[0098] In one implementation, determining the number of ghost contour edges as the second number based on the identified spacing between the contour edges may include:

[0099] For every two contour edges, determine the distance between the two contour edges as a first distance; if the first distance is less than a second preset threshold, determine that the two contour edges are ghost contour edges; if the first distance is not less than the second preset threshold, respectively identify key points of a preset type associated with the two contour edges, and determine the distance between the key points of the same type associated with the two contour edges as a second distance; if the second distance is less than a third preset threshold, determine that the two contour edges are ghost contour edges; and count the number of ghost contour edges as a second number.

[0100] For example, if the contour edge is a contour edge with a strong association with the human face, such as a head and shoulder contour edge or a neck contour edge, the key points of the preset type can be the key points in the human face, such as the pupils, the tip of the nose, the center of the eyebrows, etc., and no specific limitation is made. If the contour edge is a leg contour edge, the key points of the preset type can be the key points in the lower limbs, such as the knees, the ankles, etc., and no specific limitation is made.

[0101] One or more types of key points associated with the contour edge can be recognized. If multiple types of key points are recognized, for each type of key point, the distance between the key points of this type associated with the two contour edges is determined as the second distance. If all the determined second distances are less than the third preset threshold, it is determined that the two contour edges are ghost contour edges; otherwise, it is determined that the two contour edges are not ghost contour edges.

[0102] Suppose the second preset threshold K1 is set, and the third preset threshold K2 is set. The specific values of K1 and K2 are not limited. They can be equal or unequal. Refer to Figure 2d As shown, suppose the recognized contour edge is a neck contour edge, the distance between the two neck contour edges is S, and the second preset threshold K1 is set. If S < K1, it is determined that the two neck contour edges are ghost contour edges; if S ≥ K1, the key points of the preset type associated with these two neck contour edges are respectively recognized. For example, the key points of the tip of the nose associated with these two neck contour edges are respectively recognized, and the distance between the two key points of the tip of the nose is Δs. If Δs < K2, it is determined that the two neck contour edges are ghost contour edges; if Δs ≥ K2, it is determined that the number of passengers on the motorcycle is 2.

[0103] In this embodiment, even if the distance between two or more recognized contour edges is not less than the second preset threshold, it is still necessary to further determine whether the distance between the key points of the preset type associated with these contour edges is less than the third preset threshold. If it is less, these contour edges are still determined as ghost contour edges. In this way, the missed detection rate of ghost contour edges is reduced.

[0104] In the above content, the first recognition mode is introduced. Next, the second recognition mode is introduced.

[0105] As described above, if the type of the acquisition direction of the monitoring device for the monitoring image is lateral acquisition, it is determined that the recognition mode for recognizing the monitoring image is the second recognition mode, and the number of passengers on the motorcycle in the monitoring image is determined by using the second recognition mode.

[0106] In the above example, the type of the monitoring image acquisition direction of the monitoring device can be determined according to the installation direction of the monitoring device; or, the type of the monitoring image acquisition direction of the monitoring device can be determined by using a pre-trained classification model; or, the type of the monitoring image acquisition direction of the monitoring device can be determined according to the angle between the driving direction of the motorcycle and the monitoring direction of the monitoring device.

[0107] The following is a detailed description of the example of "determining the type of the acquisition direction of the monitoring image by the monitoring device according to the angle between the driving direction of the motorcycle and the monitoring direction of the monitoring device":

[0108] Generally speaking, if the monitoring device collects the monitoring image of the motorcycle from the side, the straight line where the motorcycle's driving direction is located is perpendicular to the straight line where the monitoring direction of the monitoring device is located, or approximately perpendicular, or the angle between them is relatively large.

[0109] refer to Figure 2e As shown, the left side is the down lane, the right side is the up lane, motorcycle 1 is driving in the down lane, motorcycle 2 is driving in the up lane, the monitoring device collects the monitoring image of the motorcycle from the side, the straight line where the driving direction of motorcycle 1 is located is perpendicular to the straight line where the monitoring direction of the monitoring device is located, or approximately perpendicular, or the angle is large, the straight line where the driving direction of motorcycle 2 is located is perpendicular to the straight line where the monitoring direction of the monitoring device is located, or approximately perpendicular, or the angle is large. In this case, the second recognition mode can be used to determine the number of people on the motorcycle in the monitoring image.

[0110] The monitoring images of the motorcycle collected from the side by the monitoring equipment can be referred to Figure 2f As shown, reference Figure 2f It can be seen that in the surveillance image of the motorcycle collected from the side, there is little occlusion between the people on the motorcycle, or there is basically no occlusion between the people. The above second recognition mode can be understood as a mode for recognizing the number of people on the motorcycle based on the surveillance image of the motorcycle collected from the side.

[0111] In one embodiment, the angle between the straight line of the driving direction of the motorcycle and the straight line of the monitoring direction of the monitoring device is determined; if the angle is not less than the first preset threshold, the number of people on the motorcycle in the monitoring image can be determined by a head detection algorithm.

[0112] In this implementation manner, the second recognition mode may be understood as: determining the number of passengers on the motorcycle in the monitoring image through a head detection algorithm.

[0113] Alternatively, in other implementations, the number of human legs may be detected, and the number of people on the motorcycle in the monitoring image may be determined according to the detected number of human legs.

[0114] In one implementation, after S103, it is determined whether the number of passengers on the motorcycle determined in S103 meets the warning condition, and if so, a warning is issued.

[0115] Warning conditions can be set in advance. For example, in some cases, motorcycles are not allowed to carry passengers. In this case, the warning condition can be: a warning is issued when the number of passengers on the motorcycle is greater than 1. For another example, in other cases, a motorcycle is allowed to carry at most one person in addition to the driver. In this case, the warning condition can be: a warning is issued when the number of passengers on the motorcycle is greater than 2.

[0116] For example, an early warning may be given through an IO (In-Out) signal, or through a 485 (a serial communication interface) signal, or through an audible or visual signal light, etc. The specific early warning method is not limited.

[0117] By applying the embodiment shown in the present invention, a monitoring image collected by a monitoring device is obtained; a motorcycle in the monitoring image is identified; and the number of passengers on the motorcycle in the monitoring image is determined according to the type of the monitoring device's acquisition direction of the monitoring image. It can be seen that in this solution, the number of passengers on the motorcycle can be automatically determined, and automatic identification of passengers on the motorcycle is achieved. There is no need to rely on traffic police or traffic coordinators to manually identify the situation of passengers on the motorcycle, which reduces manpower consumption. In addition, the actual situation of images collected from different acquisition directions (occlusion between people) is taken into consideration, and different recognition modes are used for images collected from different acquisition directions. On the one hand, the accuracy of recognition can be improved, and on the other hand, a recognition mode that is more suitable for the image is selected, which can reasonably use computing resources.

[0118] Figure 3 A first flow chart of a method for identifying a person on a motorcycle provided by an embodiment of the present invention includes:

[0119] S301: Acquire monitoring images collected by monitoring equipment.

[0120] For example, the monitoring equipment in the embodiment of the present invention can be monitoring equipment in road traffic scenes, such as gun cameras, ball cameras, snapshot cameras, etc., without specific limitation. In one case, the installation height of the monitoring equipment can be between 6-8m; the lateral monitoring range of a single sensor in the monitoring equipment can be no more than 3 lanes, and the longitudinal monitoring distance can be no more than 240m. The specific installation situation and monitoring range of the monitoring equipment are not limited.

[0121] The monitoring images collected by the monitoring equipment may be monitoring images collected for road traffic scenes, and the monitoring images may include pedestrians, bicycles, motorcycles, cars and other passing targets.

[0122] S302: Identify whether the passing target in the monitoring image is a motorcycle, if yes, execute S303.

[0123] Passing targets can be understood as targets passing through road traffic scenes, such as pedestrians, bicycles, motorcycles, cars, etc. listed in the above content. Moving target recognition algorithms, such as frame difference method, optical flow method, background subtraction method and other algorithms, can be used to identify passing targets in monitoring images.

[0124] After identifying the passing target, it is necessary to further identify whether the passing target is a motorcycle. For example, in one embodiment, it is possible to identify whether the passing target in the monitoring image is a two-wheeled vehicle; if it is a two-wheeled vehicle, it is possible to identify whether there is an exhaust pipe in the two-wheeled vehicle; if there is, it is determined that the two-wheeled vehicle is a motorcycle.

[0125] It is understood that two-wheeled vehicles may include bicycles, electric bicycles, motorcycles, etc., but only motorcycles have exhaust pipes. Therefore, two-wheeled vehicles with exhaust pipes can be determined as motorcycles. The identification method of two-wheeled vehicles and exhaust pipes is not limited. For example, a neural network model for identifying two-wheeled vehicles can be pre-trained, and the neural network model is used to identify whether the passing target in the monitoring image is a two-wheeled vehicle. For another example, a neural network model for identifying motorcycle exhaust pipes can be pre-trained, and the neural network model is used to identify whether there is an exhaust pipe in the two-wheeled vehicle in the monitoring image.

[0126] Alternatively, in another embodiment, it is possible to identify whether the passing target in the monitoring image is a two-wheeled vehicle; if it is a two-wheeled vehicle, identify whether the license plate of the two-wheeled vehicle is a motorcycle license plate; if it is a motorcycle license plate, determine that the two-wheeled vehicle is a motorcycle.

[0127] The style of a motorcycle license plate needs to meet relevant regulations, such as the color of the license plate, the number of digits and arrangement of the license plate number, etc., all need to meet specified standards. Therefore, based on this standard, it is possible to identify whether the license plate is a motorcycle license plate. In this embodiment, a two-wheeled vehicle with a motorcycle license plate is determined to be a motorcycle.

[0128] There is no limitation on the method for identifying license plates of two-wheeled vehicles and motorcycles. For example, a neural network model for identifying two-wheeled vehicles can be pre-trained, and the neural network model can be used to identify whether the passing target in the monitoring image is a two-wheeled vehicle. For another example, a neural network model for identifying license plates of motorcycles can be pre-trained, and the neural network model can be used to identify whether the license plate of a two-wheeled vehicle in the monitoring image is a motorcycle license plate.

[0129] S303: Determine the type of the acquisition direction of the monitoring image by the monitoring device. If the type is forward acquisition or rearward acquisition, execute S304; if the type is sideways acquisition, execute S313.

[0130] For example, the acquisition direction of the monitoring image by the monitoring device may include the following types: front acquisition, rear acquisition, side acquisition, etc.

[0131] In one example, the type of the acquisition direction of the monitoring device for the monitoring image can be determined according to the installation direction of the monitoring device. In another example, the type of the acquisition direction of the monitoring device for the monitoring image can be determined according to the angle between the driving direction of the motorcycle and the monitoring direction of the monitoring device. In another example, the monitoring image obtained in S301 can also be classified using a pre-trained classification model, and the classification result is the type of the acquisition direction of the monitoring device for the monitoring image.

[0132] If the type of acquisition direction of the monitoring image by the monitoring device is forward acquisition or rear acquisition, then the recognition mode for identifying the monitoring image is determined to be the first recognition mode, and the first recognition mode is used to determine the number of passengers on the motorcycle in the monitoring image, that is, execute S304-S312; if the type of acquisition direction of the monitoring image by the monitoring device is side acquisition, then the recognition mode for identifying the monitoring image is determined to be the second recognition mode, and the second recognition mode is used to determine the number of passengers on the motorcycle in the monitoring image, that is, execute S313.

[0133] The monitoring images of motorcycles collected by the monitoring equipment can be referred to Figure 2b As shown, the monitoring image of the motorcycle collected by the monitoring device facing away can be referred to Figure 2c As shown, reference Figure 2b and Figure 2c It can be seen that in the surveillance images collected in the forward and backward directions, there is occlusion between the people on the motorcycle. When determining the number of people on the motorcycle, the occlusion between the people needs to be considered. The above-mentioned first recognition mode is a recognition mode that takes into account the occlusion of people. The first recognition mode can be understood as a mode for recognizing the number of people on the surveillance images collected in the forward and backward directions.

[0134] S304: In the monitoring image, identify the outline edge of the person on the motorcycle.

[0135] For example, in one embodiment, the contour edge of the person carried by the motorcycle may be: the contour edge of the head and shoulders of each person carried by the motorcycle. Alternatively, in another embodiment, the contour edge of the person carried by the motorcycle may be: the contour edge of the legs of each person carried by the motorcycle. Alternatively, the contour edge may also be the contour edge of a face, the contour edge of a neck, etc., without specific limitation.

[0136] In one example, identifying the edge of the outline of the person on the motorcycle may include: in the monitoring image, according to the positioning of the feature points, determining the head and shoulder area or the leg area of ​​the person on the motorcycle; using a sharpening algorithm, sharpening the outline of the head and shoulder area or the leg area, so that the outline of the head and shoulder area or the leg area reaches a level of clear edge recognition, so that the edge of the outline of the person on the motorcycle is obtained. In addition, the occluded area between the people on the motorcycle can be blurred to reduce the interference of this part of the occluded area on the image processing process.

[0137] S305: Count the number of identified contour edges as a first number.

[0138] S306: For every two contour edges, determine the distance between the two contour edges as a first distance.

[0139] S307: Determine whether the first distance is less than a second preset threshold; if so, execute S310; if not, execute S308.

[0140] S308: Respectively identifying key points of a preset type associated with the two contour edges, and determining a distance between key points of the same type associated with the two contour edges as a second distance.

[0141] S309: Determine whether the second interval is smaller than a third preset threshold; if so, execute S310.

[0142] S310: Determine that the two contour edges are ghost contour edges.

[0143] If the result of S309 is not less than, it is determined that the two contour edges are not ghost contour edges.

[0144] For example, if the contour edge is a contour edge that is highly associated with a face, such as a head and shoulder contour edge or a neck contour edge, then the key points of the preset type may be key points in the face, such as pupils, nose tips, and eyebrows, etc., without specific limitation. If the contour edge is a leg contour edge, then the key points of the preset type may be key points in the lower limbs, such as knees, ankles, etc., without specific limitation.

[0145] One or more types of key points associated with the contour edges may be identified. If multiple types of key points are identified, the spacing between the key points of the type associated with the two contour edges is determined for each type of key point as the second spacing. If the determined second spacings are all less than a third preset threshold, the two contour edges are determined to be ghost contour edges, otherwise, the two contour edges are determined not to be ghost contour edges.

[0146] Assume that a second preset threshold K1 and a third preset threshold K2 are set. The specific values of K1 and K2 are not limited and they can be equal or unequal. Refer to Figure 2d As shown, assume that the recognized contour edges are the neck contour edges, and the distance between two neck contour edges is S. Set the second preset threshold K1. If S < K1, it is determined that these two neck contour edges are double-image contour edges; if S ≥ K1, the key points of the preset type associated with these two neck contour edges are respectively recognized. For example, the nose tip key points associated with these two neck contour edges are respectively recognized, and the distance between the two nose tip key points is Δs. If Δs < K2, it is determined that these two neck contour edges are double-image contour edges; if Δs ≥ K2, it is determined that the number of passengers on the motorcycle is 2.

[0147] In this embodiment, even if the distance between two or more recognized contour edges is not less than the second preset threshold, it is still necessary to further determine whether the distance between the key points of the preset type associated with these contour edges is less than the third preset threshold. If so, these contour edges are still determined as double-image contour edges. In this way, the missed detection rate of double-image contour edges is reduced.

[0148] S311: Count the number of double-image contour edges as the second quantity.

[0149] S312: Based on the first quantity and the second quantity, determine the number of passengers on the motorcycle in the monitoring image.

[0150] For example, assume that four contour edges are recognized: contour edge 1, contour edge 2, contour edge 3, and contour edge 4. Assume that contour edge 1 and contour edge 2 are determined as double-image contour edges, and contour edge 3 and contour edge 4 are determined as double-image contour edges. In this case, contour edge 1 and contour edge 2 are determined as the contour edges of the same person, and contour edge 3 and contour edge 4 are determined as the contour edges of the same person. Therefore, it is determined that the number of passengers on the motorcycle in the monitoring image is 2.

[0151] S313: Determine the number of passengers on the motorcycle in the monitoring image through a head detection algorithm.

[0152] The monitoring image of the motorcycle collected by the monitoring device from the side can be referred to Figure 2f As shown, refer to Figure 2f It can be seen that in the monitoring image of the motorcycle collected from the side, there is less occlusion between the passengers on the motorcycle, or rather, there is basically no occlusion between the passengers. The above second recognition mode can be understood as a mode for recognizing the number of passengers on the motorcycle in the monitoring image collected from the side. Determining the number of passengers on the motorcycle in the monitoring image using the second recognition mode is to execute S313.

[0153] By applying the embodiment shown in the present invention, a monitoring image collected by a monitoring device is obtained; a motorcycle in the monitoring image is identified; and the number of passengers on the motorcycle in the monitoring image is determined according to the type of the monitoring device's acquisition direction of the monitoring image. It can be seen that in this solution, the number of passengers on the motorcycle can be automatically determined, and automatic identification of passengers on the motorcycle is achieved. There is no need to rely on traffic police or traffic coordinators to manually identify the situation of passengers on the motorcycle, which reduces manpower consumption. In addition, the actual situation of images collected from different acquisition directions (occlusion between people) is taken into consideration, and different recognition modes are used for images collected from different acquisition directions. On the one hand, the accuracy of recognition can be improved, and on the other hand, a recognition mode that is more suitable for the image is selected, which can reasonably use computing resources.

[0154] Corresponding to the above method embodiment, the embodiment of the present invention also provides a motorcycle passenger recognition device, such as Figure 4 As shown, including:

[0155] An acquisition module 401 is used to acquire monitoring images collected by monitoring equipment;

[0156] An identification module 402, used to identify a motorcycle in the monitoring image;

[0157] The first determination module 403 is used to determine the number of passengers on the motorcycle in the monitoring image according to the type of the acquisition direction of the monitoring image by the monitoring device.

[0158] In one embodiment, the recognition module 402 is specifically used to: identify whether the passing target in the monitoring image is a two-wheeled vehicle and whether there is an exhaust pipe; if the passing target in the monitoring image is a two-wheeled vehicle and there is an exhaust pipe, determine that the passing target in the monitoring image is a motorcycle; or,

[0159] Identify whether the passing target in the monitoring image is a two-wheeled vehicle and whether it has a motorcycle license plate; if the passing target in the monitoring image is a two-wheeled vehicle and the license plate of the passing target is a motorcycle license plate, determine that the passing target in the monitoring image is a motorcycle.

[0160] In one implementation, the first determination module 403 includes: a first determination submodule, an identification submodule, and a second determination submodule (not shown in the figure), wherein:

[0161] A first determination submodule is used to determine the type of the acquisition direction of the monitoring image by the monitoring device;

[0162] an identification submodule, for identifying the contour edge of the person carried by the motorcycle in the monitoring image when the type is forward acquisition or rearward acquisition;

[0163] The second determination submodule is used to determine the number of passengers on the motorcycle in the monitoring image based on the number of identified contour edges.

[0164] In one implementation, the second determination submodule includes: a statistical unit, a first determination unit, and a second determination unit (not shown in the figure), wherein:

[0165] A counting unit, used for counting the number of identified contour edges as a first number;

[0166] A first determining unit, configured to determine the number of ghost contour edges as a second number based on the identified spacings between the contour edges;

[0167] The second determining unit is used to determine the number of passengers on the motorcycle in the monitoring image based on the first number and the second number.

[0168] In one implementation, the first determining unit is specifically configured to:

[0169] For every two contour edges, determine a distance between the two contour edges as a first distance, and if the first distance is less than a second preset threshold, determine that the two contour edges are ghost contour edges;

[0170] If the first distance is not less than the second preset threshold, respectively identifying key points of a preset type associated with the two contour edges, and determining the distance between the key points of the same type associated with the two contour edges as the second distance; if the second distance is less than a third preset threshold, determining that the two contour edges are ghost contour edges;

[0171] The number of ghost contour edges is counted as the second number.

[0172] In one embodiment, the contour edges of the persons carried on the motorcycle include any one or more of the following: the contour edge of the head of each person carried on the motorcycle, the contour edge of the shoulder of each person carried on the motorcycle, the contour edge of the neck of each person carried on the motorcycle, and the contour edge of the legs of each person carried on the motorcycle.

[0173] In one embodiment, the identification submodule is specifically used to: when the type of the acquisition direction of the monitoring image by the monitoring device is forward acquisition or backward acquisition, in the monitoring image, respectively identify the head and shoulder contour edges and leg contour edges of each person carried by the motorcycle;

[0174] The second determination submodule is specifically configured to: if the number of the identified head and shoulder contour edges is the same as the number of the leg contour edges, determine the number of passengers on the motorcycle in the monitoring image based on the same number;

[0175] If the number of identified head and shoulder contour edges is different from the number of leg contour edges, the number of passengers on the motorcycle in the monitoring image is determined based on the larger number between the number of head and shoulder contour edges and the number of leg contour edges.

[0176] In one embodiment, the device further comprises:

[0177] The second determination module (not shown in the figure) is used to determine the number of passengers on the motorcycle in the monitoring image by using a head detection algorithm when the type is lateral acquisition.

[0178] By using the embodiment of the present invention, a monitoring image collected by a monitoring device is obtained; a motorcycle in the monitoring image is identified; and the number of people on the motorcycle in the monitoring image is determined according to the type of the direction in which the monitoring device collects the monitoring image. It can be seen that in this solution, the number of people on the motorcycle can be automatically determined, and automatic identification of people on the motorcycle is achieved. There is no need to rely on traffic police or traffic coordinators to manually identify the situation of people on the motorcycle, which reduces manpower consumption.

[0179] The embodiment of the present invention further provides an electronic device, such as Figure 5 As shown, it includes a processor 501 and a memory 502,

[0180] Memory 502, used for storing computer programs;

[0181] The processor 501 is used to implement any one of the above-mentioned methods for identifying a person on a motorcycle when executing the program stored in the memory 502.

[0182] The memory mentioned in the above electronic device may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the above processor.

[0183] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0184] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, any one of the above-mentioned methods for identifying passengers on a motorcycle is implemented.

[0185] In another embodiment of the present invention, a computer program product including instructions is provided, which, when executed on a computer, enables the computer to execute any one of the above-mentioned methods for identifying a person on a motorcycle.

[0186] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0187] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0188] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, equipment embodiment, computer-readable storage medium embodiment, and computer program product embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0189] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A method for identifying passengers on a motorcycle, characterized in that: include: Acquire monitoring images collected by monitoring equipment; identifying a motorcycle in the surveillance image; Determining the number of passengers on the motorcycle in the monitoring image according to the type of the acquisition direction of the monitoring image by the monitoring device; Determining the number of passengers on the motorcycle in the monitoring image according to the type of the acquisition direction of the monitoring image by the monitoring device includes: If the type of the acquisition direction of the monitoring image by the monitoring device is forward acquisition or backward acquisition, then in the monitoring image, the contour edges of the persons carried by the motorcycle are identified; based on the number of the identified contour edges, the number of persons carried by the motorcycle in the monitoring image is determined; If the monitoring device uses sideways acquisition for the monitoring image, the number of passengers on the motorcycle in the monitoring image is determined by a head detection algorithm; or, by detecting the number of human legs in the monitoring image, the number of passengers on the motorcycle in the monitoring image is determined based on the number of detected human legs.

2. The method according to claim 1, characterized in that: The identifying the motorcycle in the monitoring image comprises: Identify whether the passing target in the monitoring image is a two-wheeled vehicle and whether there is an exhaust pipe; if the passing target in the monitoring image is a two-wheeled vehicle and there is an exhaust pipe, determine that the passing target in the monitoring image is a motorcycle; or, Identify whether the passing target in the monitoring image is a two-wheeled vehicle and whether it has a motorcycle license plate; if the passing target in the monitoring image is a two-wheeled vehicle and the license plate of the passing target is a motorcycle license plate, determine that the passing target in the monitoring image is a motorcycle.

3. The method according to claim 1, characterized in that The determining the number of passengers on the motorcycle in the monitoring image based on the number of identified contour edges includes: Counting the number of identified contour edges as a first number; Determining the number of ghost contour edges as a second number based on the identified spacings between the contour edges; The number of passengers on the motorcycle in the monitoring image is determined based on the first number and the second number.

4. The method according to claim 3, characterized in that The step of determining the number of ghost contour edges as the second number based on the identified spacings between the contour edges includes: For every two contour edges, determine a distance between the two contour edges as a first distance, and if the first distance is less than a second preset threshold, determine that the two contour edges are ghost contour edges; If the first distance is not less than the second preset threshold, respectively identifying key points of a preset type associated with the two contour edges, and determining the distance between the key points of the same type associated with the two contour edges as the second distance; if the second distance is less than a third preset threshold, determining that the two contour edges are ghost contour edges; The number of ghost contour edges is counted as the second number.

5. The method according to claim 1, characterized in that The contour edges of the persons on the motorcycle include any one or more of the following: the contour edge of the head of each person on the motorcycle, the contour edge of the shoulder of each person on the motorcycle, the contour edge of the neck of each person on the motorcycle, and the contour edge of the legs of each person on the motorcycle.

6. The method according to claim 1, characterized in that The step of identifying the edge of the outline of the person on the motorcycle in the monitoring image includes: In the monitoring image, respectively identifying the head and shoulder contour edges and leg contour edges of each person carried by the motorcycle; The determining the number of passengers on the motorcycle in the monitoring image based on the number of identified contour edges includes: If the number of the identified head and shoulder contour edges is the same as the number of the leg contour edges, then based on the same number, determining the number of passengers on the motorcycle in the monitoring image; If the number of identified head and shoulder contour edges is different from the number of leg contour edges, the number of passengers on the motorcycle in the monitoring image is determined based on the larger number between the number of head and shoulder contour edges and the number of leg contour edges.

7. A motorcycle passenger recognition device, characterized in that: include: An acquisition module is used to acquire monitoring images collected by monitoring equipment; A recognition module, used for recognizing a motorcycle in the monitoring image; A first determination module, configured to determine the number of passengers on the motorcycle in the monitoring image according to the type of the acquisition direction of the monitoring image by the monitoring device; The first determining module is specifically used for: If the type of the acquisition direction of the monitoring image by the monitoring device is forward acquisition or backward acquisition, then in the monitoring image, the contour edges of the persons carried by the motorcycle are identified; based on the number of the identified contour edges, the number of persons carried by the motorcycle in the monitoring image is determined; If the monitoring device uses sideways acquisition for the monitoring image, the number of passengers on the motorcycle in the monitoring image is determined by a head detection algorithm; or, by detecting the number of human legs in the monitoring image, the number of passengers on the motorcycle in the monitoring image is determined based on the number of detected human legs.

8. An electronic device, characterized in that: including a processor and a memory; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 6 when executing a program stored in a memory.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • APPARATUS, METHOD, AND COMPUTER READABLE MEDIUM FOR MONITORING the NUMBER OF PASSENGERS IN AN AUTOMOBILE

    CN104239889A

  • Counting method, apparatus, system, electronic device, and storage medium

    CN109145888A

  • Non-motor vehicle traffic violation supervision method and device and electronic device

    CN109635645A

  • Non-motor vehicle illegal manned detection method, device and electronic equipment

    CN110516518A

  • Method, device and system for detecting overload of motorcycle

    CN110909641A

Cited By

  • Intelligent monitoring method and system for overload and manned of motorcycle

    CN121505567A