CN113111737A - Black smoke blackness detection method and device based on deep learning - Google Patents
Black smoke blackness detection method and device based on deep learning Download PDFInfo
- Publication number
- CN113111737A CN113111737A CN202110326246.8A CN202110326246A CN113111737A CN 113111737 A CN113111737 A CN 113111737A CN 202110326246 A CN202110326246 A CN 202110326246A CN 113111737 A CN113111737 A CN 113111737A
- Authority
- CN
- China
- Prior art keywords
- black smoke
- vehicle
- video
- deep learning
- screenshot
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 239000000779 smoke Substances 0.000 title claims abstract description 132
- 238000001514 detection method Methods 0.000 title claims abstract description 70
- 238000013135 deep learning Methods 0.000 title claims abstract description 43
- 238000000034 method Methods 0.000 claims abstract description 19
- 230000008859 change Effects 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 10
- 230000035772 mutation Effects 0.000 claims description 4
- 238000012360 testing method Methods 0.000 claims description 3
- 238000012423 maintenance Methods 0.000 abstract description 11
- 238000004364 calculation method Methods 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 8
- 238000012545 processing Methods 0.000 description 8
- 238000004891 communication Methods 0.000 description 5
- 241000208125 Nicotiana Species 0.000 description 4
- 235000002637 Nicotiana tabacum Nutrition 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 239000003292 glue Substances 0.000 description 2
- 238000009434 installation Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 235000019504 cigarettes Nutrition 0.000 description 1
- 230000007123 defense Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 239000000047 product Substances 0.000 description 1
- 230000002035 prolonged effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
- 238000012549 training Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/40—Scenes; Scene-specific elements in video content
- G06V20/46—Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/56—Extraction of image or video features relating to colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/40—Scenes; Scene-specific elements in video content
- G06V20/41—Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Biomedical Technology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Biophysics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Image Analysis (AREA)
Abstract
The invention provides a black smoke blackness detection method and equipment based on deep learning, wherein the method comprises the following steps: acquiring a video stream of a vehicle shot by a camera; inputting the video frames in the video stream into a target detection network to obtain the position of the vehicle; determining black smoke position information of a black smoke to-be-detected area in the video frame based on the vehicle position; the relative gray level of the black smoke is determined based on the gray level of the black smoke position in the video frame and the background reference picture, the video frame in the video stream of the vehicle shot by the camera is processed in a deep learning mode, and the relative gray level of the black smoke vehicle is calculated by using the background reference picture, so that the calculation result is more accurate, the black smoke blackness of the black smoke vehicle is accurately detected in real time, the vehicle does not need to be parked, and meanwhile, the equipment cost and the maintenance cost are reduced.
Description
Technical Field
The invention relates to the technical field of traffic, in particular to a black smoke blackness detection method and device based on deep learning.
Background
In recent years, contact detection and remote sensing detection are mainly used for detecting the blackness of the black smoke vehicle. The two methods are too large and expensive, too high in maintenance cost, and many limitations such as test conditions, which cause phenomena of high cost, low test efficiency, and the like. And the contact detection method needs the vehicle to be in an abnormal running state, and the real normal running emission of the vehicle cannot be obtained. The remote sensing detection cost is too high, normal maintenance of software and hardware is needed, and standard gas is also needed to be maintained, so that the maintenance cost is greatly increased.
Therefore, how to provide a detection scheme for a black smoke vehicle can reduce equipment cost and maintenance cost while checking the blackness of the black smoke vehicle is a technical problem to be solved urgently by technical personnel in the field.
Disclosure of Invention
The invention provides a black smoke blackness detection method and equipment based on deep learning, which can be used for detecting the blackness of a black smoke vehicle and reducing the equipment cost and the maintenance cost.
The invention provides a black smoke blackness detection method based on deep learning, which comprises the following steps:
acquiring a video stream of a vehicle shot by a camera;
inputting the video frames in the video stream into a target detection network to obtain the position of the vehicle;
determining black smoke position information of a black smoke to-be-detected area in the video frame based on the vehicle position;
and determining the relative gray scale of the black smoke based on the gray scale value of the black smoke position in the video frame and the background reference map.
Furthermore, the camera is arranged to face the running direction of the vehicle and is used for shooting a rear license plate and an exhaust port of the vehicle;
the camera is set to a preset angle and used for shooting vehicles within a preset distance.
Further, the inputting the video frames in the video stream into the object detection network to obtain the vehicle position includes:
after the terminal is powered on, calling a specified camera to acquire a video stream through a configuration file stored in the equipment;
sending video frames of the video stream to a vehicle position identification module and a background establishment module;
identifying vehicles in a scene through a target detection network to obtain vehicle information; the vehicle information includes: vehicle category, vehicle location information.
Further, the vehicle under the scene is identified through a target detection network to obtain vehicle information; the vehicle information includes: the vehicle category and vehicle position information includes:
expanding 2/3 the width of the vehicle body to the left again through the x coordinate of the upper left corner of the target frame based on the vehicle position information;
the lower right-hand corner y coordinate of the target frame is expanded 1/3 vehicle height downwards;
moving 1/3 the upper left corner y coordinate of the target frame downwards;
and determining the area of the video frame in the target frame as a new detection area.
Further, the background reference picture is obtained by inputting the current video frame into a background model; the background model is a background model established by adjusting history parameters and varThreshold parameters through a mixed Gaussian distribution model based on all the transmitted video frames.
Further, the determining black smoke position information of the black smoke to-be-detected region in the video frame based on the vehicle position includes:
intercepting an image frame and a background reference picture based on the new detection area to obtain a first screenshot and a second screenshot;
denoising the first screenshot and the second screenshot to obtain a first smooth screenshot and a second smooth screenshot;
graying the first smooth screenshot and the second smooth screenshot, and comparing the change trends of the two screenshot pixels with the similarity of the brightness mutation degrees of the pictures by using a method of transversely counting pixel values;
when the change slope is larger than the threshold value, judging that the change slope is a regular shadow at the moment; and when the change slope is smaller than the threshold and the change trend exceeds the threshold, judging that black smoke exists at the moment, and determining black smoke position information from the condition meeting to the condition meeting, namely the black smoke area of the y axis.
Further, the determining the relative gray level of the black smoke based on the gray level value of the black smoke position in the video frame and the background reference map comprises:
respectively determining a first average gray level and a second average gray level of the black smoke position on the first smooth screenshot and the second smooth screenshot;
obtaining a relative gray value of the first average gray by using the second average gray as a reference;
and under the condition that the Ringelmann blackness of the relative gray scale is greater than a preset value, reserving the picture frame of the current timestamp, locally storing videos of preset durations before and after the video frame, and uploading the video frame, the videos and the geographical position information to a server at the same time.
In a second aspect, the present invention provides a black smoke blackness detection apparatus based on deep learning, comprising: the system comprises a camera, a terminal and a server;
the camera is arranged on the portal frame and used for shooting the vehicle;
the terminal is used for: acquiring a video stream of a vehicle shot by a camera; inputting the video frames in the video stream into a target detection network to obtain the position of the vehicle; determining black smoke position information of a black smoke to-be-detected area in the video frame based on the vehicle position; determining the relative gray level of black smoke based on the gray level value of the black smoke position in the video frame and a background reference picture;
the server is used for receiving the video frame, the video and the geographical position information which are uploaded to the server by the terminal under the condition that the relative gray level Ringelmann blackness is larger than a preset value; the videos are videos with preset time lengths before and after the video frame.
In a third aspect, the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for detecting black smoke based on deep learning as described in any one of the above.
In a fourth aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the deep learning-based black smoke darkness detection method as described in any one of the above.
According to the black smoke blackness detection method and device based on deep learning, the video frames in the video stream of the vehicle shot by the camera are processed in a deep learning mode, the relative gray level of the black smoke vehicle is calculated by using the background reference picture, so that the calculation result is more accurate, the black smoke blackness of the black smoke vehicle is accurately detected in real time, the vehicle does not need to be parked, and meanwhile, the device cost and the maintenance cost are reduced.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a deep learning-based black smoke blackness detection method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a system of a deep learning-based black smoke blackness detection apparatus according to an embodiment of the present invention;
fig. 3 is a schematic system installation diagram of a deep learning-based black smoke blackness detection apparatus according to an embodiment of the present invention;
fig. 4 is a processing module diagram of a black smoke blackness detection device based on deep learning according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an electronic device provided by the present invention;
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following describes a black smoke blackness detection method based on deep learning according to the present invention with reference to fig. 1.
Fig. 1 is a schematic flow chart of a black smoke blackness detection method based on deep learning according to an embodiment of the present invention.
In a specific implementation manner of the present invention, an embodiment of the present invention provides a black smoke blackness detection method based on deep learning, including:
step 110: acquiring a video stream of a vehicle shot by a camera;
specifically, in order to conveniently shoot the vehicle camera and can install on the portal frame, consider that the camera can continuous work to it is comparatively troublesome that the portal frame is changed the camera, therefore the protection level of camera can not be too low, and minimum requirement is IP66, and exposes in the wiring department of outside, uniformly wraps up with the waterproof glue, prevents the short circuit of circuit. The camera is arranged towards the running direction of the vehicle and is used for shooting a rear license plate and an exhaust port of the vehicle; the camera is set to a preset angle and used for shooting vehicles within a preset distance.
In addition, in the weak potential of light, can use the light filling lamp to carry out the light filling to the road surface, the light filling lamp can arrange photosensitive material's resistance as the switch specifically to can guarantee that the light can open the light filling lamp voluntarily when becoming dark, and the protection level also has the requirement, is not less than IP 67. The camera needs to face the direction of the vehicle, and the acquired scene needs to be capable of identifying the rear license plate and the air outlet of the vehicle. The camera needs to be able to clearly observe the vehicle within 40 meters, and the angle is adjusted to reach the optimal distance.
Step 120: inputting the video frames in the video stream into a target detection network to obtain the position of the vehicle;
after the terminal is powered on, reading a configuration file of a specified program, which is a black smoke blackness detection program in the embodiment of the invention, through the configuration file stored in the equipment, calling a specified camera to obtain a video stream, and simultaneously sending a frame of the video stream to the vehicle position identification module 2 and the background establishment module 4;
the vehicle position identification module can identify vehicles in a scene through the target detection network, can reduce inference time to a certain extent by adjusting the size of the preselection frame, and can timely process the vehicle jam under an extreme condition. The obtained vehicle information (namely the vehicle type and the target frame of the vehicle) can be transmitted to the to-be-detected area acquisition module by calling the embedded equipment through the terminal.
That is, after the terminal is powered on, a specified camera is called to acquire a video stream through a configuration file stored in the device; sending video frames of the video stream to a vehicle position identification module and a background establishment module; identifying vehicles in a scene through a target detection network to obtain vehicle information; the vehicle information includes: vehicle category, vehicle location information.
Step 130: determining black smoke position information of a black smoke to-be-detected area in the video frame based on the vehicle position;
specifically, the vehicle body width is expanded 2/3 to the left again through the x coordinate at the upper left corner of the target frame based on the vehicle position information; the lower right-hand corner y coordinate of the target frame is expanded 1/3 vehicle height downwards; moving 1/3 the upper left corner y coordinate of the target frame downwards; and determining the area of the video frame in the target frame as a new detection area. The background reference image is obtained by inputting the current video frame into a background model; the background model is a background model established by adjusting history parameters and varThreshold parameters through a mixed Gaussian distribution model based on all the transmitted video frames. Intercepting an image frame and a background reference picture based on the new detection area to obtain a first screenshot and a second screenshot; denoising the first screenshot and the second screenshot to obtain a first smooth screenshot and a second smooth screenshot; graying the first smooth screenshot and the second smooth screenshot, and comparing the change trends of the two screenshot pixels with the similarity of the brightness mutation degrees of the pictures by using a method of transversely counting pixel values; when the change slope is larger than the threshold value, judging that the change slope is a regular shadow at the moment; and when the change slope is smaller than the threshold and the change trend exceeds the threshold, judging that black smoke exists at the moment, and determining black smoke position information from the condition meeting to the condition meeting, namely the black smoke area of the y axis.
Step 140: and determining the relative gray scale of the black smoke based on the gray scale value of the black smoke position in the video frame and the background reference map.
Specifically, a first average gray scale and a second average gray scale of the black smoke position on the first smooth screenshot and the second smooth screenshot are respectively determined; obtaining a relative gray value of the first average gray by using the second average gray as a reference; and under the condition that the Ringelmann blackness of the relative gray scale is greater than a preset value, reserving the picture frame of the current timestamp, locally storing videos of preset durations before and after the video frame, and uploading the video frame, the videos and the geographical position information to a server at the same time.
According to the black smoke blackness detection method based on deep learning, the video frames in the video stream of the vehicle shot by the camera are processed in a deep learning mode, the relative gray level of the black smoke vehicle is calculated by using the background reference picture, so that the calculation result is more accurate, the black smoke blackness of the black smoke vehicle is accurately detected in real time, the vehicle does not need to be parked, and the equipment cost and the maintenance cost are reduced.
The following describes the black smoke darkness detection apparatus based on deep learning according to the present invention, and the black smoke darkness detection apparatus based on deep learning described below and the black smoke darkness detection method based on deep learning described above may be referred to in correspondence with each other.
Referring to fig. 2, fig. 3, and fig. 4, fig. 2 is a schematic diagram of a system structure of a deep learning-based black smoke blackness detection apparatus according to an embodiment of the present invention; fig. 3 is a schematic system installation diagram of a deep learning-based black smoke blackness detection apparatus according to an embodiment of the present invention;
fig. 4 is a processing module diagram of a black smoke blackness detection device based on deep learning according to an embodiment of the present invention.
In another embodiment of the present invention, an apparatus for detecting black smoke blackness based on deep learning is provided, including: the system comprises a camera, a terminal and a server;
the camera is arranged on the portal frame and used for shooting the vehicle;
the terminal is used for: acquiring a video stream of a vehicle shot by a camera; inputting the video frames in the video stream into a target detection network to obtain the position of the vehicle; determining black smoke position information of a black smoke to-be-detected area in the video frame based on the vehicle position; determining the relative gray level of black smoke based on the gray level value of the black smoke position in the video frame and a background reference picture;
the server is used for receiving the video frame, the video and the geographical position information which are uploaded to the server by the terminal under the condition that the relative gray level Ringelmann blackness is larger than a preset value; the videos are videos with preset time lengths before and after the video frame.
Specifically, the black smoke blackness detection device based on deep learning provided by the embodiment of the invention comprises a 900W pixel IPC camera, a terminal, a multimedia intelligent central control screen, a background server and the like, wherein the IPC camera is installed on a portal frame to acquire vehicles on a current black smoke key monitoring road section, and a current picture frame is inferred through an intelligent terminal; the terminal is installed in a rain-proof box on an upright post below the portal frame, and processes the current frame acquired by the IPC camera. The terminal processes a large amount of received picture frame information, establishes a background model updated in real time, and determines a background image through the probability distribution of pixels. And simultaneously, acquiring the position information of the vehicle through target detection, acquiring the position information of the black smoke to-be-detected area through an area adjustment method, processing the actual screenshot of the area position and the screenshot of the same position of the background image to obtain the outline information of the smoke and the vehicle, acquiring the relative gray levels of the actual screenshot and the background image through image processing again, and confirming the grade of the black smoke. The multimedia intelligent central control screen is used for receiving information transmitted by a terminal and displaying a result on the screen, and when the black smoke blackness value of a vehicle is greater than 1, the screenshot of the current timestamp and the video 10 seconds before and after the current timestamp can be stored locally and uploaded to a server at the same time; the background server is mainly used for receiving information transmitted by each terminal, facilitating recording and storage and providing evidences for follow-up punishment and education.
The system structure and the device structure of the invention are shown in figures 1 and 2, a server is arranged in a fixed machine room, the uploaded data is processed through a network, the obtained data is stored and the result is returned to the terminal after the data is processed through software. The terminal is placed in a rain-proof box on an upright post below the gantry and is connected with a 900W IPC camera arranged on the gantry through wiring; in order to prevent illegal vehicles from stealing to go on the road at night, a light supplement lamp needs to be installed, and when the blackness of black smoke is detected, license plate recognition needs to be matched to form an evidence chain of a joint defense joint control system. The rain-proof box only needs to be installed at a height which is convenient for maintenance personnel to open, and the lock is opened except for on-site data taking, and the lock is closed at other times. Considering that the camera can work continuously and the portal frame is troublesome to replace, the protection level of the camera cannot be too low, and the minimum requirement is IP 66. The exposed wiring position is uniformly wrapped by waterproof glue to prevent short circuit of the circuit. The light filling lamp needs to select the resistance of photosensitive material, can open automatically when just so guaranteeing that light is dark, and the protection level also has the requirement, is not less than IP67 can. The camera needs to face the direction of the vehicle, and the acquired scene needs to be capable of identifying the rear license plate and the air outlet of the vehicle. The camera needs to be able to clearly observe the vehicle within 40 meters, and the angle is adjusted to reach the optimal distance.
The specific flow of judging the blackness of the black smoke vehicle is as follows:
1) after the terminal is powered on, reading a configuration file of a specified program (the invention is a black smoke and blackness detection program) through the configuration file stored in the equipment, calling a specified camera to obtain a video stream, and simultaneously sending one frame of the video stream to a vehicle position identification module 2) and a background establishment module 4);
2) the vehicle position identification module can identify vehicles in a scene through the target detection network, can reduce inference time to a certain extent by adjusting the size of the preselection frame, and can timely process the vehicle jam under an extreme condition. The embedded equipment is called through the terminal, so that the obtained vehicle information (namely the vehicle type and the target frame of the vehicle) can be transmitted to the to-be-detected area acquisition module;
3) the to-be-detected region acquisition module can expand 2/3 the width of the vehicle body to the left again through xmin (upper left corner x coordinate) of the target frame according to vehicle position information transmitted by the vehicle position recognition module, expand 1/3 the height of the vehicle body downwards through ymax (lower right corner y coordinate) of the target frame, and move 1/3 the height of the vehicle body downwards through ymin (upper left corner y coordinate) of the target frame. And simultaneously, transmitting the new detection area coordinates into the picture enhancement module.
4) The background building module adjusts the history (frame number of training background: 500 frames) and varThreshold (variance threshold: 16) to build a background model.
5) And the image enhancement module intercepts the image frame acquired by the module 1 and the background image acquired by the background establishment module 4 according to the coordinate information acquired by the to-be-detected region acquisition module 3. And the two screenshots are subjected to smooth denoising treatment and transmitted into a black smoke blackness processing module.
6) And the black smoke blackness processing module is used for processing the two screenshots acquired by the picture enhancement module, and comparing the pixel variation trend (the number of extreme values is greater than 5) of the two screenshots with the similarity of the brightness mutation degree (slope) of the picture by using a method of transversely counting pixel values after graying. When the change slope is larger than the threshold value, judging that the change slope is a regular shadow at the moment; when the change slope is smaller than the threshold and the change trend exceeds the threshold, judging that black smoke exists at the moment, and obtaining a black smoke area of the y axis from the moment when the condition is met to the moment when the condition is met. Similarly, the black smoke area of the x axis can be confirmed, and most influences including body stains, shadows and the like can be eliminated through the method.
7) And the black tobacco blackness calculation module is used for carrying out graded judgment on the blackness of the black tobacco by calculating the average gray level of the picture intercepted from the black tobacco areas of the two screenshots of the black tobacco blackness processing module.
8) By optimizing the application scene, the compatibility of the target detection network to the embedded equipment is improved, and the position information of various vehicles on the road can be detected in real time. The inference speed of the model is improved by adjusting the size of the preselected frame, so that the problem that the identification time is prolonged due to excessive vehicles in special environments such as traffic congestion is solved.
9) When the condition that the Ringelmann blackness of the black cigarette is greater than 1 is met, the terminal keeps the picture frame of the current timestamp, simultaneously locally stores videos of 10 seconds before and after the current timestamp, and simultaneously uploads the picture, the videos and position information to the server and gives an alarm. To remind the staff of routine maintenance.
The device can also adjust the area of black smoke density identification, and prevent the influence of redundant invalid data on the program processing speed. The black smoke blackness area to be identified can be adjusted according to the following method:
1. remotely modifying the configuration parameters and simultaneously issuing the configuration parameters to a designated terminal;
2. the mobile phone is connected with the terminal through Bluetooth or WiFi, and area selection is carried out in a selected designated area;
3. the multimedia intelligent central control screen modification area is connected with a mobile phone in a wiring mode.
According to the black smoke blackness detection device based on deep learning, the video frames in the video stream of the vehicle shot by the camera are processed in a deep learning mode, the relative gray level of the black smoke vehicle is calculated by using the background reference picture, so that the calculation result is more accurate, the black smoke blackness of the black smoke vehicle is accurately detected in real time, the vehicle does not need to be parked, and meanwhile, the device cost and the maintenance cost are reduced.
Fig. 5 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 5: a processor (processor)510, a communication Interface (Communications Interface)520, a memory (memory)530 and a communication bus 540, wherein the processor 510, the communication Interface 520 and the memory 530 communicate with each other via the communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform a deep learning based black smoke darkness detection method comprising: acquiring a video stream of a vehicle shot by a camera; inputting the video frames in the video stream into a target detection network to obtain the position of the vehicle; determining black smoke position information of a black smoke to-be-detected area in the video frame based on the vehicle position; and determining the relative gray scale of the black smoke based on the gray scale value of the black smoke position in the video frame and the background reference map.
Furthermore, the logic instructions in the memory 530 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, which when executed by a computer, enable the computer to execute the deep learning-based black smoke darkness detection method provided by the above methods, the method comprising: acquiring a video stream of a vehicle shot by a camera; inputting the video frames in the video stream into a target detection network to obtain the position of the vehicle; determining black smoke position information of a black smoke to-be-detected area in the video frame based on the vehicle position; and determining the relative gray scale of the black smoke based on the gray scale value of the black smoke position in the video frame and the background reference map.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, the computer program being implemented by a processor to perform the above-mentioned deep learning-based black smoke darkness detection methods, the methods comprising: acquiring a video stream of a vehicle shot by a camera; inputting the video frames in the video stream into a target detection network to obtain the position of the vehicle; determining black smoke position information of a black smoke to-be-detected area in the video frame based on the vehicle position; and determining the relative gray scale of the black smoke based on the gray scale value of the black smoke position in the video frame and the background reference map.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A black smoke blackness detection method based on deep learning is characterized by comprising the following steps:
acquiring a video stream of a vehicle shot by a camera;
inputting the video frames in the video stream into a target detection network to obtain the position of the vehicle;
determining black smoke position information of a black smoke to-be-detected area in the video frame based on the vehicle position;
and determining the relative gray scale of the black smoke based on the gray scale value of the black smoke position in the video frame and the background reference map.
2. The deep learning-based black smoke blackness detection method according to claim 1,
the camera is arranged towards the running direction of the vehicle and is used for shooting a rear license plate and an exhaust port of the vehicle;
the camera is set to a preset angle and used for shooting vehicles within a preset distance.
3. The deep learning-based black smoke blackness detection method according to claim 1,
the inputting the video frames in the video stream into the target detection network to obtain the vehicle position comprises:
after the terminal is powered on, calling a specified camera to acquire a video stream through a configuration file stored in the equipment;
sending video frames of the video stream to a vehicle position identification module and a background establishment module;
identifying vehicles in a scene through a target detection network to obtain vehicle information; the vehicle information includes: vehicle category, vehicle location information.
4. The deep learning-based black smoke blackness detection method according to claim 3, wherein the vehicle under the scene is identified through a target detection network to obtain vehicle information; the vehicle information includes: the vehicle category and vehicle position information includes:
expanding 2/3 the width of the vehicle body to the left again through the x coordinate of the upper left corner of the target frame based on the vehicle position information;
the lower right-hand corner y coordinate of the target frame is expanded 1/3 vehicle height downwards;
moving 1/3 the upper left corner y coordinate of the target frame downwards;
and determining the area of the video frame in the target frame as a new detection area.
5. The deep learning based black smoke blackness detection method according to claim 1, wherein the background reference picture is obtained by inputting a current video frame into a background model; the background model is a background model established by adjusting history parameters and varThreshold parameters through a mixed Gaussian distribution model based on all the transmitted video frames.
6. The deep learning based black smoke blackness detection method according to claim 4, wherein the determining black smoke position information of the black smoke to be detected region in the video frame based on the vehicle position comprises:
intercepting an image frame and a background reference picture based on the new detection area to obtain a first screenshot and a second screenshot;
denoising the first screenshot and the second screenshot to obtain a first smooth screenshot and a second smooth screenshot;
graying the first smooth screenshot and the second smooth screenshot, and comparing the change trends of the two screenshot pixels with the similarity of the brightness mutation degrees of the pictures by using a method of transversely counting pixel values;
when the change slope is larger than the threshold value, judging that the change slope is a regular shadow at the moment; and when the change slope is smaller than the threshold and the change trend exceeds the threshold, judging that black smoke exists at the moment, and determining black smoke position information from the condition meeting to the condition meeting, namely the black smoke area of the y axis.
7. The deep learning based black smoke blackness detection method according to claim 6, wherein the determining the relative gray level of black smoke based on the gray level of the black smoke position in the video frame and a background reference map comprises:
respectively determining a first average gray level and a second average gray level of the black smoke position on the first smooth screenshot and the second smooth screenshot;
obtaining a relative gray value of the first average gray by using the second average gray as a reference;
and under the condition that the Ringelmann blackness of the relative gray scale is greater than a preset value, reserving the picture frame of the current timestamp, locally storing videos of preset durations before and after the video frame, and uploading the video frame, the videos and the geographical position information to a server at the same time.
8. The utility model provides a black smoke blackness check out test set based on degree of depth study which characterized in that includes: the system comprises a camera, a terminal and a server;
the camera is arranged on the portal frame and used for shooting the vehicle;
the terminal is used for: acquiring a video stream of a vehicle shot by a camera; inputting the video frames in the video stream into a target detection network to obtain the position of the vehicle; determining black smoke position information of a black smoke to-be-detected area in the video frame based on the vehicle position; determining the relative gray level of black smoke based on the gray level value of the black smoke position in the video frame and a background reference picture;
the server is used for receiving the video frame, the video and the geographical position information which are uploaded to the server by the terminal under the condition that the relative gray level Ringelmann blackness is larger than a preset value; the videos are videos with preset time lengths before and after the video frame.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the deep learning based black smoke darkness detection method according to any one of claims 1 to 7 when executing the program.
10. A non-transitory computer readable storage medium, on which a computer program is stored, wherein the computer program, when being executed by a processor, implements the steps of the deep learning based black smoke darkness detection method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110326246.8A CN113111737A (en) | 2021-03-26 | 2021-03-26 | Black smoke blackness detection method and device based on deep learning |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110326246.8A CN113111737A (en) | 2021-03-26 | 2021-03-26 | Black smoke blackness detection method and device based on deep learning |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113111737A true CN113111737A (en) | 2021-07-13 |
Family
ID=76712307
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110326246.8A Pending CN113111737A (en) | 2021-03-26 | 2021-03-26 | Black smoke blackness detection method and device based on deep learning |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113111737A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113657305A (en) * | 2021-08-20 | 2021-11-16 | 深圳技术大学 | Video-based intelligent detection method for blackness level of black smoke vehicle and Ringelmann |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190057244A1 (en) * | 2017-08-18 | 2019-02-21 | Autel Robotics Co., Ltd. | Method for determining target through intelligent following of unmanned aerial vehicle, unmanned aerial vehicle and remote control |
CN110660222A (en) * | 2019-11-01 | 2020-01-07 | 河北工业大学 | Intelligent environment-friendly electronic snapshot system for black smoke vehicle on road |
CN111126165A (en) * | 2019-11-29 | 2020-05-08 | 苏州科达科技股份有限公司 | Black smoke vehicle detection method and device and electronic equipment |
CN112289022A (en) * | 2020-09-29 | 2021-01-29 | 西安电子科技大学 | Black smoke vehicle detection judgment and system based on space-time background comparison |
-
2021
- 2021-03-26 CN CN202110326246.8A patent/CN113111737A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190057244A1 (en) * | 2017-08-18 | 2019-02-21 | Autel Robotics Co., Ltd. | Method for determining target through intelligent following of unmanned aerial vehicle, unmanned aerial vehicle and remote control |
CN110660222A (en) * | 2019-11-01 | 2020-01-07 | 河北工业大学 | Intelligent environment-friendly electronic snapshot system for black smoke vehicle on road |
CN111126165A (en) * | 2019-11-29 | 2020-05-08 | 苏州科达科技股份有限公司 | Black smoke vehicle detection method and device and electronic equipment |
CN112289022A (en) * | 2020-09-29 | 2021-01-29 | 西安电子科技大学 | Black smoke vehicle detection judgment and system based on space-time background comparison |
Non-Patent Citations (2)
Title |
---|
潘德炉: "海洋水色遥感机理及反演", 《海洋出版社》 * |
赵婕著: "图像特征提取与语义分析", 《重庆大学出版社》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113657305A (en) * | 2021-08-20 | 2021-11-16 | 深圳技术大学 | Video-based intelligent detection method for blackness level of black smoke vehicle and Ringelmann |
CN113657305B (en) * | 2021-08-20 | 2023-08-04 | 深圳技术大学 | Video-based intelligent detection method for black smoke vehicle and ringeman blackness level |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111967393A (en) | Helmet wearing detection method based on improved YOLOv4 | |
CN107437318B (en) | Visible light intelligent recognition algorithm | |
KR102122859B1 (en) | Method for tracking multi target in traffic image-monitoring-system | |
CN111091072A (en) | YOLOv 3-based flame and dense smoke detection method | |
CN108446630A (en) | Airfield runway intelligent control method, application server and computer storage media | |
CN112733690B (en) | High-altitude parabolic detection method and device and electronic equipment | |
US20230005176A1 (en) | Throwing position acquisition method and apparatus, computer device and storage medium | |
CN111488799A (en) | Falling object identification method and system based on image identification | |
CN111446920A (en) | Photovoltaic power station monitoring method, device and system | |
CN112784821A (en) | Building site behavior safety detection and identification method and system based on YOLOv5 | |
CN115700757B (en) | Control method and device for fire water monitor and electronic equipment | |
CN113505643B (en) | Method and related device for detecting violation target | |
CN108319892A (en) | A kind of vehicle safety method for early warning and system based on genetic algorithm | |
CN112184773A (en) | Helmet wearing detection method and system based on deep learning | |
CN111461078A (en) | Anti-fishing monitoring method based on computer vision technology | |
CN116704411A (en) | Security control method, system and storage medium based on Internet of things | |
CN110636281A (en) | Real-time monitoring camera shielding detection method based on background model | |
CN113111737A (en) | Black smoke blackness detection method and device based on deep learning | |
CN116778673A (en) | Water area safety monitoring method, system, terminal and storage medium | |
CN115880231A (en) | Power transmission line hidden danger detection method and system based on deep learning | |
CN114187327A (en) | Target identification tracking method and device, computer readable medium and electronic equipment | |
CN113392706A (en) | Device and method for detecting smoking and using mobile phone behaviors | |
CN112633157A (en) | AGV working area safety real-time detection method and system | |
CN116052356A (en) | Intelligent building site monitor platform | |
CN116994084A (en) | Regional intrusion detection model training method and regional intrusion detection method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210713 |
|
RJ01 | Rejection of invention patent application after publication |