Detection alarm method and device for dangerous vehicle and dangerous vehicle detection system
By using the target detection model trained by the construction data set in key regional environments, the identification and alarm of dangerous vehicles is solved, and the missed detection problems of identifying dangerous vehicles in key regional environments in the prior art are solved, achieving higher detection accuracy.
Patent Information
- Application Number
- CN202411534372.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art is difficult to accurately identify dangerous vehicles in key regional environments, resulting in mis-checking or missed inspections during monitoring.
A large object detection model trained based on the constructed data set is used to detect and identify the video or image of the target area, generate a first tag including dangerous vehicle information, and generate alarm information in combination with the image and tag.
By building a data set, the detection accuracy of the target detection model is improved, and the probability of false detection or missed detection in monitoring of dangerous vehicles is reduced.
Smart Images

Figure CN119516688A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle identification technology, for example, to a method and device for detecting and alarming dangerous vehicles, and a dangerous vehicle detection system. Background Art
[0002] Dangerous vehicles (such as oil tankers, LNG transporters, chemical transporters, etc.) will cause great damage to the surrounding environment when they break down. Especially in important areas (such as densely populated areas, near hospitals, near schools, etc.), casualties may occur. Therefore, when dangerous vehicles enter important areas, they need to be monitored to prevent major safety incidents.
[0003] The related art discloses a method for identifying a vehicle, comprising: acquiring a picture with a vehicle; inputting the picture into a trained vehicle identification model to classify the vehicle; identifying the type of the vehicle and determining the confidence level of classifying the vehicle as a dangerous vehicle; if the confidence level is less than a preset threshold, performing a dangerous goods mark detection on the picture, so as to determine that the vehicle is a dangerous vehicle when it is detected that the picture includes a dangerous goods mark.
[0004] In the process of implementing the embodiments of the present disclosure, it is found that there are at least the following problems in the related art:
[0005] Although the relevant technology can identify dangerous vehicles, it does not involve the identification of dangerous vehicles in key areas. It is difficult to collect scene data in key areas, and there are problems of false detection or missed detection in the monitoring of dangerous vehicles.
[0006] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0007] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0008] The embodiments of the present disclosure provide a method and device for detecting and alarming dangerous vehicles, and a dangerous vehicle detection system, so as to reduce the probability of false detection or missed detection in dangerous vehicle monitoring.
[0009] In some embodiments, the method includes: acquiring a video or image of a target area; using a large target detection model to detect and identify the video or image to identify a target image containing a dangerous vehicle and generate a first label; the first label includes information about the dangerous vehicle in the target image; the large target detection model is obtained through training based on a constructed data set; and generating an alarm message based on the target image and the first label to push the alarm message.
[0010] In some embodiments, the device includes: a processor and a memory storing program instructions, and the processor is configured to execute the aforementioned detection and alarm method for dangerous vehicles when running the program instructions.
[0011] In some embodiments, the dangerous vehicle detection system includes: an image acquisition device for acquiring images or videos of a target area; a detection and alarm device for dangerous vehicles as described above, which communicates with the image acquisition device to detect and identify the acquired images or videos, and to process the identification information.
[0012] The method and device for detecting and alarming dangerous vehicles and the dangerous vehicle detection system provided by the embodiments of the present disclosure can achieve the following technical effects:
[0013] The target detection model obtained by training based on the constructed data set detects and identifies the video or image of the target area; to obtain the target image including the dangerous vehicle and the first label. Then, combining the target image and the first label, an alarm message is generated and pushed. In this way, the detection accuracy of the target detection model is improved through the constructed data set, reducing the possibility of false detection or missed detection.
[0014] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:
[0016] Figure 1 is a schematic diagram of a method for detecting and alarming dangerous vehicles provided by an embodiment of the present disclosure;
[0017] Figure 2 is a schematic diagram of a method for obtaining a constructed data set in the method provided in an embodiment of the present disclosure;
[0018] Figure 3 is a schematic diagram of another method for detecting and alarming dangerous vehicles provided by an embodiment of the present disclosure;
[0019] Figure 4 is a schematic diagram of applying a first label to a target image in the method provided by an embodiment of the present disclosure;
[0020] Figure 5 is a schematic diagram of another method for detecting and alarming dangerous vehicles provided by an embodiment of the present disclosure;
[0021] Figure 6 is a schematic diagram of a dangerous vehicle detection system provided by an embodiment of the present disclosure;
[0022] Figure 7 is a schematic diagram of a detection and alarm device for dangerous vehicles provided by an embodiment of the present disclosure;
[0023] Figure 8 Schematic diagram of a dangerous vehicle detection system provided by an embodiment of the present disclosure.
[0024] Reference numerals:
[0025] 100: device for detecting and alarming dangerous vehicles; 101: processor; 102: memory; 103: communication interface; 104: bus; 200: dangerous vehicle detection system; 201: image acquisition device; 202: computing server; 203: storage server. DETAILED DESCRIPTION
[0026] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.
[0027] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0028] Unless otherwise stated, the term "plurality" means two or more.
[0029] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.
[0030] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0031] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.
[0032] Combination Figure 1 As shown, the embodiment of the present disclosure provides a detection and alarm method for dangerous vehicles, comprising:
[0033] S101, the server obtains a video or image of a target area.
[0034] S102, the server uses the target detection model to detect and identify the video or image to identify the target image containing the dangerous vehicle and generate a first label. The first label includes information about the dangerous vehicle in the target image; the target detection model is obtained by training based on the constructed data set.
[0035] S103: The server generates alarm information according to the target image and the first tag, and pushes the alarm information.
[0036] Here, the target area includes areas that need to be monitored, such as areas with dense population, near hospitals, near schools and other key areas. Cameras, cameras and other image acquisition devices are set up in the target area to capture images or videos of the target area. The image acquisition device transmits the collected information to the server, and the server obtains the video or image of the target area and analyzes and processes it to identify dangerous vehicles. Specifically, the server calls the target detection large model to detect and identify the video or image. Among them, the target detection large model includes a visual model or a Transformer model based on a neural network; as an example, the target detection large model is a Grounding DINO model. The target detection large model is stored in a server or a dedicated storage server and can be retrieved each time it is used. The target detection large model is obtained after training based on the constructed data set, so that the model meets the accuracy of dangerous vehicle identification in the target area.
[0037] The target detection model can detect and identify dangerous vehicles in videos or images, thereby obtaining a target image and generating a first label including dangerous vehicle information based on the target image. The first label includes the type of dangerous vehicle and the location information in the target image. Finally, the target image and the first label of the target image are fused into alarm information, and the alarm information is pushed; for example, to a related monitoring platform. In this way, monitoring of dangerous vehicles is achieved to prevent safety incidents.
[0038] In addition, in the disclosed embodiment, the constructed data set is used to train the big model to obtain the target detection big model. Because there are fewer dangerous vehicles in key areas, it is difficult to collect dangerous vehicle data in key areas. Therefore, the data set for training the model here is not a collected historical data set, but a constructed data set. Specifically, images of various types of dangerous vehicles in a variety of scenarios can be generated based on the Wenshengtu big model, and the generated images can be used as the data set for training the detection big model. In this way, it helps to enrich the data of the data set, so that the detection accuracy of the target detection big model is better, and the possibility of false detection or missed detection is reduced.
[0039] The detection and alarm method for dangerous vehicles provided by the embodiment of the present disclosure is used to detect and identify the video or image of the target area based on the target detection large model obtained by training the constructed data set; to obtain the target image including the dangerous vehicle and the first label. Then, combining the target image and the first label, an alarm message is generated and pushed. In this way, the detection accuracy of the target detection large model is improved through the constructed data set, and the possibility of false detection or missed detection is reduced.
[0040] Optionally, the target detection large model in step S102 is obtained by:
[0041] The server uses the constructed data set to train a large target detection model; the constructed data set is a data set of dangerous vehicles based on preset scenarios, and the preset scenarios include various types of crowded scenes.
[0042] When the number of training times or training parameters of the target detection large model meet the first condition, the server obtains the trained target detection large model.
[0043] Here, the constructed dataset includes datasets of various dangerous vehicle images in various types of crowded scenes. Crowded scenes include key area scenes mentioned above, such as school surrounding road scenes, etc. Dangerous vehicle types include not only vehicle categories (such as tankers, chemical transporters, etc.), but also vehicle size, color, etc. In this way, the target detection model is trained using the dangerous vehicle dataset in key area scenes, which strengthens the target detection model's ability to detect and identify dangerous vehicles in key area scenes.
[0044] When training the target detection large model, determine whether to end the training based on whether the number of training times or the training parameters meet the first condition. Specifically, the first condition can be the maximum number of training times, such as the maximum number of training times is 6 to 10 times. When the number of training times is greater than or equal to the maximum number of training times, stop training the target detection large model to obtain a trained model. The first condition can also be a training parameter, and the training parameters include multiple ones, each training parameter corresponds to a target value (the target value can be a specific value or a range of values). As an example, Table 1 shows some training parameter settings for the Grounding DINO model.
[0045] Table 1 Some training parameter settings of Grounding DINO model
[0046]
[0047]
[0048] In this way, when the number of training times or training parameters meet the first condition, the model training is completed, and a target detection model with the ability to detect and identify dangerous vehicles in key area scenarios is obtained. In addition, optionally, the target detection model is a GroundingDINO model. This model has better generalization and can identify characteristic objects or characteristic areas (such as dangerous vehicles) in positioning images. This enables more accurate and extensive detection of dangerous vehicles in a variety of preset scenarios.
[0049] Combination Figure 2 As shown, optionally, in step S102, the server obtains the constructed data set in the following manner:
[0050] S121, the server generates a dangerous vehicle image of a preset scene using the target text graph model.
[0051] S122: The server marks each generated dangerous vehicle image according to the detection frame and the dangerous vehicle type to obtain a corresponding first label.
[0052] S123, the server uses the generated dangerous vehicle image and the corresponding first label as a data set.
[0053] Here, the target text graph model is used to generate dangerous vehicle images of preset scenes. The target text graph model can be PanGu-Draw, Imagen&Imagen 2, Stable Diffusion 3 model, etc., and the target text graph model is a trained model. Then, the generated dangerous vehicle image is marked using the detection frame coordinates. Based on the marking information and the dangerous vehicle type, the first label corresponding to the image is obtained. In the detection and recognition task, the detection frame is used to identify the target object in the image, and the detection frame coordinates can accurately locate the target object in the image. In this way, the detection frame coordinates and the information of the dangerous vehicle type can constitute the first label corresponding to the image. Among them, the dangerous vehicle type can be represented by numbers, characters, etc. In this way, each generated dangerous vehicle image has a corresponding first label, and the dangerous vehicle image and the corresponding first label constitute a data set. In this way, the target text graph model is used to construct a data set to solve the problem of difficult data collection. At the same time, it also makes the data set richer, including dangerous vehicle data in multiple scenarios, which helps to improve the detection accuracy of the target detection large model.
[0054] Optionally, in step S121, the server obtains the target text graph model in the following manner:
[0055] The server collects historical dangerous vehicle images under preset scenarios, and marks each historical dangerous vehicle image to obtain a corresponding second label.
[0056] The server uses the historical dangerous vehicle images and the corresponding second labels as a material data set.
[0057] The server trains the text graph model using the material data set until the corresponding number of training times or training parameters meet the second condition to obtain a target text graph model.
[0058] Here, in order to ensure that the text graph model can generate images that meet the requirements based on the text description, the text graph model will be trained. Therefore, the embodiment of the present disclosure collects historical pictures to construct a material data set. Specifically, historical dangerous vehicle pictures under preset scenes are collected, and the historical dangerous vehicle pictures are marked to obtain a second label. Among them, the second label includes keywords describing dangerous vehicles in the picture, such as vehicle type. It can be understood that when generating an image, in order to ensure that the generated image meets the requirements, the more detailed the description of information such as the type of dangerous vehicle and the scene information is, the better, that is, enough keywords are provided. Therefore, multiple keywords can be marked for historical dangerous vehicle pictures to form a second label. In this way, the second label corresponds to the historical dangerous vehicle pictures one by one to form a material data set.
[0059] Then, the Wensheng graph model is trained using the material data set. When the number of training times or the training parameters meet the second condition, the training is terminated to obtain the target Wensheng graph model. In the disclosed embodiment, the Wensheng graph model is a Stable Diffusion3 model. Among them, the Stable Diffusion 3 model introduces the Lora low-rank matrix to assist in the training of the Wensheng graph model. The second condition can be the maximum number of training times, such as 6 times, 8 times or 10 times. The second condition can also be the training parameters of the Wensheng graph model, as shown in Table 2. The parameter values in Table 2 are only examples, and the actual values are set based on demand.
[0060] Table 2 Some training parameter settings of Stable Diffusion 3 model
[0061]
[0062]
[0063] Optionally, at S122, the server labels each generated dangerous vehicle image according to the detection frame and the dangerous vehicle type to obtain a corresponding first label, including:
[0064] The server marks the dangerous vehicle in each generated dangerous vehicle image using the first coordinate and the second coordinate of the detection frame; and marks the vehicle category of the dangerous vehicle.
[0065] The server uses the coordinates of the detection box and the vehicle type as the first label of the dangerous vehicle image.
[0066] Here, the first coordinate refers to the coordinate of the upper left corner of the detection frame, and the second coordinate refers to the coordinate of the lower right corner of the detection frame. In this way, the two coordinates on the diagonal of the detection frame can be used to characterize a unique detection frame. The upper left corner coordinate and the lower right corner coordinate of the detection frame are used to mark the dangerous vehicle in the generated dangerous vehicle image. In this way, the two coordinates can mark the position of the dangerous vehicle in the image. While marking the dangerous vehicle, the type of the dangerous vehicle is also marked. The coordinates of the detection frame and the vehicle type are combined into a list, and the list is used as the first label corresponding to the image. As an example, the coordinates of the upper left corner of the detection frame are x1, y1, the coordinates of the lower right corner are x2, y2, and the dangerous vehicle category is cls, and the list [x1, y1, x2, y2, cls] is composed as the first label of the image. In this way, a constructed data set is obtained for training a large model for target detection. In addition, in some embodiments, the first coordinate can be the left small corner coordinate, and the second coordinate can be the upper right corner coordinate, so that a unique detection frame can also be determined.
[0067] Combination Figure 3 As shown, the embodiment of the present disclosure provides another detection and alarm method for dangerous vehicles, including:
[0068] S101, the server obtains a video or image of a target area.
[0069] S102, the server detects and identifies the video or image according to the target detection model to identify the target image containing the dangerous vehicle and generate a first label. The first label includes information about the dangerous vehicle in the target image; the target detection model is obtained by training based on the constructed data set.
[0070] S131, the server obtains data information of a target image acquisition device corresponding to a target image.
[0071] S132, the server fuses the first tag of the target image and the data information of the target image acquisition device to generate alarm information.
[0072] Here, after the target image is identified, the data information of the target image acquisition device corresponding to the target image is obtained. It can be understood that there are multiple image acquisition devices in the target area, and the installation position of each image acquisition device is different. The data information includes the installation position of the image acquisition device, which can characterize the location information of the dangerous vehicle. Therefore, the target image acquisition device corresponding to the target image is obtained to locate the location information of the dangerous vehicle. Then, the first label of the target image and the data information of the target image acquisition device are fused to generate an alarm message. Among them, the information is fused to ensure the uniformity of the data format and easy understanding and data storage.
[0073] Optionally, in step S132, the server fuses the first tag of the target image and the data information of the target image acquisition device to generate alarm information, including:
[0074] The server marks the first tag of the target image on the target image, and converts the marked target image into a preset coding format.
[0075] The server converts the target image in the preset coding format and the data information of the target acquisition device into the preset data format to obtain the alarm information in the preset data format.
[0076] Here, the first label is marked in the target image to clearly identify the location and type of the dangerous vehicle in the target image. In this way, it is convenient to intuitively display the detection and recognition results. The preset encoding format in the embodiment of the present disclosure is the base64 encoding format, and other encoding formats such as binary can also be selected based on needs. As an example, combined with Figure 4Take a truck as an example to show the first label in the image. Among them, (x1, y1) is the coordinate of the upper left corner, (x2, y2) is the coordinate of the lower right corner, and the vehicle type is truck. Then, the target image in the preset encoding format and the data information of the target acquisition device are converted into a preset data format. Among them, the preset data format refers to a format that is easy to be parsed and processed by a programming language, such as json format, XML format, etc.
[0077] In addition, the data information of the target acquisition device includes the road where the device is located, the location of the device, the acquisition time of the target image, the camera number, etc. As an example, the data information of the target acquisition device includes the camera name (camera_name), camera number (camera_code), location (camera_place), longitude and latitude (longitude_latitude), detection time (warning_time), dangerous vehicle category (truck_cls), and the alarm information content is as follows:
[0078] {
[0079] "camera_name":"camera1",
[0080] "camera_code":"camera_code_abc",
[0081] "camera_place":"×× Road",
[0082] "longitude_latitude":[123.123, 456.456]
[0083] "warning_time":"2024-01-01 12:35:40",
[0084] "truck_cls":"oil_truck",
[0085] "img_base64":"abc123",
[0086] }
[0087] Among them, img_base64 refers to the target image in the preset encoding format, and abc123 is the number of the target image. In this way, the visualization of the alarm information is improved, and the data is simplified for storage, transmission, and subsequent data analysis.
[0088] Combination Figure 5 As shown, the embodiment of the present disclosure provides another detection and alarm method for dangerous vehicles, including:
[0089] S101, the server obtains the video of the target area.
[0090] S204: The server decodes the video to obtain image frames.
[0091] S205, the server inputs the image frames into the target detection model frame by frame, and inputs the prompt word of the vehicle category of the dangerous vehicle.
[0092] S102, the server uses the target detection model to detect and identify the image frame to identify the target image containing the dangerous vehicle and generate a first label. The first label includes information about the dangerous vehicle in the target image; the target detection model is obtained by training based on the constructed data set.
[0093] S103: The server generates alarm information according to the target image and the first tag, and pushes the alarm information.
[0094] Here, the target detection model cannot directly detect and identify the video (that is, the video cannot be directly used as the input of the target detection model), so after obtaining the video of the target area, the video stream is decoded into image frames. The image frames are input into the target detection model frame by frame and the prompt words are input. The target detection model detects and identifies the image frames based on the prompt words to identify dangerous vehicles in the image frames. In addition, when acquiring the image of the target area and inputting the target image into the target detection model, the prompt words also need to be input. As an example, the prompt words include "oil truck", "LNG truck", "cement truck", etc.
[0095] Combination Figure 6 As shown, the embodiment of the present disclosure provides a dangerous vehicle detection system 200, including: an image acquisition device 201 and a server. The image acquisition device 201 is used to acquire images or videos of a target area. The server receives the images or videos acquired by the image acquisition device and executes the detection and alarm method for dangerous vehicles described above.
[0096] Optionally, the server includes a computing server 202 and a storage server 203. The computing memory is used to receive images or videos captured by the image acquisition device, and call the target detection model to identify the image or video; when a target image containing a dangerous vehicle is detected, the alarm information is pushed to the relevant platform and synchronously stored in the storage server. The storage server is communicatively connected to the computing memory, and is used to store the data information of the image acquisition device, and before the computing memory generates the alarm information, the stored data information of the image acquisition device is sent to the computing memory; and after the computing memory generates the alarm information, the alarm information is stored. In addition, the target text image model is also stored in the computing memory and called when in use.
[0097] Combination Figure 7 As shown, an embodiment of the present disclosure provides a device 100 for detecting and alarming dangerous vehicles, including a processor 101 and a memory 102. Optionally, the device 100 may also include a communication interface 103 and a bus 104. The processor 101, the communication interface 103, and the memory 102 may communicate with each other through the bus 104. The communication interface 103 may be used for information transmission. The processor 101 may call the logic instructions in the memory 102 to execute the method for detecting and alarming dangerous vehicles of the above embodiment.
[0098] In addition, the logic instructions in the memory 102 described above may be implemented in the form of software functional units and when sold or used as independent products, may be stored in a computer-readable storage medium.
[0099] The memory 102 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor 101 executes the function application and data processing by running the program instructions / modules stored in the memory 102, that is, the method for detecting and alarming dangerous vehicles in the above embodiment is implemented.
[0100] The memory 102 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 102 may include a high-speed random access memory and may also include a non-volatile memory.
[0101] Combination Figure 8 As shown, the embodiment of the present disclosure provides another dangerous vehicle detection system 200, including: an image acquisition device 201, used to acquire images or videos of a target area; and the above-mentioned device 100 for detecting and alarming dangerous vehicles. The device 100 for detecting and alarming dangerous vehicles communicates with the image acquisition device to detect and identify the acquired images or videos, and process the identification information. It can be understood by those skilled in the art that the device 100 for detecting and alarming dangerous vehicles can be adapted to a feasible subject, thereby realizing other feasible embodiments.
[0102] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the above-mentioned method for detecting and alarming dangerous vehicles.
[0103] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes.
[0104] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0105] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods for each specific application to implement the described functions, but such implementations should not be considered to exceed the scope of the embodiments of the present disclosure. The technicians may clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above may refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0106] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0107] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A detection and alarm method for dangerous vehicles, characterized in that: include: Acquire video or images of the target area; Using the target detection model, the video or image is detected and recognized to identify the target image containing the dangerous vehicle and generate a first label; the first label includes information about the dangerous vehicle in the target image; The large target detection model is obtained by training based on the constructed dataset; According to the target image and the first tag, alarm information is generated to push the alarm information.
2. The method according to claim 1, characterized in that Get the target detection model in the following ways: The constructed data set is used to train a large target detection model; the constructed data set is a data set of dangerous vehicles based on preset scenarios, and the preset scenarios include various types of crowded scenes; When the number of training times or training parameters of the target detection large model meet the first condition, the trained target detection large model is obtained.
3. The method according to claim 1, characterized in that: Get the constructed dataset by: Generate dangerous vehicle images of preset scenarios using the target text graph model; Marking each generated dangerous vehicle image according to the detection frame coordinates and the dangerous vehicle type to obtain a corresponding first label; The generated dangerous vehicle images and the corresponding first labels are used as a data set.
4. The method according to claim 3, characterized in that The target text graph model is obtained by: Collect historical dangerous vehicle images under preset scenarios, and mark each historical dangerous vehicle image to obtain a corresponding second label; The historical dangerous vehicle images and the corresponding second labels are used as a material dataset; The text graph model is trained using the material data set until the corresponding number of training times or training parameters meet the second condition to obtain a target text graph model.
5. The method according to claim 3, characterized in that: According to the detection frame coordinates and the dangerous vehicle type, each generated dangerous vehicle image is labeled to obtain a corresponding first label, including: Using the first coordinate and the second coordinate of the detection frame, marking the dangerous vehicle in each generated dangerous vehicle image; and marking the vehicle category of the dangerous vehicle; The coordinates of the detection box and the vehicle type are used as the first label of the dangerous vehicle image.
6. The method according to claim 1, characterized in that Generate alarm information according to the target image and the first label, including: Acquire data information of a target image acquisition device corresponding to the target image; The first label of the target image and the data information of the corresponding target image acquisition device are fused to generate alarm information.
7. The method according to claim 6, characterized in that The first label of the target image and the data information of the corresponding target acquisition device are merged to generate alarm information, including: Marking the first label of the target image on the target image, and converting the marked target image into a preset coding format; The target image in a preset coding format and the data information of the target acquisition device are converted into a preset data format to obtain alarm information in the preset data format.
8. The method according to any one of claims 1 to 7, characterized in that: Before detecting and identifying the video using the target detection model, the method further includes: Decode the video to obtain image frames; The image frames are input into the trained target detection model frame by frame, and the prompt words of the vehicle category of the dangerous vehicle are input.
9. A detection and alarm device for dangerous vehicles, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the detection and alarm method for dangerous vehicles according to any one of claims 1 to 8 when running the program instructions.
10. A dangerous vehicle detection system, characterized in that: include: An image acquisition device for acquiring images or videos of a target area; The detection and alarm device for dangerous vehicles as described in claim 9 communicates with an image acquisition device to detect and identify the acquired images or videos and process the identification information.