Road occupation detection method, system, electronic device and readable storage medium

Through the method of combining image segmentation and detection, the problem of false detection and insufficient robustness in the detection of road occupying behavior is solved, the detection accuracy and scene adaptability are improved, and the requirements of complex scenes are met.

CN114648718BActive Publication Date: 2024-10-18CHONGQING UNISINSIGHT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202210313238.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-28
Publication Date
2024-10-18
Estimated Expiration
2042-03-28

AI Technical Summary

Technical Problem

The existing technology has problems in detecting road occupying behaviors, such as many false detections and missed detections, insufficient robustness, low recognition accuracy, and difficulty in adapting to complex scenarios.

Method used

Using a method that combines image segmentation and image detection, the original image is obtained for area segmentation, the area of ​​road occupation to be tested is determined based on the benchmark image comparison, and the target object in the image of road occupation to be tested is detected to determine whether there is illegal road occupation. Behavior.

Benefits of technology

It improves the accuracy of road occupation behavior detection, improves scene adaptability, meets the needs of more complex scenarios, reduces deployment and configuration requirements, and improves the recall rate of road occupation events.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114648718B_ABST
    Figure CN114648718B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of image detection, and discloses a road occupation detection method, system, electronic device and readable storage medium. The method obtains one or more original images corresponding to a target road, performs regional segmentation on the target road according to the original images, obtains a road distribution area corresponding to the target road, determines a road occupation area to be detected from the road distribution area based on a comparison result between the original image and a preset reference image, determines a road occupation image to be detected corresponding to the road occupation area to be detected according to the original image, detects a target object in the road occupation image to be detected, determines whether there is illegal road occupation on the target road according to the detection result of the target object, and detects whether there is illegal road occupation on the target road by combining image segmentation and image detection. Compared with a single detection method, the accuracy of road occupation detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image detection technology, and in particular to a road occupation detection method, system, electronic device and readable storage medium. Background Art

[0002] At present, with the rapid development of economy and society, people's requirements for living environment are constantly improving. However, with the development of economy, the phenomena of road occupation such as business, stacking of goods on the road, and cross-store business on urban roads cannot be effectively controlled by manual inspection alone, which makes the phenomenon of road occupation emerge in an endless stream and repeatedly banned, hindering the progress of urban civilization and residents' quality of life, and becoming a major problem in urban appearance management and sanitation management.

[0003] In order to improve the inspection efficiency of road occupation and develop automated urban management technology, road occupation behavior detection through image detection has emerged. However, due to the complexity and changeability of actual road monitoring scenes, there are many monitoring difficulties such as fast and large environmental changes, complex environments, and many occlusions. As a result, image detection methods such as video static image detection, image comparison, and dynamic frame behavior recognition have a single basis for detecting road occupation behavior, and there are many problems such as false detections and lack of robustness, and the recognition accuracy is low. Summary of the invention

[0004] 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.

[0005] In view of the shortcomings of the prior art mentioned above, the present invention discloses a road occupying detection method, system, electronic device and readable storage medium, which combine image segmentation and image detection to detect road occupying behavior and improve the accuracy of road occupying behavior detection.

[0006] The present invention discloses a road occupation detection method, comprising: acquiring one or more original images corresponding to a target road, performing regional segmentation on the target road according to the original images to obtain a road distribution area corresponding to the target road; determining a road occupation area to be detected from the road distribution area based on a comparison result between the original images and a preset reference image, and determining a road occupation image to be detected corresponding to the road occupation area to be detected according to the original images; detecting a target object in the road occupation image to be detected, and judging whether there is illegal road occupation on the target road according to the detection result of the target object.

[0007] Optionally, the road occupied area to be measured is determined from the road distribution area based on the comparison result between the original image and the preset reference image, including: judging whether the road distribution area has changed based on the comparison result between the original image and the reference image; determining the changed road distribution area as a road change area, and determining the road change duration corresponding to the road change area; determining the road change area whose road change duration is greater than or equal to a preset duration threshold as the road occupied area to be measured.

