Non-motor vehicle rider identification method and device, electronic equipment and storage medium
By performing target detection and gap value calculation on images around the school, the system can identify whether non-motorized vehicle riders are students' parents, solving the problem of identity verification and improving the efficiency of non-motorized vehicle management.
Patent Information
- Application Number
- CN202311871867.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2043-12-29
AI Technical Summary
Around schools, it is difficult to verify whether non-motorized vehicle riders are students' parents, resulting in low efficiency in non-motorized vehicle management.
By performing target detection on the image to be identified in the target area, a first human body detection box, a second human body detection box, and a non-motorized vehicle detection box are obtained. The difference between the two human body detection boxes is calculated. If the difference is greater than a preset threshold, one of the detection boxes is determined to be the parent human body detection box.
Accurate identification of non-motorized vehicle riders has improved the efficiency of non-motorized vehicle management around schools.
Smart Images

Figure CN117994496B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart cities, and in particular to a method, device, electronic device, and storage medium for identifying non-motorized vehicle riders. Background Technology
[0002] With the development of the non-motorized vehicle industry, the number of non-motorized vehicles is increasing daily. Compared with traditional vehicles, the traffic situation of non-motorized vehicles is more complex. Although different management regulations for non-motorized vehicles have been introduced, the large number, wide distribution, and unpredictable travel times of non-motorized vehicles make their management quite difficult. For example, in the management of non-motorized vehicles around schools, video stream analysis can be used to cluster facial images and statistically identify high-frequency violators. However, without comparison with the police facial recognition database and license plate database, it is impossible to determine whether the non-motorized vehicle rider is a student's parent, resulting in low efficiency in managing non-motorized vehicles around schools. Summary of the Invention
[0003] This invention provides a method for identifying non-motorized vehicle riders, aiming to solve the problem of difficulty in confirming the identity of frequently violating riders around schools, and the low efficiency of non-motorized vehicle management around schools. By performing target detection on the image to be identified in the target area, a first human detection box, a second human detection box, and a non-motorized vehicle detection box are obtained. The difference between the first and second human detection boxes is calculated. If the difference value is greater than a preset difference threshold, the first or second human detection box is determined to be a parent's human detection box, thereby identifying the person corresponding to the parent's human detection box as a parent. This solves the problem of difficulty in confirming the identity of non-motorized vehicle riders around schools, and the low efficiency of non-motorized vehicle management around schools.
[0004] In a first aspect, embodiments of the present invention provide a method for identifying non-motorized vehicle riders, the method comprising:
[0005] Acquire an image of the target area to be identified, wherein the target area is the area surrounding the school;
[0006] Target detection is performed on the image to be identified to obtain a first human body detection box, a second human body detection box, and a non-motorized vehicle detection box. The first human body detection box and the second human body detection box are associated through the non-motorized vehicle detection box.
[0007] Calculate the difference between the first human body detection box and the second human body detection box. If the difference is greater than a preset difference threshold, then determine the first human body detection box or the second human body detection box as a parent human body detection box.
[0008] The person corresponding to the parent's human body detection frame is identified as the parent.
[0009] Optionally, after performing target detection on the image to be identified to obtain a first human detection box, a second human detection box, and a non-motorized vehicle detection box, the method further includes:
[0010] Determine the first center coordinates of the first human detection box in the image to be identified;
[0011] Determine the second center coordinates of the second human detection box in the image to be identified;
[0012] Determine the coordinates of the third center point of the non-motorized vehicle detection frame in the image to be identified;
[0013] Connect the coordinates of the first center point, the second center point, and the third center point in the image to be identified to obtain an associated triangle;
[0014] Calculate the area ratio between the intersection area of the associated triangle and the non-motorized vehicle detection frame and the area of the associated triangle;
[0015] The first human body detection frame, the second human body detection frame, and the non-motorized vehicle detection frame, whose area ratio is greater than a preset area ratio, are associated.
[0016] Optionally, calculating the difference between the first human detection box and the second human detection box includes:
[0017] In the image to be identified, the first height of the first human body detection box and the second height of the second human body detection box are determined;
[0018] Calculate the difference between the first height and the second height, and based on the difference between the first height and the second height, determine the gap between the first human detection frame and the second human detection frame.
[0019] Optionally, determining the difference between the first human detection box and the second human detection box based on the difference between the first height and the second height includes:
[0020] Based on the image depth information within the non-motorized vehicle detection frame in the image to be identified, the shooting distance of the non-motorized vehicle within the non-motorized vehicle detection frame is determined;
[0021] The image coefficient of the non-motorized vehicle is determined based on the shooting distance;
[0022] The difference between the first human detection frame and the second human detection frame is determined based on the image coefficient and the difference between the first height and the second height.
[0023] Optionally, determining the difference between the first human detection box and the second human detection box based on the difference between the first height and the second height includes:
[0024] The non-motorized vehicles within the non-motorized vehicle detection frame are identified in terms of their state to obtain their attitude coefficients.
[0025] The difference between the first human detection frame and the second human detection frame is determined based on the posture coefficient and the difference between the first height and the second height.
[0026] Optionally, determining the difference between the first human detection box and the second human detection box based on the difference between the first height and the second height includes:
[0027] Calculate the distance between the first center point and the second center point;
[0028] Based on the distance between the first center point and the second center point and the difference between the first height and the second height, the difference between the first human detection frame and the second human detection frame is determined.
[0029] Optionally, after determining that the first or second human body detection box is a parent human body detection box if the difference value is greater than a preset difference threshold, the method further includes:
[0030] Obtain the capture time of the image to be identified;
[0031] The difference threshold is adjusted according to the shooting time of the image to be identified to obtain the preset difference threshold. The preset difference threshold is negatively correlated with the time interval between the shooting time and the student's departure time.
[0032] Secondly, embodiments of the present invention also provide a non-motorized vehicle rider identification device, the non-motorized vehicle rider identification device comprising:
[0033] The first acquisition module is used to acquire an image of a target area to be identified, wherein the target area is the area surrounding the school.
[0034] The detection module is used to perform target detection on the image to be identified, and obtain a first human body detection box, a second human body detection box, and a non-motorized vehicle detection box. The first human body detection box and the second human body detection box are associated through the non-motorized vehicle detection box.
[0035] The first determining module is used to calculate the difference between the first human body detection box and the second human body detection box. If the difference is greater than a preset difference threshold, the first human body detection box or the second human body detection box is determined to be a parent human body detection box.
[0036] The second determination module is used to determine the person corresponding to the parent's human body detection frame as the parent.
[0037] Thirdly, embodiments of the present invention provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the non-motorized vehicle rider identification method provided in embodiments of the present invention.
[0038] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the non-motorized vehicle rider identification method provided in the embodiments of the present invention.
[0039] In this embodiment of the invention, an image of the target area to be identified is acquired, wherein the target area is the area surrounding a school; target detection is performed on the image to be identified to obtain a first human body detection box, a second human body detection box, and a non-motorized vehicle detection box, and the first human body detection box and the second human body detection box are associated through the non-motorized vehicle detection box; the difference value between the first human body detection box and the second human body detection box is calculated, and if the difference value is greater than a preset difference threshold, then the first human body detection box or the second human body detection box is determined to be a parent human body detection box; the person corresponding to the parent human body detection box is identified as a parent. By performing target detection on the image to be identified in the target area to obtain a first human body detection box, a second human body detection box, and a non-motorized vehicle detection box, and calculating the difference value between the first human body detection box and the second human body detection box, and when the difference value is greater than a preset difference threshold, then the first human body detection box or the second human body detection box is determined to be a parent human body detection box, thereby identifying the person corresponding to the parent human body detection box as a parent, solving the problem of difficulty in confirming whether non-motorized vehicle riders around schools are students' parents and the low efficiency of non-motorized vehicle management around schools. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is a flowchart of a method for identifying non-motorized vehicle riders provided in an embodiment of the present invention;
[0042] Figure 2 This is a scene diagram of a student and parent carrying a child, provided by an embodiment of the present invention;
[0043] Figure 3 This is an illustration of an adult carrying a passenger, provided by an embodiment of the present invention.
[0044] Figure 4 This is a schematic diagram of the structure of a non-motorized vehicle rider identification device provided in an embodiment of the present invention;
[0045] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0046] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0047] like Figure 1 As shown, Figure 1 This is a flowchart of a method for identifying non-motorized vehicle riders provided in an embodiment of the present invention. The method includes the following steps:
[0048] 101. Obtain the image to be identified in the target area.
[0049] In this embodiment of the invention, the target area is the area surrounding the school, which may include traffic intersections, roadsides, etc., within the school's perimeter. There may be multiple target areas, and a corresponding image to be identified will be collected for each target area. These images can be acquired through cameras installed in the target area, or they can be uploaded by administrators.
[0050] The aforementioned method for identifying non-motorized vehicle riders can be applied to a non-motorized vehicle rider management platform, which can be built on a server or distributed server. Management personnel around schools can use this platform to identify frequently violating rider rules. The platform can connect to multiple cameras, with at least one camera configured for each target area to monitor for violators.
[0051] The images to be identified include cyclists, fellow riders, and non-motorized vehicles. These images can be front-view images, rear-view images, or side-view images. The images can be distant or close-up views.
[0052] The aforementioned non-motorized vehicles include, but are not limited to, electric bicycles and electric motorcycles.
[0053] After detecting cyclists, fellow riders, and non-motorized vehicles in the image to be identified in the target area, the image data of cyclists can be further extracted from the image to be identified.
[0054] 102. Perform target detection on the image to be recognized to obtain the first human body detection box, the second human body detection box, and the non-motorized vehicle detection box.
[0055] In this embodiment of the invention, the first human detection box and the second human detection box are associated with a non-motorized vehicle detection box. Association can be understood as the connection between different regions or objects in an image; by understanding the association between different objects, better classification and localization can be achieved.
[0056] The first human detection frame mentioned above can be the human frame of the cyclist or the human frame of the person traveling with them.
[0057] The second human detection frame mentioned above can be the human frame of a fellow passenger or the human frame of a cyclist.
[0058] The aforementioned non-motorized vehicle detection frame can be a non-motorized vehicle frame.
[0059] Understandably, the cyclist's body frame and the companion's body frame are linked through the non-motorized vehicle frame. For example, the cyclist and the companion are riding the same non-motorized vehicle.
[0060] The aforementioned object detection can be achieved by analyzing objects in an image or video and identifying specific objects (such as people, non-motorized vehicles, etc.), and then labeling the location and category of these objects (such as people, non-motorized vehicles, etc.) in the image or video.
[0061] It should be noted that when riding a non-motorized vehicle, the companion can sit directly in front of the cyclist or behind the cyclist.
[0062] 103. Calculate the difference between the first human body detection box and the second human body detection box. If the difference is greater than the preset difference threshold, then determine the first human body detection box or the second human body detection box as the parent human body detection box.
[0063] In this embodiment of the invention, the aforementioned preset gap threshold can be understood as a gap threshold preset by the system.
[0064] The difference between the first and second human body detection boxes can be understood as the distance between the first and second human body detection boxes.
[0065] Furthermore, the difference value between the human body frames of adults and children is relatively small, while the difference value between the human body frames of children and children is relatively large. Based on three image scene diagrams captured by the non-motorized vehicle, namely the front view image of the rider, companion, and non-motorized vehicle, the rear view image of the rider, companion, and non-motorized vehicle, and the side view image of the rider, companion, and non-motorized vehicle, as well as the two scene diagrams of near and far views, the difference value between the first and second human body detection frames can be calculated. Based on the difference value between the first and second human body detection frames, it can be determined whether the first or second human body detection frame is the human body detection frame of the parent.
[0066] Furthermore, if the difference value is greater than a preset difference threshold, the first or second human body detection box is determined as the parent's human body detection box.
[0067] 104. Identify the person corresponding to the parent's body detection frame as the parent.
[0068] In this embodiment of the invention, after determining that the first human body detection box or the second human body detection box is the parent human body detection box, the cyclist corresponding to the parent human body detection box is identified as the student's parent, and the scene in the image to be identified is a student's parent carrying a student.
[0069] In one embodiment, if there are multiple images in the non-motorized vehicle rider management platform archive that are judged to be scenes of parents carrying students (the distance between the first human frame and the second human frame is greater than a preset distance threshold), then the archive can be identified as a student's parent archive.
[0070] Furthermore, if the image to be identified shows a student's parent carrying a passenger, the school or teacher can then use this information to encourage parents to drive non-motorized vehicles safely, thereby improving the efficiency of non-motorized vehicle management.
[0071] In one possible embodiment, after determining that the first or second human body detection box is the parent's human body detection box, the image within the non-parent human body detection box (the human body detection box of the accompanying person) can be further subjected to attribute detection, such as detecting the accompanying person's age, height, backpack, school uniform, etc., to further determine whether the accompanying person is a student. Based on the accompanying person's age, height, backpack, school uniform, etc., it can be determined whether the accompanying person is a student. If the accompanying person is a student, then the person in the parent's human body detection box can be further determined to be a parent.
[0072] In this embodiment of the invention, an image of the target area to be identified is acquired, wherein the target area is the area surrounding a school; target detection is performed on the image to be identified to obtain a first human body detection box, a second human body detection box, and a non-motorized vehicle detection box, and the first human body detection box and the second human body detection box are associated through the non-motorized vehicle detection box; the difference value between the first human body detection box and the second human body detection box is calculated, and if the difference value is greater than a preset difference threshold, then the first human body detection box or the second human body detection box is determined to be a parent human body detection box; the person corresponding to the parent human body detection box is identified as a parent. By performing target detection on the image to be identified in the target area to obtain a first human body detection box, a second human body detection box, and a non-motorized vehicle detection box, and calculating the difference value between the first human body detection box and the second human body detection box, and when the difference value is greater than a preset difference threshold, then the first human body detection box or the second human body detection box is determined to be a parent human body detection box, thereby identifying the person corresponding to the parent human body detection box as a parent, solving the problem of difficulty in confirming whether non-motorized vehicle riders around schools are students' parents and the low efficiency of non-motorized vehicle management around schools.
[0073] Optionally, after performing target detection on the image to be recognized to obtain a first human body detection box, a second human body detection box, and a non-motorized vehicle detection box, the coordinates of the first center point of the first human body detection box in the image to be recognized can be determined; the coordinates of the second center point of the second human body detection box in the image to be recognized can be determined; the coordinates of the third center point of the non-motorized vehicle detection box in the image to be recognized can be determined; the coordinates of the first center point, the second center point, and the third center point can be connected in the image to be recognized to obtain an associated triangle; the area ratio between the intersection area of the associated triangle and the non-motorized vehicle detection box and the area of the associated triangle can be calculated; and the first human body detection box, the second human body detection box, and the non-motorized vehicle detection box with an area ratio greater than a preset area ratio can be associated.
[0074] In this embodiment of the invention, the first center point coordinates may be the center position of the first human body detection frame, the second center point coordinates may be the center position of the second human body detection frame, and the third center point coordinates may be the center position of the non-motorized vehicle detection frame.
[0075] The above-mentioned preset area ratio is an area ratio that has been pre-set by the system.
[0076] The above association can be understood as the connection between different regions or objects in an image. By understanding the relationships between different objects, we can better classify and locate them.
[0077] The ratio of the area of the intersection of the aforementioned associated triangle and the non-motorized vehicle detection frame to the area of the associated triangle can be understood as the ratio of the area of the intersection of the associated triangle and the non-motorized vehicle detection frame to the area of the associated triangle, and is used to measure the size of the ratio of the intersection area to the area of the associated triangle.
[0078] In this embodiment of the invention, the first center coordinates of the first human body detection box, the second center coordinates of the second human body detection box, and the third center coordinates of the non-motorized vehicle detection box in the image to be identified are determined, and the three center coordinates are connected to obtain an associated triangle. The area ratio between the intersection area of the associated triangle and the non-motorized vehicle detection box and the area of the associated triangle is calculated, and the first human body detection box, the second human body detection box, and the non-motorized vehicle detection box with an area ratio greater than a preset area ratio are associated to achieve more accurate target detection.
[0079] Optionally, in the step of calculating the difference between the first human detection box and the second human detection box, a first height of the first human detection box and a second height of the second human detection box can be determined in the image to be identified; the difference between the first height and the second height can be calculated, and the difference between the first human detection box and the second human detection box can be determined based on the difference between the first height and the second height.
[0080] In this embodiment of the invention, the first height can be understood as the height of the top of the human head in the first human body detection frame.
[0081] The aforementioned second height can be understood as the height of the top of the human head within the second human detection frame.
[0082] The difference between the first and second human body detection frames is determined based on the difference between the height of the top of the human head in the first human body detection frame and the height of the top of the human head in the second human body detection frame.
[0083] Optionally, in the step of determining the difference between the first human detection box and the second human detection box based on the difference between the first height and the second height, the shooting distance of the non-motorized vehicle in the non-motorized vehicle detection box can be determined according to the image depth information in the non-motorized vehicle detection box in the image to be identified; the image coefficient of the non-motorized vehicle can be determined according to the shooting distance; and the difference between the first human detection box and the second human detection box can be determined according to the image coefficient and the difference between the first height and the second height.
[0084] In this embodiment of the invention, the above-mentioned image depth information can be understood as image information in which the depth value of the scene acquired by the image acquisition device is used as the pixel value, and the depth value can be a distance value.
[0085] The shooting distance mentioned above can be used to determine whether it is a long shot or a close-up shot.
[0086] The above image coefficients represent the distance between the lens and the target in the distance.
[0087] The difference between the first and second human body detection boxes refers to the distance between the first and second human body detection boxes.
[0088] In this embodiment of the invention, the shooting distance of the image to be identified is determined by the image depth information within the non-motorized vehicle detection frame in the image to be identified, and the image coefficient of the non-motorized vehicle is determined based on the shooting distance. Based on the image coefficient and the difference between the first height and the second height, the difference between the first human body detection frame and the second human body detection frame is determined, so as to realize the determination of whether it is a scene of a parent carrying a student in the image to be identified.
[0089] Optionally, in the step of determining the difference between the first human detection box and the second human detection box based on the difference between the first height and the second height, the non-motorized vehicle in the non-motorized vehicle detection box can be state-identified to obtain the attitude coefficient of the non-motorized vehicle; and the difference between the first human detection box and the second human detection box can be determined according to the attitude coefficient and the difference between the first height and the second height.
[0090] In this embodiment of the invention, the above-mentioned state recognition can be understood as the process of monitoring and recognizing the state of non-motorized vehicles in order to obtain the posture of non-motorized vehicles.
[0091] The aforementioned non-motorized vehicle attitude coefficient can be understood as the attitude of the non-motorized vehicle captured by the camera. It can be the frontal attitude of the non-motorized vehicle, the rearal attitude of the non-motorized vehicle, or the side attitude of the non-motorized vehicle.
[0092] In this embodiment of the invention, the attitude coefficient of the non-motorized vehicle is obtained by performing state recognition on the non-motorized vehicle within the non-motorized vehicle detection frame, and the difference between the first human body detection frame and the second human body detection frame is determined based on the attitude coefficient and the difference between the first height and the second height.
[0093] Optionally, in the step of determining the difference between the first human detection box and the second human detection box based on the difference between the first height and the second height, the distance between the first center point and the second center point can be calculated; the difference between the first human detection box and the second human detection box can be determined based on the distance between the first center point and the second center point and the difference between the first height and the second height.
[0094] In this embodiment of the invention, the first center point refers to the position of the first center point of the first human body detection frame; the second center point refers to the position of the second center point of the second human body detection frame.
[0095] Furthermore, by calculating the distance between the first center point and the second center point, and using the distance between the first center point and the second center point, as well as the difference between the first height and the second height, the difference between the first human detection box and the second human detection box is determined to determine whether the scene in the image to be identified is a parent carrying a student.
[0096] like Figures 2-3 As shown, Figure 2 This is a scene diagram of a student and parent carrying a child, provided in an embodiment of the present invention. Figure 3 This is a scene diagram of an adult carrying a passenger, provided in an embodiment of the present invention. Figure 2 The cyclist was traveling with a companion who was a minor. The difference between the first and second human detection frames was significant. Figure 3 The cyclist and his companion were traveling together, and both were adults. The difference between the first and second human detection frames was small.
[0097] Specifically, let the image coefficient of the foreground be A, the image change coefficient of the background be a, the height of the first human body frame be H, the height of the second human body frame be h, the posture coefficient of the non-motorized vehicle be B, and the system preset gap threshold be L.
[0098] The difference value between the distant human body frames is C = (Hh)A, the difference value between the first and second distant human body frames is C = A*B(Hh)d, and the distance between the first and second human body frames is d.
[0099] The difference between the close-up human body bounding boxes is c = (Hh)a, the difference between the first and second close-up human body bounding boxes is c = a*B(Hh)d, and the distance between the first and second human body bounding boxes is d.
[0100] When the difference C between the first and second human figures in the distant view is greater than the preset difference threshold L, or when the difference C between the first and second human figures in the close view is greater than the preset difference threshold L, it can be identified as a parent carrying a student.
[0101] Optionally, after determining the first or second human body detection box as the parent's human body detection box if the difference value is greater than the preset difference threshold, the shooting time of the image to be identified can also be obtained; the difference threshold is adjusted according to the shooting time of the image to be identified to obtain the preset difference threshold, and the preset difference threshold is negatively correlated with the time interval between the shooting time and the student's departure time.
[0102] In this embodiment of the invention, the aforementioned gap threshold can be understood as a parameter used to distinguish the source or state of an image, which can be used to determine whether the cyclist and the person traveling with them in the image to be identified were taken at the same time.
[0103] The negative correlation mentioned above can be understood as two variables changing in opposite directions. When one variable changes from large to small or from small to large, the other variable changes from small to large or from large to small.
[0104] In this embodiment of the invention, the preset gap threshold decreases as the interval between the shooting time and the student's departure time increases. When the time interval increases, the gap threshold is reduced.
[0105] For example, if the time interval between the shooting time and the time when the student leaves school is small, it indicates that the driver of the non-motorized vehicle carrying people around the school is likely to be a parent, so the gap threshold can be increased; if the time interval between the shooting time and the time when the student leaves school is large, it indicates that the driver of the non-motorized vehicle carrying people around the school is likely to be a parent, so the gap threshold can be decreased to improve accuracy.
[0106] In this embodiment of the invention, the distance between the rider's and companion's body frames is used to determine whether it is a scenario of a parent carrying a student. This can determine whether the non-motorized vehicle rider is a student's parent without comparing with the public security facial recognition database and license plate database. This allows the school or teacher to supervise the student's parent to drive the non-motorized vehicle safely, thereby improving the efficiency of non-motorized vehicle management.
[0107] like Figure 4 As shown, this embodiment of the invention provides a non-motorized vehicle rider identification device, which includes:
[0108] The first acquisition module 401 is used to acquire an image of a target area to be identified, wherein the target area is the area surrounding the school.
[0109] Detection module 402 is used to perform target detection on the image to be identified to obtain a first human body detection box, a second human body detection box, and a non-motorized vehicle detection box. The first human body detection box and the second human body detection box are associated through the non-motorized vehicle detection box.
[0110] The first determining module 403 is used to calculate the difference between the first human body detection box and the second human body detection box. If the difference is greater than a preset difference threshold, the first human body detection box or the second human body detection box is determined to be a parent human body detection box.
[0111] The second determining module 404 is used to determine the person corresponding to the parent's human body detection frame as the parent.
[0112] Optionally, the device further includes:
[0113] The third determining module is used to determine the coordinates of the first center point of the first human body detection box in the image to be identified;
[0114] The fourth determining module is used to determine the coordinates of the second center point of the second human detection box in the image to be identified;
[0115] The fifth determining module is used to determine the coordinates of the third center point of the non-motorized vehicle detection frame in the image to be identified;
[0116] A connection module is used to connect the coordinates of the first center point, the second center point, and the third center point in the image to be identified to obtain an associated triangle;
[0117] The calculation module is used to calculate the area ratio between the intersection area of the associated triangle and the non-motorized vehicle detection frame and the area of the associated triangle;
[0118] The association module is used to associate the first human body detection frame, the second human body detection frame, and the non-motorized vehicle detection frame whose area ratio is greater than a preset area ratio.
[0119] Optionally, the first determining module 403 includes:
[0120] The determination submodule is used to determine the first height of the first human body detection box and the second height of the second human body detection box in the image to be identified;
[0121] The calculation submodule is used to calculate the difference between the first height and the second height, and based on the difference between the first height and the second height, to determine the gap between the first human detection box and the second human detection box.
[0122] Optionally, the computing submodule includes:
[0123] The first determining unit is used to determine the shooting distance of the non-motorized vehicle within the non-motorized vehicle detection frame based on the image depth information within the non-motorized vehicle detection frame in the image to be identified;
[0124] The first determining unit is used to determine the image coefficient of the non-motorized vehicle based on the shooting distance;
[0125] The second determining unit is used to determine the difference between the first human body detection frame and the second human body detection frame based on the image coefficient and the difference between the first height and the second height.
[0126] Optionally, the computing submodule includes:
[0127] The identification unit is used to identify the state of the non-motorized vehicles within the non-motorized vehicle detection frame and obtain the attitude coefficient of the non-motorized vehicles.
[0128] The third determining unit is used to determine the difference between the first human body detection frame and the second human body detection frame based on the posture coefficient and the difference between the first height and the second height.
[0129] Optionally, the computing submodule includes:
[0130] The calculation unit is used to calculate the distance between the first center point and the second center point;
[0131] The fourth determining unit is used to determine the difference between the first human detection frame and the second human detection frame based on the distance between the first center point and the second center point and the difference between the first height and the second height.
[0132] Optionally, the device further includes:
[0133] The second acquisition module is used to acquire the shooting time of the image to be identified;
[0134] An adjustment module is used to adjust the gap threshold according to the shooting time of the image to be identified, so as to obtain the preset gap threshold. The preset gap threshold is negatively correlated with the time interval between the shooting time and the student's departure time.
[0135] The non-motorized vehicle rider identification device provided in this embodiment of the invention can realize all the processes implemented by the non-motorized vehicle rider identification method in the above-described method embodiments, and can achieve the same beneficial effects. To avoid repetition, it will not be described again here.
[0136] See Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, such as... Figure 5 As shown, it includes: a memory 502, a processor 501, and a computer program for identifying non-motorized vehicle riders stored in the memory 502 and executable on the processor 501, wherein:
[0137] Processor 501 is used to call the computer program stored in memory 502 and perform the following steps:
[0138] Acquire an image of the target area to be identified, wherein the target area is the area surrounding the school;
[0139] Target detection is performed on the image to be identified to obtain a first human body detection box, a second human body detection box, and a non-motorized vehicle detection box. The first human body detection box and the second human body detection box are associated through the non-motorized vehicle detection box.
[0140] Calculate the difference between the first human body detection box and the second human body detection box. If the difference is greater than a preset difference threshold, then determine the first human body detection box or the second human body detection box as a parent human body detection box.
[0141] The person corresponding to the parent's human body detection frame is identified as the parent.
[0142] Optionally, after performing target detection on the image to be identified to obtain a first human detection box, a second human detection box, and a non-motorized vehicle detection box, the method executed by the processor 501 further includes:
[0143] Determine the coordinates of the first center point of the first human detection box in the image to be identified;
[0144] Determine the coordinates of the second center point of the second human detection box in the image to be identified;
[0145] Determine the coordinates of the third center point of the non-motorized vehicle detection frame in the image to be identified;
[0146] Connect the coordinates of the first center point, the second center point, and the third center point in the image to be identified to obtain an associated triangle;
[0147] Calculate the area ratio between the intersection area of the associated triangle and the non-motorized vehicle detection frame and the area of the associated triangle;
[0148] The first human body detection frame, the second human body detection frame, and the non-motorized vehicle detection frame, whose area ratio is greater than a preset area ratio, are associated.
[0149] Optionally, the calculation of the difference between the first human detection box and the second human detection box performed by the processor 501 includes:
[0150] In the image to be identified, determine the first height of the first human body detection frame and the second height of the second human body detection frame;
[0151] Calculate the difference between the first height and the second height, and based on the difference between the first height and the second height, determine the gap between the first human detection frame and the second human detection frame.
[0152] Optionally, the process performed by processor 501 to determine the difference between the first human detection box and the second human detection box based on the difference between the first height and the second height includes:
[0153] Based on the image depth information within the non-motorized vehicle detection frame in the image to be identified, the shooting distance of the non-motorized vehicle within the non-motorized vehicle detection frame is determined;
[0154] The image coefficient of the non-motorized vehicle is determined based on the shooting distance;
[0155] The difference between the first human detection frame and the second human detection frame is determined based on the image coefficient and the difference between the first height and the second height.
[0156] Optionally, the process performed by processor 501 to determine the difference between the first human detection box and the second human detection box based on the difference between the first height and the second height includes:
[0157] The non-motorized vehicles within the non-motorized vehicle detection frame are identified in terms of their state to obtain their attitude coefficients.
[0158] The difference between the first human detection frame and the second human detection frame is determined based on the posture coefficient and the difference between the first height and the second height.
[0159] Optionally, the process performed by processor 501 to determine the difference between the first human detection box and the second human detection box based on the difference between the first height and the second height includes:
[0160] Calculate the distance between the first center point and the second center point;
[0161] Based on the distance between the first center point and the second center point and the difference between the first height and the second height, the difference between the first human detection frame and the second human detection frame is determined.
[0162] Optionally, after determining that the first or second human body detection box is a parent human body detection box if the difference value is greater than a preset difference threshold, the method executed by the processor 501 further includes:
[0163] Obtain the capture time of the image to be identified;
[0164] The difference threshold is adjusted according to the shooting time of the image to be identified to obtain the preset difference threshold. The preset difference threshold is negatively correlated with the time interval between the shooting time and the student's departure time.
[0165] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the non-motorized vehicle rider identification method provided in this invention and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0166] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The computer-readable storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0167] The above description discloses only preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. Therefore, equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.
Claims
1. A method for identifying non-motorized vehicle riders, characterized in that, include: Acquire an image of the target area to be identified, wherein the target area is the area surrounding the school; Target detection is performed on the image to be identified to obtain a first human body detection box, a second human body detection box, and a non-motorized vehicle detection box. The first human body detection box and the second human body detection box are associated through the non-motorized vehicle detection box. Determine the coordinates of the first center point of the first human detection box in the image to be identified; Determine the coordinates of the second center point of the second human detection box in the image to be identified; Determine the coordinates of the third center point of the non-motorized vehicle detection frame in the image to be identified; Connect the coordinates of the first center point, the second center point, and the third center point in the image to be identified to obtain an associated triangle; Calculate the area ratio between the intersection area of the associated triangle and the non-motorized vehicle detection frame and the area of the associated triangle; Associate the first human body detection frame, the second human body detection frame, and the non-motorized vehicle detection frame whose area ratio is greater than a preset area ratio; Calculate the difference between the first human body detection box and the second human body detection box. If the difference is greater than a preset difference threshold, then determine the first human body detection box or the second human body detection box as a parent human body detection box. The person corresponding to the parent's human body detection frame is identified as the parent.
2. The method as described in claim 1, characterized in that, The calculation of the difference between the first human detection box and the second human detection box includes: In the image to be identified, the first height of the first human body detection box and the second height of the second human body detection box are determined; Calculate the difference between the first height and the second height, and based on the difference between the first height and the second height, determine the gap between the first human detection frame and the second human detection frame.
3. The method as described in claim 2, characterized in that, Determining the difference between the first human detection frame and the second human detection frame based on the difference between the first height and the second height includes: Based on the image depth information within the non-motorized vehicle detection frame in the image to be identified, the shooting distance of the non-motorized vehicle within the non-motorized vehicle detection frame is determined; The image coefficient of the non-motorized vehicle is determined based on the shooting distance; The difference between the first human detection frame and the second human detection frame is determined based on the image coefficient and the difference between the first height and the second height.
4. The method as described in claim 2, characterized in that, Determining the difference between the first human detection frame and the second human detection frame based on the difference between the first height and the second height includes: The non-motorized vehicles within the non-motorized vehicle detection frame are identified in terms of their state to obtain their attitude coefficients. The difference between the first human detection frame and the second human detection frame is determined based on the posture coefficient and the difference between the first height and the second height.
5. The method as described in claim 2, characterized in that, Determining the difference between the first human detection frame and the second human detection frame based on the difference between the first height and the second height includes: Calculate the distance between the first center point and the second center point; Based on the distance between the first center point and the second center point and the difference between the first height and the second height, the difference between the first human detection frame and the second human detection frame is determined.
6. The method as described in any one of claims 1 to 5, characterized in that, After determining that the first or second human body detection box is a parent human body detection box if the difference value is greater than a preset difference threshold, the method further includes: Obtain the capture time of the image to be identified; The difference threshold is adjusted according to the shooting time of the image to be identified to obtain the preset difference threshold. The preset difference threshold is negatively correlated with the time interval between the shooting time and the student's departure time.
7. A non-motorized vehicle rider identification device, characterized in that, For implementing the steps of the non-motorized vehicle rider identification method as described in any one of claims 1 to 6, the non-motorized vehicle rider identification device comprises: The first acquisition module is used to acquire an image of a target area to be identified, wherein the target area is the area surrounding the school. The detection module is used to perform target detection on the image to be identified, and obtain a first human body detection box, a second human body detection box, and a non-motorized vehicle detection box. The first human body detection box and the second human body detection box are associated through the non-motorized vehicle detection box. The first determining module is used to calculate the difference between the first human body detection box and the second human body detection box. If the difference is greater than a preset difference threshold, the first human body detection box or the second human body detection box is determined to be a parent human body detection box. The second determination module is used to determine the person corresponding to the parent's human body detection frame as the parent.
8. An electronic device, characterized in that, include: The memory, the processor, and the computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the non-motorized vehicle rider identification method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the non-motorized vehicle rider identification method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method, system and equipment for detecting sidewalk occupation of non-motor vehicles and storage medium
CN114332776A
Child Forward Collision Warning
US20220024488A1