[0008] Optionally, determining the road occupied image to be measured corresponding to the road occupied area to be measured based on the original image includes: extracting the road area image corresponding to the road occupied area to be measured from the original image based on connected area detection; determining the minimum circumscribed matrix area image of the road area image in the original image as the first alternative image, and determining the original image corresponding to the first alternative image as the second alternative image; determining the first alternative image and / or the second alternative image as the road occupied image to be measured corresponding to the road occupied area to be measured.

[0009] Optionally, judging whether there is any illegal road occupation on the target road according to the detection result of the target object includes: judging whether there is the target object in the road occupation image to be tested according to the detection result; if the target object exists in the road occupation image to be tested, determining that there is illegal road occupation on the target road; if the target object does not exist in the road occupation image to be tested, determining that the target road is in a normal state.

[0010] Optionally, the original image is obtained in the following manner: obtaining a captured video stream corresponding to the target road, the captured video stream comprising a plurality of captured image frames; and extracting the original image corresponding to the target road from the captured image frames.

[0011] Optionally, the target road is segmented into regions according to the original image to obtain a road distribution area corresponding to the target road, including: inputting the original image into a road segmentation model, the road segmentation model outputting a region segmentation image corresponding to the original image, wherein the road segmentation model is obtained by training a neural network model with road sample images with road area labels; and determining the road distribution area corresponding to the target road according to the region segmentation image.

[0012] Optionally, the method further includes at least one of the following: performing data processing on the road sample image, the data processing including at least one of random crop, adding random noise, and random brightness change; integrating a model acceleration tool into the road segmentation model.

[0013] The present invention discloses a road occupation detection system, comprising: an acquisition module, used to acquire one or more original images corresponding to a target road, and perform region segmentation on the target road according to the original images to obtain a road distribution area corresponding to the target road; a determination module, used to determine a road occupation area to be detected from the road distribution area based on a comparison result between the original image and a preset reference image, and determine a road occupation image to be detected corresponding to the road occupation area to be detected according to the original image; a detection module, used to detect a target object in the road occupation image to be detected, and determine whether there is illegal road occupation on the target road according to the detection result of the target object

[0014] The present invention discloses an electronic device, comprising: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the above method.

[0015] The present invention discloses a computer-readable storage medium, on which a computer program is stored: when the computer program is executed by a processor, the above method is implemented.

[0016] Beneficial effects of the present invention:

[0017] Obtain one or more original images corresponding to the target road, perform regional segmentation on the target road according to the original images, obtain the road distribution area corresponding to the target road, determine the road occupation area to be tested from the road distribution area based on the comparison result between the original image and the preset reference image, determine the road occupation image to be tested corresponding to the road occupation area to be tested according to the original image, detect the target object in the road occupation image to be tested, and determine whether there is illegal road occupation on the target road according to the detection result of the target object. In this way, combining image segmentation and image detection to detect whether there is illegal road occupation on the target road can improve the accuracy of road occupation detection compared to a single detection method, and at the same time, can meet more complex scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a schematic flow chart of a road occupation detection method in an embodiment of the present invention;

[0019] Figure 2 is a flow chart of another road occupation detection method in an embodiment of the present invention;

[0020] Figure 3 is a schematic structural diagram of a road occupation detection system in an embodiment of the present invention;

[0021] Figure 4 It is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The following describes the embodiments of the present invention through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and sub-samples in the embodiments can be combined with each other without conflict.

[0023] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0024] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0025] 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.

[0026] Unless otherwise stated, the term "plurality" means two or more.

[0027] 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.

[0028] 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.

[0029] Combination Figure 1 As shown, the embodiment of the present disclosure provides a road occupation detection method, including:

[0030] Step S101, obtaining one or more original images corresponding to a target road, performing region segmentation on the target road according to the original images, and obtaining a road distribution region corresponding to the target road;

[0031] Step S102, determining a road-occupied area to be measured from the road distribution area based on a comparison result between the original image and a preset reference image, and determining a road-occupied image to be measured corresponding to the road-occupied area to be measured according to the original image;

[0032] Step S103, detecting the target object in the road-occupying image to be detected, and judging whether there is any illegal road-occupying behavior on the target road according to the detection result of the target object.

[0033] The road occupation detection method provided by the embodiment of the present disclosure is adopted to obtain one or more original images corresponding to the target road, perform regional segmentation on the target road according to the original images, obtain the road distribution area corresponding to the target road, determine the road occupation area to be tested from the road distribution area based on the comparison result between the original image and the preset reference image, determine the road occupation image to be tested corresponding to the road occupation area to be tested according to the original image, detect the target object in the road occupation image to be tested, and judge whether there is illegal road occupation on the target road according to the detection result of the target object. In this way, combining image segmentation and image detection to detect whether there is illegal road occupation on the target road improves the accuracy of road occupation detection compared to a single detection method, and at the same time, improves the scene adaptability, meets more complex scenes, thereby reducing deployment and configuration requirements and improving the recall rate of road occupation events.

[0034] Optionally, the original image is obtained in the following manner: obtaining a captured video stream corresponding to the target road, the captured video stream including a plurality of captured image frames; and extracting the original image corresponding to the target road from the captured image frames.

[0035] Optionally, obtaining a captured video stream corresponding to the target road includes: capturing the captured video stream corresponding to the target road through a front-end device, wherein the front-end device includes an IPC (IP CAMERA, network camera), an NVR (Network Video Recorder) and other capturing devices.

[0036] In some embodiments, a front-end device point is selected on a target street, a monitoring area of ​​interest is configured, and a video image stream of the front-end device point is connected to an electronic device for implementing a road occupation detection method, thereby achieving real-time monitoring and alarm of street pavement occupancy.

[0037] Optionally, extracting the original image corresponding to the target road from the acquired image frame includes: randomly sampling the acquired image frame to obtain the original image corresponding to the target road.

[0038] In some embodiments, after the video image stream of the target road is obtained from the front-end device, a sampling analysis is performed on the video image stream.

[0039] Optionally, the target road is segmented into regions according to the original image to obtain a road distribution area corresponding to the target road, including: inputting the original image into a road segmentation model, the road segmentation model outputting a region segmentation image corresponding to the original image, wherein the road segmentation model is obtained by training a neural network model with road sample images with road region labels; and determining the road distribution area corresponding to the target road according to the region segmentation image.

[0040] Optionally, the road area label includes one or more road categories such as sidewalk, zebra crossing, cement road, and stone road.

[0041] Optionally, the region segmentation image is used to characterize the distribution of the target road, and the road distribution area corresponding to the target road is determined according to the region segmentation image, including: generating a road distribution record according to the region segmentation image, and the road distribution record is used to characterize the relationship between each road distribution area in the target road and time.

[0042] In some embodiments, 100,000 different road monitoring pictures are collected, all road pavement areas in the pictures are marked, and other areas are regarded as backgrounds. The data set is evenly divided into a training set and a validation set in a ratio of 9:1, that is, 90,000 training sets and 10,000 validation sets; PyTorch (a Python machine learning library based on Torch), TensorFlow (a symbolic mathematical system based on data flow programming) or other deep learning frameworks are used to build a DeepLab v3 image segmentation model structure, and the labeled road pavement segmentation data set is used to train the aforementioned model; random cropping, random noise addition, random brightness change data enhancement and other operations can be performed on the training set; during training, the Adam optimization algorithm is used, the learning rate is set to 1e-5, the batch (training group) size is set to 32, the maximum training rounds are set to 100, and the stopping condition is set to 20 consecutive rounds of training without obtaining a lower validation set loss value; after the training is completed, a road segmentation model is obtained.

[0043] Optionally, the method further includes: performing data processing on the road sample image, wherein the data processing includes at least one of random cropping, adding random noise, and random brightness change.

[0044] Optionally, the method further comprises: integrating a model acceleration tool into the road segmentation model.

[0045] In some embodiments, the model acceleration tool includes TensorRT, a neural network inference engine.

[0046] Optionally, the road occupied area to be measured is determined from the road distribution area based on the comparison result between the original image and the preset reference image, including: judging whether the road distribution area has changed based on the comparison result between the original image and the reference image; determining the changed road distribution area as the road change area, and determining the road change duration corresponding to the road change area; determining the road change area with a road change duration greater than or equal to a preset duration threshold as the road occupied area to be measured.

[0047] In some embodiments, image alignment is achieved through the SSIM algorithm.

[0048] In some embodiments, the preset duration threshold includes 1-24 hours.

[0049] Optionally, determining the road occupation area to be tested from the road distribution area based on the comparison result between the original image and the preset reference image includes: determining the road distribution difference between each original image and the reference image based on the comparison result between the original image and the reference image, and generating a road change record based on the road distribution record, wherein the road change record is used to characterize the change of each road distribution area in the target road over time; and filtering out the road distribution area that meets the change time from the road change record based on a preset time threshold to obtain the road occupation area to be tested. In this way, the spatiotemporal record obtained by long-term and multiple detections can be used to more accurately judge the road occupation event.

[0050] Optionally, determining the road occupied image to be measured corresponding to the road occupied area to be measured based on the original image includes: extracting the road area image corresponding to the road occupied area to be measured from the original image based on connected area detection; determining the minimum circumscribed matrix area image of the road area image in the original image as the first alternative image, and determining the original image corresponding to the first alternative image as the second alternative image; determining the first alternative image and / or the second alternative image as the road occupied image to be measured corresponding to the road occupied area to be measured.

[0051] Optionally, there are one or more images of the road area to be measured and the road area image.

[0052] Optionally, detecting the target object in the road-occupied image to be detected includes: detecting the target object in the road-occupied image to be detected by using a target object detection model, wherein the target object detection model is trained by using road-occupied sample images with target object labels.

[0053] In some embodiments, the target objects include one or more illegal items such as tables, chairs, benches, cartons, mineral water boxes, barbecue grills, billboards, cars, motorcycles, bicycles, and electric vehicles.

[0054] In some embodiments, 200,000 road-occupying sample images containing illegal items are collected, and the types of items can be added or deleted according to application requirements; target object labels are generated for the road-occupying sample images, and the target object labels are used to characterize the location, size and category of the illegal items in the road-occupying sample images; the road-occupying sample images are evenly divided into a training set and a validation set in a ratio of 9:1, that is, 180,000 training sets and 20,000 validation sets; data enhancement operations such as random crop, adding random noise, and random brightness changes are performed on the training set; PyTorch, TensorFlow or other deep learning frameworks are used to build a YOLO v3 image detection model structure, and the training set is used to train the aforementioned model; the Adam optimization algorithm is used, the learning rate is set to 1e-4, the batch size is set to 128, the maximum training rounds are set to 100, and the stopping condition is set to 20 consecutive rounds of training without obtaining a lower validation set loss value; after the training is completed, a target object detection model is obtained.

[0055] Optionally, detecting the target object in the road-occupying image to be detected includes: if the road-occupying image to be detected includes a second alternative image, filtering the detection results corresponding to the second alternative image according to the first alternative image corresponding to the second alternative image to remove the detection results other than the first alternative image.

[0056] Optionally, judging whether there is any illegal road occupation on the target road based on the detection result of the target object includes: judging whether there is a target object in the road occupation image to be tested based on the detection result; if the target object exists in the road occupation image to be tested, then determining that there is illegal road occupation on the target road; if the target object does not exist in the road occupation image to be tested, then determining that the target road is in a normal state. In this way, a secondary confirmation of the road occupation area is performed based on the road occupation object detection model to improve the accuracy and reduce false alarms.

[0057] Optionally, after determining whether there is any illegal road occupation on the target road based on the detection result of the target object, the method further includes: if there is any illegal road occupation, uploading the original image corresponding to the illegal road occupation to a preset server and issuing an alarm.

[0058] Combination Figure 2 As shown, the embodiment of the present disclosure provides a road occupation detection method, including:

[0059] Step S201, obtaining a captured video stream corresponding to a target road;

[0060] Wherein, the captured video stream includes a plurality of captured image frames;

[0061] Step S202, extracting an original image corresponding to the target road from the captured image frame;

[0062] Step S203, performing region segmentation on the target road according to the original image to obtain a road distribution area corresponding to the target road;

[0063] Step S204, judging whether the road distribution area has changed based on the comparison result between the original image and the reference image, if so, jumping to step S205, if not, jumping to step S210;

[0064] Step S205, determining the changed road distribution area as a road change area, and determining the road change duration corresponding to the road change area;

[0065] Step S206, determining a road change area whose road change duration is greater than or equal to a preset duration threshold as a road occupation area to be detected;

[0066] Step S207, based on connected area detection, extracting a road area image corresponding to the road-occupying area to be detected from the original image;

[0067] Step S208, detecting the target object in the road-occupying image to be detected, and determining whether there is a target object in the road-occupying image to be detected, if yes, jump to step S209, if no, jump to step S210;

[0068] The road-occupied image to be measured includes a first candidate image and / or a second candidate image, the first candidate image includes a minimum circumscribed matrix area image of a road area image in an original image, and the second candidate image includes an original image corresponding to the first candidate image;

[0069] Step S209: There is illegal road occupation on the target road.

[0070] Step S210: There is no illegal road occupation on the target road.

[0071] At present, the method of continuously detecting and analyzing the same stall through the accumulation mechanism to detect stall road occupation behavior has a low recall rate and low scene adaptability due to the wide range of stall target image types and difficulty in defining features; using the store template image to compare with the image of the monitoring area to determine whether there is road occupation business, because it is necessary to configure a template image for each monitored point and it must be carefully modulated, resulting in poor scene adaptability, the need for large-scale deployment, and high maintenance costs; by constructing a convolutional neural network to obtain the store location and business behavior category, because the judgment method of illegal business obtained only through a static single-frame image is not robust enough, resulting in low detection accuracy. The road occupation detection method provided by the embodiment of the present disclosure is adopted to obtain one or more original images corresponding to the target road, and the target road is segmented according to the original image to obtain the road distribution area corresponding to the target road. Based on the comparison result between the original image and the preset reference image, the road occupation area to be tested is determined from the road distribution area, and the road occupation image to be tested corresponding to the road occupation area to be tested is determined according to the original image. The target object in the road occupation image to be tested is detected, and it is determined whether the target road has illegal road occupation behavior according to the detection result of the target object. In this way, image segmentation and image detection are combined to detect whether there is any illegal road occupation on the target road. Compared with a single detection method, the accuracy of road occupation behavior detection is improved. At the same time, the scene adaptability is improved to meet more complex scenes, thereby reducing deployment and configuration requirements, improving the recall rate of road occupation events, and being more robust.

[0072] Combination Figure 3 As shown, the embodiment of the present disclosure provides a road occupation detection system, including an acquisition module 301, a determination module 302 and a detection module 303. The acquisition module is used to acquire one or more original images corresponding to the target road, and perform region segmentation on the target road according to the original images to obtain a road distribution area corresponding to the target road. The determination module is used to determine the road occupation area to be measured from the road distribution area based on the comparison result between the original image and the preset reference image, and determine the road occupation image to be measured corresponding to the road occupation area to be measured according to the original image. The detection module is used to detect the target object in the road occupation image to be measured, and determine whether there is any illegal road occupation on the target road according to the detection result of the target object.

[0073] The road occupation detection method provided by the embodiment of the present disclosure is adopted to obtain one or more original images corresponding to the target road, perform regional segmentation on the target road according to the original images, obtain the road distribution area corresponding to the target road, determine the road occupation area to be tested from the road distribution area based on the comparison result between the original image and the preset reference image, determine the road occupation image to be tested corresponding to the road occupation area to be tested according to the original image, detect the target object in the road occupation image to be tested, and judge whether there is illegal road occupation on the target road according to the detection result of the target object. In this way, combining image segmentation and image detection to detect whether there is illegal road occupation on the target road improves the accuracy of road occupation detection compared to a single detection method, and at the same time, improves the scene adaptability, meets more complex scenes, thereby reducing deployment and configuration requirements and improving the recall rate of road occupation events.

[0074] Combination Figure 4 As shown, an embodiment of the present disclosure provides an electronic device, including: a processor (processor) 400 and a memory (memory) 401; the memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory, so that the terminal executes any one of the methods in this embodiment. Optionally, the electronic device may also include a communication interface (Communication Interface) 402 and a bus 403. Among them, the processor 400, the communication interface 402, and the memory 401 can communicate with each other through the bus 403. The communication interface 402 can be used for information transmission. The processor 400 can call the logic instructions in the memory 401 to execute the method in the above embodiment.

[0075] In addition, the logic instructions in the memory 401 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.

[0076] The memory 401 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 methods in the embodiments of the present disclosure. The processor 400 executes functional applications and data processing by running the program instructions / modules stored in the memory 401, that is, implementing the methods in the above embodiments.

[0077] The memory 401 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 401 may include a high-speed random access memory and may also include a non-volatile memory.

[0078] The electronic device provided by the embodiment of the present disclosure is used to obtain one or more original images corresponding to the target road, and the target road is segmented according to the original images to obtain the road distribution area corresponding to the target road. The road occupation area to be tested is determined from the road distribution area based on the comparison result between the original image and the preset reference image, and the road occupation image to be tested corresponding to the road occupation area to be tested is determined according to the original image. The target object in the road occupation image to be tested is detected, and it is determined whether there is illegal road occupation on the target road according to the detection result of the target object. In this way, the detection of whether there is illegal road occupation on the target road is performed by combining image segmentation and image detection. Compared with a single detection method, the accuracy of road occupation detection is improved. At the same time, the scene adaptability is improved to meet more complex scenes, thereby reducing deployment and configuration requirements and improving the recall rate of road occupation events.

[0079] The embodiments of the present disclosure further provide a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, any one of the methods in the embodiments is implemented.

[0080] The computer-readable storage medium in the embodiments of the present disclosure can be understood by ordinary technicians in the field: all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the execution includes the steps of the above-mentioned method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

[0081] The electronic device disclosed in this embodiment includes a processor, a memory, a transceiver and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication with each other. The memory is used to store computer programs, the communication interface is used to communicate, and the processor and the transceiver are used to run the computer program so that the electronic device executes each step of the above method.

[0082] In this embodiment, the memory may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

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

[0084] 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 possible changes only. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. Parts and subsamples of some embodiments may be included in or replace parts and subsamples 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 a stated sub-sample, whole, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other sub-samples, wholes, steps, operations, elements, components and / or groups of these. 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 including 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.

[0085] 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 technician may use different methods for each specific application to implement the described functions, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. The technician may clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system, device and unit may be the corresponding process in the current aforementioned method embodiment, and will not be repeated here.

[0086] 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 sub-samples 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.

[0087] 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 road occupation detection method, characterized in that: include: Acquire multiple original images corresponding to the target road, and perform region segmentation on the target road according to the original images to obtain a road distribution area corresponding to the target road; Determine a road-occupied area to be measured from the road distribution area based on a comparison result between the original image and a preset reference image, and determine a road-occupied image to be measured corresponding to the road-occupied area to be measured according to the original image; Detecting the target object in the road-occupying image to be detected, and judging whether there is illegal road-occupying behavior on the target road according to the detection result of the target object; Based on the comparison result between the original image and the preset reference image, the road occupied area to be measured is determined from the road distribution area, including: judging whether the road distribution area has changed based on the comparison result between the original image and the reference image; determining the changed road distribution area as a road change area, and determining the road change duration corresponding to the road change area; determining the road change area with a road change duration greater than or equal to a preset duration threshold as the road occupied area to be measured.

2. The method according to claim 1, characterized in that Determining the road-occupied image to be measured corresponding to the road-occupied area to be measured according to the original image includes: Based on connected area detection, extracting a road area image corresponding to the road-occupied area to be detected from the original image; Determine a minimum circumscribed matrix region image of the road region image in the original image as a first candidate image, and determine an original image corresponding to the first candidate image as a second candidate image; The first candidate image and / or the second candidate image is determined as the road-occupied image to be measured corresponding to the road-occupied area to be measured.

3. The method according to claim 2, characterized in that Judging whether there is illegal road occupation on the target road according to the detection result of the target object includes: Determining whether the target object exists in the road-occupying image to be detected according to the detection result; If the target object exists in the road-occupying image to be detected, it is determined that there is illegal road-occupying behavior on the target road; If the target object does not exist in the road-occupying image to be detected, it is determined that the target road is in a normal state.

4. The method according to claim 3, characterized in that Get the original image by: Acquire a captured video stream corresponding to the target road, wherein the captured video stream includes a plurality of captured image frames; An original image corresponding to the target road is extracted from the acquired image frame.

5. The method according to any one of claims 1 to 4, characterized in that: Performing region segmentation on the target road according to the original image to obtain a road distribution area corresponding to the target road includes: Inputting the original image into a road segmentation model, the road segmentation model outputs a region segmentation image corresponding to the original image, wherein the road segmentation model is obtained by training a neural network model with road sample images with road region labels; A road distribution area corresponding to the target road is determined according to the area segmentation image.

6. The method according to claim 5, characterized in that The method further includes at least one of the following: Performing data processing on the road sample image, wherein the data processing includes at least one of random cropping, adding random noise, and random brightness change; A model acceleration tool is integrated into the road segmentation model.

7. A road occupation detection system, characterized in that: include: An acquisition module, used for acquiring a plurality of original images corresponding to a target road, performing region segmentation on the target road according to the original images, and obtaining a road distribution region corresponding to the target road; A determination module, configured to determine a road-occupied area to be measured from the road distribution area based on a comparison result between the original image and a preset reference image, and to determine a road-occupied image to be measured corresponding to the road-occupied area to be measured according to the original image; A detection module is used to detect the target object in the road-occupying image to be detected, and determine whether there is any illegal road-occupying behavior on the target road according to the detection result of the target object; Based on the comparison result between the original image and the preset reference image, the road occupied area to be measured is determined from the road distribution area, including: judging whether the road distribution area has changed based on the comparison result between the original image and the reference image; determining the changed road distribution area as a road change area, and determining the road change duration corresponding to the road change area; determining the road change area with a road change duration greater than or equal to a preset duration threshold as the road occupied area to be measured.

8. An electronic device, characterized in that: include: Processor and memory; The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Fire-fighting lane occupation detection method based on SSIM algorithm

    CN110443196A

  • Intelligent traffic violation management method and related product

    CN111047874A

  • Event detection method and device, electronic equipment and storage medium

    CN112507813A

  • Swarm intelligence object detection method, storage medium and processor

    CN113902987A

  • Vision-based illegal operation detection method and system

    CN114155217A