CN111523528B - Strategy sending method and device based on scale recognition model and computer equipment - Google Patents

Strategy sending method and device based on scale recognition model and computer equipment Download PDF

Info

Publication number
CN111523528B
CN111523528B CN202010632220.1A CN202010632220A CN111523528B CN 111523528 B CN111523528 B CN 111523528B CN 202010632220 A CN202010632220 A CN 202010632220A CN 111523528 B CN111523528 B CN 111523528B
Authority
CN
China
Prior art keywords
fire
firework
color
path
preset
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.)
Active
Application number
CN202010632220.1A
Other languages
Chinese (zh)
Other versions
CN111523528A (en
Inventor
王水桃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An International Smart City Technology Co Ltd
Original Assignee
Ping An International Smart City Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN202010632220.1A priority Critical patent/CN111523528B/en
Publication of CN111523528A publication Critical patent/CN111523528A/en
Application granted granted Critical
Publication of CN111523528B publication Critical patent/CN111523528B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/48Matching video sequences

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)
  • Alarm Systems (AREA)

Abstract

The application relates to the technical field of artificial intelligence, and discloses a strategy sending method, a strategy sending device and computer equipment based on a scale recognition model, which comprise the following steps: adopting a preset camera to carry out continuous image acquisition processing on the designated area so as to obtain two continuous frames of fire images; performing pixel point analysis processing on the specified frame fire image, and acquiring all first color blocks; drawing a first path in the appointed frame fire image, and then acquiring the length of the first path; if the length of the first path is larger than the length threshold, inputting the specified frame fire image into a fire and smoke scale recognition model to obtain a fire and smoke scale numerical value; if the firework size numerical value is larger than the firework size threshold value, calculating a specified firework size increase numerical value; acquiring a specified early warning strategy; and sending the appointed early warning strategy to an appointed terminal. Thereby realizing accurate fire recognition and early warning. Further, the present application relates to blockchain techniques, and the pyrotechnic scale identification models may be stored in blockchains.

Description

Strategy sending method and device based on scale recognition model and computer equipment
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a policy sending method and apparatus based on a scale recognition model, a computer device, and a storage medium.
Background
The fire disaster is one of the most common disasters, seriously threatens the life and property safety of people, and timely detects and warns, and is always an important research content in the field of fire prevention and control. Among various fire types, control of a fire including burning of plants, such as a forest fire, is a serious difficulty. The detection and early warning of the common forest fire only artificially judges the fire situation at a long distance (for example, the fire picture acquired at a long distance is used as a judgment basis), and then corresponding measures are executed according to the judgment result. Therefore, the detection and early warning of the common forest fire cannot accurately predict the fire condition and can not effectively deal with the fire condition.
Disclosure of Invention
The application provides a strategy sending method based on a scale recognition model, which comprises the following steps:
adopting a preset camera to carry out continuous image acquisition processing on the designated area so as to obtain two continuous frames of fire images; wherein the designated area is planted with plants and the plants are burning; the designated area is also provided with a simulated tree, the simulated tree is made of designated materials, the flame of the designated materials is in a first color during combustion, the flame of the plants is in a second color during combustion, and the first color is different from the second color;
selecting a designated frame of fire image from the two frames of fire images, performing pixel point analysis processing on the designated frame of fire image, and acquiring all first color blocks, wherein each first color block is formed by continuous pixels presenting a first color;
drawing a first path in the appointed frame fire image so that the first path passes through all first color blocks according to the shortest path, then acquiring the length of the first path, and judging whether the length of the first path is greater than a preset length threshold value or not;
if the length of the first path is larger than a preset length threshold, inputting the appointed frame fire image into a preset fire scale recognition model, so as to obtain a fire scale numerical value output by the fire scale recognition model; the firework size recognition model is obtained by training based on a yolov3 network model and by adopting training data, wherein the training data are formed by a training fire image and artificially marked fire size numerical values corresponding to the training fire image;
if the firework size numerical value is larger than a preset firework size threshold value, calculating a specified firework size increase numerical value corresponding to the two continuous frames of fire images by using a preset firework increase scale algorithm;
acquiring a designated early warning strategy corresponding to the designated firework scale growth numerical value according to the corresponding relation between the preset firework scale growth numerical value and the early warning strategy; wherein, the appointed early warning strategy records an appointed terminal;
and sending the specified early warning strategy to the specified terminal.
Further, after the steps of drawing a first path in the specified frame fire image to enable the first path to pass through all the first color blocks according to the shortest route, obtaining the length of the first path, and judging whether the length of the first path is greater than a preset length threshold, the method includes:
if the length of the first path is not greater than a preset length threshold, performing color mixing processing on the first color and the second color to obtain a third color;
acquiring all third color blocks in the appointed frame fire image, wherein each third color block is formed by continuous pixel points presenting a third color;
drawing a second path in the appointed frame fire image so that the second path passes through all the first color blocks and the third color blocks according to the shortest path, then acquiring the length of the second path, and judging whether the length of the second path is greater than a preset length threshold value or not;
and if the length of the second path is greater than a preset length threshold, generating a firework identification instruction, wherein the firework identification instruction is used for indicating that the appointed frame fire image is input into a preset firework scale identification model, so that a firework scale numerical value output by the firework scale identification model is obtained.
Further, before the step of inputting the specified frame fire image into a preset fire scale recognition model if the length of the first path is greater than a preset length threshold, so as to obtain a fire scale value output by the fire scale recognition model, the method includes:
acquiring a first number of initial fire pictures collected in advance, wherein the initial fire pictures have artificially marked fire scale numerical values;
according to a preset data expansion processing method, performing data expansion processing on the initial fire pictures to obtain a second number of expanded fire pictures;
taking the first number of initial fire pictures and the second number of expanded fire pictures as sample sets, and dividing the sample sets into training sets and verification sets according to a preset proportion;
calling a preset yolov3 network model, inputting data in a training set into a yolov3 network model for training, and thus obtaining a temporary model, wherein a designated loss function is adopted for training in the training process;
verifying the temporary model by using the data in the verification set to obtain a verification result, and judging whether the verification result is passed;
and if the verification result is that the verification is passed, recording the temporary model as a firework size identification model.
Further, the step of training with the specified loss function in the training process includes:
the formula for setting the specified loss function is:
Figure GDA0002649220530000031
and training by adopting a specified loss function in the training process, wherein L is the specified loss function, N pictures are in total in the training set, i refers to the ith picture in the N pictures, y(i)Refers to the desired output of the ith picture,
Figure GDA0002649220530000032
refers to the actual output of the ith picture.
Further, the step of calculating the assigned firework size increase numerical value corresponding to the two consecutive frames of fire images by using a preset firework size increase algorithm includes:
respectively smoothing the two continuous frames of fire images by adopting a Gaussian smoothing method and a median smoothing method in sequence so as to correspondingly obtain two frames of smooth images;
subtracting all pixel color values corresponding to the previous frame of smooth image from all pixel color values of the next frame of smooth image to obtain a color value difference matrix, and taking the color value difference matrix as the pixel color values to construct a difference image;
acquiring a block formed by appointed pixel points from the difference image, wherein the color value of the appointed pixel points is greater than a preset color value threshold;
and counting the area of the block formed by the specified pixel points, and recording the block formed by the specified pixel points as a specified firework size increase value.
The application provides a strategy transmitting device based on a scale recognition model, which comprises:
the fire image acquisition unit is used for adopting a preset camera to carry out continuous image acquisition processing on the designated area so as to obtain two continuous frames of fire images; wherein the designated area is planted with plants and the plants are burning; the designated area is also provided with a simulated tree, the simulated tree is made of designated materials, the flame of the designated materials is in a first color during combustion, the flame of the plants is in a second color during combustion, and the first color is different from the second color;
the fire image selecting unit is used for selecting a specified frame of fire image from the two frames of fire images, performing pixel point analysis processing on the specified frame of fire image and acquiring all first color blocks, wherein each first color block is formed by continuous pixels presenting a first color;
the first path drawing unit is used for drawing a first path in the appointed frame fire situation image so as to enable the first path to pass through all the first color blocks according to the shortest path, then obtaining the length of the first path, and judging whether the length of the first path is larger than a preset length threshold value or not;
the firework size numerical value acquisition unit is used for inputting the appointed frame fire image into a preset firework size recognition model if the length of the first path is larger than a preset length threshold value, so as to obtain a firework size numerical value output by the firework size recognition model; the firework size recognition model is obtained by training based on a yolov3 network model and by adopting training data, wherein the training data are formed by a training fire image and artificially marked fire size numerical values corresponding to the training fire image;
the firework size increase numerical value calculation unit is used for calculating the appointed firework size increase numerical value corresponding to the two continuous frames of fire images by using a preset firework size increase algorithm if the firework size numerical value is larger than a preset firework size threshold;
the appointed early warning strategy acquisition unit is used for acquiring an appointed early warning strategy corresponding to an appointed smoke and fire scale increase numerical value according to the corresponding relation between a preset smoke and fire scale increase numerical value and the early warning strategy; wherein, the appointed early warning strategy records an appointed terminal;
and the appointed early warning strategy sending unit is used for sending the appointed early warning strategy to the appointed terminal.
Further, the apparatus comprises:
a third color obtaining unit, configured to perform color mixing processing on the first color and the second color to obtain a third color if the length of the first path is not greater than a preset length threshold;
the third color block acquisition unit is used for acquiring all third color blocks in the specified frame fire situation image, wherein each third color block is formed by continuous pixel points presenting a third color;
a second path drawing unit, configured to draw a second path in the specified frame fire image, so that the second path passes through all the first color blocks and the third color blocks according to a shortest path, obtain the length of the second path, and determine whether the length of the second path is greater than a preset length threshold;
and the firework identification instruction generating unit is used for generating a firework identification instruction if the length of the second path is greater than a preset length threshold, wherein the firework identification instruction is used for indicating that the appointed frame fire image is input into a preset firework scale identification model, so that a firework scale numerical value output by the firework scale identification model is obtained.
Further, the apparatus comprises:
the device comprises an initial fire picture acquisition unit, a fire scale detection unit and a fire scale detection unit, wherein the initial fire picture acquisition unit is used for acquiring a first number of initial fire pictures which are collected in advance, and the initial fire pictures have artificially marked fire scale numerical values;
the data expansion unit is used for performing data expansion processing on the initial fire pictures according to a preset data expansion processing method so as to obtain a second number of expanded fire pictures;
the sample set dividing unit is used for taking the first number of initial fire pictures and the second number of expanded fire pictures as sample sets and dividing the sample sets into a training set and a verification set according to a preset proportion;
the temporary model obtaining unit is used for calling a preset yolov3 network model, inputting data in a training set into the yolov3 network model for training so as to obtain a temporary model, wherein a specified loss function is adopted for training in the training process;
the verification result judging unit is used for verifying the temporary model by using the data in the verification set to obtain a verification result and judging whether the verification result is passed;
and the temporary model marking unit is used for marking the temporary model as a firework scale identification model if the verification result is that the verification is passed.
The present application provides a computer device comprising a memory storing a computer program and a processor implementing the steps of any of the above methods when the processor executes the computer program.
The present application provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method of any of the above.
The strategy sending method, the strategy sending device, the computer equipment and the storage medium based on the scale recognition model adopt the preset camera to carry out continuous image acquisition processing on the designated area so as to obtain two continuous frames of fire images; performing pixel point analysis processing on the appointed frame fire situation image, and acquiring all first color blocks; drawing a first path in the appointed frame fire image, and then acquiring the length of the first path; if the length of the first path is larger than a preset length threshold, inputting the appointed frame fire image into a preset fire scale recognition model so as to obtain a fire scale numerical value; if the firework size numerical value is larger than a preset firework size threshold value, calculating a specified firework size increase numerical value; acquiring a specified early warning strategy; and sending the specified early warning strategy to the specified terminal. Thereby realizing accurate fire recognition and early warning.
Drawings
Fig. 1 is a schematic flowchart of a strategy transmission method based on a scale recognition model according to an embodiment of the present application;
FIG. 2 is a block diagram schematically illustrating a structure of a policy sending apparatus based on a scale recognition model according to an embodiment of the present application;
fig. 3 is a block diagram illustrating a structure of a computer device according to an embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
This application can accurate discernment condition of a fire through special design, and the accurate cigarette fire scale growth numerical value of discerning, and then carries out corresponding early warning to in the accuracy deals with the condition of a fire. Specifically, the method for laying the simulated trees in advance is adopted, so that at least two flames exist in the fire image, and the fire can be analyzed preliminarily and accurately (note that only one flame exists in the traditional fire image, the fire cannot be estimated accurately, and the first color only appears at the position where the simulated trees are laid, so that the fire can be estimated more accurately by means of the flames of the first color). And then, whether fireworks exist is further predicted by utilizing the firework scale recognition model (aiming at determining whether early warning is necessary or not, because when the fire is small enough, nearby fire extinguishers and the like directly carry out fire extinguishing operation without early warning). And then, calculating a specified firework scale growth numerical value corresponding to the two continuous frames of fire images by using a preset firework growth scale algorithm, and acquiring a specified early warning strategy corresponding to the specified firework scale growth numerical value according to the corresponding relation between the preset firework scale growth numerical value and the early warning strategy, so that the accurate early warning strategy can be acquired aiming at the accurate fire.
Referring to fig. 1, an embodiment of the present application provides a policy sending method based on a scale recognition model, including the following steps:
s1, adopting a preset camera to carry out continuous image acquisition processing on the designated area so as to obtain two continuous frames of fire images; wherein the designated area is planted with plants and the plants are burning; the designated area is also provided with a simulated tree, the simulated tree is made of designated materials, the flame of the designated materials is in a first color during combustion, the flame of the plants is in a second color during combustion, and the first color is different from the second color;
s2, selecting a specified frame of fire image from the two frames of fire images, performing pixel point analysis processing on the specified frame of fire image, and obtaining all first color blocks, wherein each first color block is formed by continuous pixels presenting a first color;
s3, drawing a first path in the appointed frame fire image, so that the first path passes through all first color blocks according to the shortest path, then acquiring the length of the first path, and judging whether the length of the first path is greater than a preset length threshold value;
s4, if the length of the first path is larger than a preset length threshold, inputting the appointed frame fire image into a preset fire scale recognition model, and thus obtaining a fire scale numerical value output by the fire scale recognition model; the firework size recognition model is obtained by training based on a yolov3 network model and by adopting training data, wherein the training data are formed by a training fire image and artificially marked fire size numerical values corresponding to the training fire image;
s5, if the firework size numerical value is larger than a preset firework size threshold value, calculating an appointed firework size increasing numerical value corresponding to the two continuous frame fire images by using a preset firework increasing scale algorithm;
s6, acquiring a designated early warning strategy corresponding to the designated firework size increase value according to the corresponding relation between the preset firework size increase value and the early warning strategy; wherein, the appointed early warning strategy records an appointed terminal;
and S7, sending the specified early warning strategy to the specified terminal.
As described in step S1, a preset camera is used to perform continuous image acquisition processing on the designated area to obtain two continuous frames of fire images; wherein the designated area is planted with plants and the plants are burning; the artificial tree is characterized in that an artificial tree is further laid in the designated area, the artificial tree is made of designated materials, flame of the designated materials is in a first color when burning, flame of the plants is in a second color when burning, and the first color is different from the second color. The execution body of the application can be any feasible body, such as a firework identification terminal. The camera can be arranged on the execution main body, and can also be arranged at other positions, but the camera needs to be capable of acquiring the image of the designated area. The two continuous frames of fire images refer to two images continuously shot by the camera. The designated area is an area where plants are grown, such as a forest. It should be noted that the present application uses a special design to make the fire prediction more accurate. Namely, the designated area is also provided with a simulated tree, the simulated tree is made of designated materials, the flame of the designated materials is in a first color when burning, the flame of the plants is in a second color when burning, and the first color is different from the second color. One of the inaccuracies of image analysis of common forest fires is that the error of fire prediction is too large. And this application has adopted the design of emulation trees to the flame colour of emulation trees when catching fire is different with the flame colour of plant burning, consequently easily observes, according to the rule of laying of emulation trees again, just can accurately learn the condition of a fire scale. Wherein the first color is different from a second color, the second color being the color of the plant when burned, typically red, such as purple (corresponding to a given material such as a potassium-containing material) or yellow (corresponding to a given material such as a sodium-containing material). Wherein a plurality of the simulated trees are uniformly distributed in the designated area.
As described in the above steps S2-S3, a designated frame of fire image is selected from the two frames of fire images, pixel point analysis processing is performed on the designated frame of fire image, and all first color blocks are obtained, wherein each first color block is formed by continuous pixels representing a first color; and drawing a first path in the appointed frame fire image so that the first path passes through all the first color blocks according to the shortest path, then acquiring the length of the first path, and judging whether the length of the first path is greater than a preset length threshold value or not. The appointed frame fire image can be a first frame fire image or a second frame fire image. And then carrying out pixel point analysis processing on the appointed frame fire situation image, aiming at finding out the pixel points presenting the first color, and extracting the continuous pixel points presenting the first color to obtain all the first color blocks. At this time, the first color block represents the burning simulated tree. And drawing a first path in the specified frame fire image, so that the first path passes through all the first color blocks according to the shortest path, and then acquiring the length of the first path. The first path thus reflects the size of the burning simulated tree, i.e. the size of the flame burning. And judging whether the length of the first path is greater than a preset length threshold value or not, and then preliminarily knowing the severity of the fire.
As described in step S4, if the length of the first path is greater than the preset length threshold, inputting the specified frame fire image into a preset fire scale recognition model, so as to obtain a fire scale value output by the fire scale recognition model; the firework size recognition model is obtained by training through training data based on a yolov3 network model, wherein the training data are composed of training fire images and artificially marked fire size numerical values corresponding to the training fire images. If the length of the first path is larger than the preset length threshold, the fire is serious, and therefore corresponding measures are needed to treat the fire (otherwise, if the length is not larger than the preset length threshold, the fire is light, and only nearby fire extinguishers or equipment such as a fire extinguishing robot and the like are needed to carry out conventional fire extinguishment, and special early warning is not needed). And inputting the specified frame fire image into a preset fire scale recognition model so as to obtain a fire scale numerical value output by the fire scale recognition model. The fire scale identification model processes the specified frame fire images to further determine the fire scale and not only consider the identification of flames, but also does not consider the identification of smoke during the process. The firework size recognition model is based on a yolov3 network model and is trained by adopting training data, and the training data is composed of artificially marked firework size numerical values corresponding to training fire images and training fire images, so that the firework size recognition model can be competent for the task of predicting the firework size numerical values.
As described in the above steps S5-S7, if the firework size value is greater than the preset firework size threshold, calculating a designated firework size increase value corresponding to the two consecutive frames of fire images by using a preset firework size increase algorithm; acquiring a designated early warning strategy corresponding to the designated firework scale growth numerical value according to the corresponding relation between the preset firework scale growth numerical value and the early warning strategy; wherein, the appointed early warning strategy records an appointed terminal; and sending the specified early warning strategy to the specified terminal. If the firework size value is larger than the preset firework size threshold value, the fire is serious. In order to more effectively process the fire at this moment, the application further performs firework growth scale calculation, namely calculates the specified firework growth scale growth numerical value corresponding to the two continuous frame fire images by using a preset firework growth scale algorithm. And acquiring a specified early warning strategy corresponding to the specified firework scale increase value according to the corresponding relation between the preset firework scale increase value and the early warning strategy. It should be noted that when the fire is found to be serious, a common fire early warning scheme can only send out an alarm, but the application is different, and the application finds that under the condition that the fire scale is large but the fire spreading speed is slow, and under the condition that the fire scale is large but the fire spreading speed is fast, corresponding effective strategies are different. For example, in the case of a large fire but a slow fire spread, the strategy should focus more on reducing the fire (e.g., by adding fire suppression equipment, personnel, etc.); in case of large scale fire but fast spreading rate, the strategy should be more focused on preventing the fire from expanding (for example, by constructing isolation zones), and even abandon the disaster area to prevent the fire from spreading. Therefore, the method and the device obtain the specified early warning strategy corresponding to the specified firework size increase numerical value; wherein, the appointed early warning strategy records an appointed terminal; and sending the specified early warning strategy to the specified terminal. Therefore, the owner of the designated terminal or the intelligent robot corresponding to the designated terminal can control the fire in a targeted manner.
In one embodiment, after the step S3 of drawing the first path in the specified frame fire image so that the first path passes through all the first color blocks in the shortest path, acquiring the length of the first path, and determining whether the length of the first path is greater than a preset length threshold, the method includes:
s311, if the length of the first path is not greater than a preset length threshold, performing color mixing processing on the first color and the second color to obtain a third color;
s312, obtaining all third color blocks in the appointed frame fire situation image, wherein each third color block is formed by continuous pixel points presenting a third color;
s313, drawing a second path in the appointed frame fire situation image, so that the second path passes through all the first color blocks and all the third color blocks according to the shortest path, then acquiring the length of the second path, and judging whether the length of the second path is greater than a preset length threshold value or not;
and S314, if the length of the second path is greater than a preset length threshold, generating a firework identification instruction, wherein the firework identification instruction is used for indicating that the appointed frame fire image is input into a preset firework scale identification model, so that a firework scale numerical value output by the firework scale identification model is obtained.
As described above, generation of the smoke and fire identification instruction is achieved. This application adopts special design, and the design of the first colour when adopting emulation trees burning to carry out preliminary discernment condition of a fire promptly consequently adopts first colour to be fast for the efficient that carries out preliminary condition of a fire analysis according to. However, there is a problem that the flame of the first color is disturbed by the flame of the second color, and thus the accuracy of analysis is not sufficient only by the flame of the first color. In view of the above, in the present application, when the length of the first path is not greater than a preset length threshold, performing color mixing processing on the first color and the second color to obtain a third color; acquiring all third color blocks in the appointed frame fire image, wherein each third color block is formed by continuous pixel points presenting a third color; drawing a second path in the appointed frame fire image so that the second path passes through all the first color blocks and the third color blocks according to the shortest path, then acquiring the length of the second path, and judging whether the length of the second path is greater than a preset length threshold value or not; if the length of the second path is greater than a preset length threshold, generating a firework identification instruction, considering flame of a second color as an interference factor again, making more accurate fire analysis, and further making a corresponding processing result. Thereby improving the accuracy of the preliminary fire analysis.
In one embodiment, before the step S4 of inputting the specified frame fire image into a preset fire scale recognition model if the length of the first path is greater than a preset length threshold, so as to obtain a fire scale value output by the fire scale recognition model, the method includes:
s321, acquiring a first number of initial fire pictures collected in advance, wherein the initial fire pictures have artificially marked fire scale numerical values;
s322, according to a preset data expansion processing method, performing data expansion processing on the initial fire pictures to obtain a second number of expanded fire pictures;
s323, taking the first number of initial fire pictures and the second number of expanded fire pictures as sample sets, and dividing the sample sets into training sets and verification sets according to a preset proportion;
s324, calling a preset yolov3 network model, inputting data in a training set into the yolov3 network model for training, and obtaining a temporary model, wherein a designated loss function is adopted for training in the training process;
s325, verifying the temporary model by using the data in the verification set to obtain a verification result, and judging whether the verification result is passed;
and S326, if the verification result is that the verification is passed, marking the temporary model as a firework size identification model.
As mentioned above, it is achieved to label the temporal model as a pyrotechnic scale recognition model. In contrast, the number of fire pictures is small, so in order to improve the accuracy of the model obtained by training, data expansion is performed. The data expansion method can adopt any feasible method, for example, enhancement processing such as rotation, mirror image or cutting is carried out on the basis of the initial fire picture, and therefore the expansion of the initial fire picture is achieved. The pyrotechnical scale recognition model is now trained on the basis of the yolov3 network model, and a training mode is taken as an introduction, but not as a limitation to the present application: the sample set includes 243 pictures of fire, and is divided into two parts, one part is 224 training sets, and the other part is 19 check sets (i.e. the preset ratio is 224: 19). The learning rate was set to 0.001, the batch size was set to 16, and the number of training rounds was set to 700 rounds. The yolov3 network model is an end-to-end real-time monitoring network, and a network layer containing 53 convolutional layers and dark net-53 is used as a basic network, so that a deeper network layer is formed by using the method of a residual error network for reference, the monitoring effect of small objects is improved, and the yolov3 network model is suitable for identifying the fire scale. Verifying the temporary model by using the data in the verification set to obtain a verification result, and judging whether the verification result is passed; and if the verification result is that the verification is passed, recording the temporary model as a firework scale identification model, thereby ensuring that the obtained firework scale identification model can carry out accurate firework scale numerical prediction.
In one embodiment, the step S324 of training with the specified loss function in the training process includes:
s3241, setting a formula of a specified loss function as follows:
Figure GDA0002649220530000121
and training by adopting a specified loss function in the training process, wherein L is the specified loss function, N pictures are in total in the training set, i refers to the ith picture in the N pictures, y(i)Refers to the desired output of the ith picture,
Figure GDA0002649220530000122
refers to the actual output of the ith picture.
As described above. The training process is realized by adopting the specified loss function. The formula for setting the designated loss function is as follows:
Figure GDA0002649220530000123
and training by adopting a specified loss function in the training process, wherein L is the specified loss function, N pictures are in total in the training set, i refers to the ith picture in the N pictures, y(i)Refers to the desired output of the ith picture,
Figure GDA0002649220530000124
refers to the actual output of the ith picture. The firework size identification model disclosed by the application adopts a logistic regression loss function, so that multi-label identification is supported, and firework size numerical value prediction can be realized, namely, different labels correspond to different firework size numerical values. Therefore, the method and the device adopt the binary cross entropy loss function, so that the firework size identification model can accurately predict the firework size numerical value.
In one embodiment, the step S5 of calculating the assigned firework size increase value corresponding to the two consecutive frames of fire images by using a preset firework size increase algorithm includes:
s501, respectively smoothing the two continuous frames of fire images by adopting a Gaussian smoothing method and a median smoothing method in sequence, so as to correspondingly obtain two frames of smooth images;
s502, subtracting all pixel color values corresponding to the previous frame of smooth image from all pixel color values of the next frame of smooth image to obtain a color value difference matrix, and taking the color value difference matrix as the pixel color values to construct a difference image;
s503, acquiring a block formed by appointed pixel points from the difference image, wherein the color values of the appointed pixel points are greater than a preset color value threshold;
and S504, counting the area of the block formed by the specified pixel points, and recording the block formed by the specified pixel points as a specified firework size increase numerical value.
As described above, the calculation of the specified firework size increase numerical value corresponding to the two continuous frames of the fire images by using the preset firework size increase algorithm is realized. Whether the firework profile can be accurately measured is the key to accurately calculating the firework growth scale. The application determines the firework outline through special design and calculates the firework growth scale through the firework outline. It should be noted that the firework profile determination method and device are implemented by using two continuous frames of fire images together, and by using the characteristic that only fireworks (more precisely, smoke) can change greatly in a short time (namely, in the shooting time of the two continuous frames of fire images). And reflecting the difference image, wherein the designated pixel points with the coloring values larger than the preset color value threshold value in the difference image are pixel points with the firework scope change, so that the area of the block formed by the designated pixel points is counted, and the block formed by the designated pixel points is recorded as a designated firework scale increase numerical value. And respectively smoothing the two continuous frames of fire images by adopting a Gaussian smoothing method and a median smoothing method in sequence, thereby being beneficial to eliminating noise. Gaussian smoothing computes the transform for each pixel in the image with a normal distribution, and median smoothing replaces the central element with the median of all pixels under the kernel region. Further, the contour threshold may be obtained by any feasible method, for example, the contour threshold method of OpenCV2(OpenCV is a cross-platform computer vision library issued based on BSD license) is used to obtain a contour extraction threshold, and then the contour extraction method in OpenCV2 is used to detect the contour of smoke and fire.
The strategy sending method based on the scale recognition model adopts a preset camera to carry out continuous image acquisition processing on a specified area so as to obtain two continuous frames of fire images; performing pixel point analysis processing on the appointed frame fire situation image, and acquiring all first color blocks; drawing a first path in the appointed frame fire image, and then acquiring the length of the first path; if the length of the first path is larger than a preset length threshold, inputting the appointed frame fire image into a preset fire scale recognition model so as to obtain a fire scale numerical value; if the firework size numerical value is larger than a preset firework size threshold value, calculating a specified firework size increase numerical value; acquiring a specified early warning strategy; and sending the specified early warning strategy to the specified terminal. Thereby realizing accurate fire recognition and early warning.
Referring to fig. 2, an embodiment of the present application provides a policy sending apparatus based on a scale recognition model, including:
the fire image acquisition unit 10 is used for acquiring and processing continuous images of the designated area by adopting a preset camera to obtain two continuous frames of fire images; wherein the designated area is planted with plants and the plants are burning; the designated area is also provided with a simulated tree, the simulated tree is made of designated materials, the flame of the designated materials is in a first color during combustion, the flame of the plants is in a second color during combustion, and the first color is different from the second color;
a fire image selecting unit 20, configured to select a specified frame of fire image from the two frames of fire images, perform pixel point analysis processing on the specified frame of fire image, and obtain all first color blocks, where each first color block is formed by consecutive pixel points displaying a first color;
a first path drawing unit 30, configured to draw a first path in the specified frame fire image, so that the first path passes through all the first color patches according to a shortest path, obtain the length of the first path, and determine whether the length of the first path is greater than a preset length threshold;
a firework scale value obtaining unit 40, configured to, if the length of the first path is greater than a preset length threshold, input the specified frame of fire image into a preset firework scale recognition model, so as to obtain a firework scale value output by the firework scale recognition model; the firework size recognition model is obtained by training based on a yolov3 network model and by adopting training data, wherein the training data are formed by a training fire image and artificially marked fire size numerical values corresponding to the training fire image;
the firework size increase numerical value calculation unit 50 is configured to calculate, by using a preset firework size increase algorithm, a specified firework size increase numerical value corresponding to the two consecutive frames of fire images if the firework size numerical value is greater than a preset firework size threshold;
the appointed early warning strategy acquisition unit 60 is used for acquiring an appointed early warning strategy corresponding to the appointed smoke and fire scale increase value according to the corresponding relation between the preset smoke and fire scale increase value and the early warning strategy; wherein, the appointed early warning strategy records an appointed terminal;
and a designated early warning policy sending unit 70, configured to send the designated early warning policy to the designated terminal.
The operations respectively executed by the units or the sub-units correspond to the steps of the scale recognition model-based policy transmission method in the foregoing embodiment one by one, and are not described herein again.
In one embodiment, the apparatus comprises:
a third color obtaining unit, configured to perform color mixing processing on the first color and the second color to obtain a third color if the length of the first path is not greater than a preset length threshold;
the third color block acquisition unit is used for acquiring all third color blocks in the specified frame fire situation image, wherein each third color block is formed by continuous pixel points presenting a third color;
a second path drawing unit, configured to draw a second path in the specified frame fire image, so that the second path passes through all the first color blocks and the third color blocks according to a shortest path, obtain the length of the second path, and determine whether the length of the second path is greater than a preset length threshold;
and the firework identification instruction generating unit is used for generating a firework identification instruction if the length of the second path is greater than a preset length threshold, wherein the firework identification instruction is used for indicating that the appointed frame fire image is input into a preset firework scale identification model, so that a firework scale numerical value output by the firework scale identification model is obtained.
The operations respectively executed by the units or the sub-units correspond to the steps of the scale recognition model-based policy transmission method in the foregoing embodiment one by one, and are not described herein again.
In one embodiment, the apparatus comprises:
the device comprises an initial fire picture acquisition unit, a fire scale detection unit and a fire scale detection unit, wherein the initial fire picture acquisition unit is used for acquiring a first number of initial fire pictures which are collected in advance, and the initial fire pictures have artificially marked fire scale numerical values;
the data expansion unit is used for performing data expansion processing on the initial fire pictures according to a preset data expansion processing method so as to obtain a second number of expanded fire pictures;
the sample set dividing unit is used for taking the first number of initial fire pictures and the second number of expanded fire pictures as sample sets and dividing the sample sets into a training set and a verification set according to a preset proportion;
the temporary model obtaining unit is used for calling a preset yolov3 network model, inputting data in a training set into the yolov3 network model for training so as to obtain a temporary model, wherein a specified loss function is adopted for training in the training process;
the verification result judging unit is used for verifying the temporary model by using the data in the verification set to obtain a verification result and judging whether the verification result is passed;
and the temporary model marking unit is used for marking the temporary model as a firework scale identification model if the verification result is that the verification is passed.
The operations respectively executed by the units or the sub-units correspond to the steps of the scale recognition model-based policy transmission method in the foregoing embodiment one by one, and are not described herein again.
In one embodiment, the temporary model obtaining unit includes:
a training subunit configured to set a formula for specifying the loss function as:
Figure GDA0002649220530000161
and training by adopting a specified loss function in the training process, wherein L is the specified loss function, N pictures are in total in the training set, i refers to the ith picture in the N pictures, y(i)Refers to the desired output of the ith picture,
Figure GDA0002649220530000162
refers to the actual output of the ith picture.
The operations respectively executed by the units or the sub-units correspond to the steps of the scale recognition model-based policy transmission method in the foregoing embodiment one by one, and are not described herein again.
In one embodiment, the pyrotechnic scale growth value calculation unit includes:
the smoothing processing subunit is used for respectively smoothing the two continuous frames of fire images by sequentially adopting a Gaussian smoothing method and a median smoothing method so as to correspondingly obtain two frames of smooth images;
the color value difference matrix obtaining subunit is used for subtracting all corresponding color values of the pixel points in the previous frame of smooth image from all the color values of the pixel points in the next frame of smooth image so as to obtain a color value difference matrix, and taking the color value difference matrix as the color values of the pixel points so as to construct a difference image;
the block acquisition subunit is used for acquiring a block formed by appointed pixel points from the difference image, wherein the color value of the appointed pixel points is greater than a preset color value threshold value;
and the area counting subunit is used for counting the area of the block formed by the specified pixel points and recording the block formed by the specified pixel points as a specified firework scale increase value.
The operations respectively executed by the units or the sub-units correspond to the steps of the scale recognition model-based policy transmission method in the foregoing embodiment one by one, and are not described herein again.
The strategy sending device based on the scale recognition model adopts the preset camera to carry out continuous image acquisition processing on the designated area so as to obtain two continuous frames of fire images; performing pixel point analysis processing on the appointed frame fire situation image, and acquiring all first color blocks; drawing a first path in the appointed frame fire image, and then acquiring the length of the first path; if the length of the first path is larger than a preset length threshold, inputting the appointed frame fire image into a preset fire scale recognition model so as to obtain a fire scale numerical value; if the firework size numerical value is larger than a preset firework size threshold value, calculating a specified firework size increase numerical value; acquiring a specified early warning strategy; and sending the specified early warning strategy to the specified terminal. Thereby realizing accurate fire recognition and early warning.
Referring to fig. 3, an embodiment of the present invention further provides a computer device, where the computer device may be a server, and an internal structure of the computer device may be as shown in the figure. The computer device comprises a processor, a memory, a network interface, a database, a display screen and an input device which are connected through a system bus. The display screen can be any feasible screen, such as a liquid crystal display screen; the input device may be any feasible device, such as a keyboard or a mouse. Wherein the computer designed processor is used to provide computational and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used for storing data used by the strategy transmission method based on the scale recognition model. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a scale recognition model based policy delivery method.
The processor executes the policy sending method based on the scale recognition model, wherein the steps included in the method correspond to the steps of executing the policy sending method based on the scale recognition model in the foregoing embodiment one to one, and are not described herein again.
It will be understood by those skilled in the art that the structures shown in the drawings are only block diagrams of some of the structures associated with the embodiments of the present application and do not constitute a limitation on the computer apparatus to which the embodiments of the present application may be applied.
According to the computer equipment, a preset camera is adopted to carry out continuous image acquisition processing on a designated area so as to obtain two continuous frames of fire images; performing pixel point analysis processing on the appointed frame fire situation image, and acquiring all first color blocks; drawing a first path in the appointed frame fire image, and then acquiring the length of the first path; if the length of the first path is larger than a preset length threshold, inputting the appointed frame fire image into a preset fire scale recognition model so as to obtain a fire scale numerical value; if the firework size numerical value is larger than a preset firework size threshold value, calculating a specified firework size increase numerical value; acquiring a specified early warning strategy; and sending the specified early warning strategy to the specified terminal. Thereby realizing accurate fire recognition and early warning.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored thereon, and when the computer program is executed by a processor, the policy sending method based on the scale recognition model is implemented, where steps included in the method are respectively in one-to-one correspondence with steps of implementing the policy sending method based on the scale recognition model in the foregoing embodiment, and are not described herein again.
The computer-readable storage medium adopts a preset camera to carry out continuous image acquisition processing on a designated area so as to obtain two continuous frames of fire images; performing pixel point analysis processing on the appointed frame fire situation image, and acquiring all first color blocks; drawing a first path in the appointed frame fire image, and then acquiring the length of the first path; if the length of the first path is larger than a preset length threshold, inputting the appointed frame fire image into a preset fire scale recognition model so as to obtain a fire scale numerical value; if the firework size numerical value is larger than a preset firework size threshold value, calculating a specified firework size increase numerical value; acquiring a specified early warning strategy; and sending the specified early warning strategy to the specified terminal. Thereby realizing accurate fire recognition and early warning.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The block chain underlying platform can comprise processing modules such as user management, basic service, intelligent contract and operation monitoring. The user management module is responsible for identity information management of all blockchain participants, and comprises public and private key generation maintenance (account management), key management, user real identity and blockchain address corresponding relation maintenance (authority management) and the like, and under the authorization condition, the user management module supervises and audits the transaction condition of certain real identities and provides rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node equipment and used for verifying the validity of the service request, recording the service request to storage after consensus on the valid request is completed, for a new service request, the basic service firstly performs interface adaptation analysis and authentication processing (interface adaptation), then encrypts service information (consensus management) through a consensus algorithm, transmits the service information to a shared account (network communication) completely and consistently after encryption, and performs recording and storage; the intelligent contract module is responsible for registering and issuing contracts, triggering the contracts and executing the contracts, developers can define contract logics through a certain programming language, issue the contract logics to a block chain (contract registration), call keys or other event triggering and executing according to the logics of contract clauses, complete the contract logics and simultaneously provide the function of upgrading and canceling the contracts; the operation monitoring module is mainly responsible for deployment, configuration modification, contract setting, cloud adaptation in the product release process and visual output of real-time states in product operation, such as: alarm, monitoring network conditions, monitoring node equipment health status, and the like.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1. A strategy sending method based on a scale recognition model is characterized by comprising the following steps:
adopting a preset camera to carry out continuous image acquisition processing on the designated area so as to obtain two continuous frames of fire images; wherein the designated area is planted with plants and the plants are burning; the designated area is also provided with a simulated tree, the simulated tree is made of designated materials, the flame of the designated materials is in a first color during combustion, the flame of the plants is in a second color during combustion, and the first color is different from the second color;
selecting a designated frame of fire image from the two frames of fire images, performing pixel point analysis processing on the designated frame of fire image, and acquiring all first color blocks, wherein each first color block is formed by continuous pixels presenting a first color;
drawing a first path in the appointed frame fire image so that the first path passes through all first color blocks according to the shortest path, then acquiring the length of the first path, and judging whether the length of the first path is greater than a preset length threshold value or not;
if the length of the first path is larger than a preset length threshold, inputting the appointed frame fire image into a preset fire scale recognition model, so as to obtain a fire scale numerical value output by the fire scale recognition model; the firework size recognition model is obtained by training based on a yolov3 network model and by adopting training data, wherein the training data are formed by a training fire image and artificially marked fire size numerical values corresponding to the training fire image;
if the firework size numerical value is larger than a preset firework size threshold value, calculating a specified firework size increase numerical value corresponding to the two continuous frames of fire images by using a preset firework increase scale algorithm;
acquiring a designated early warning strategy corresponding to the designated firework scale growth numerical value according to the corresponding relation between the preset firework scale growth numerical value and the early warning strategy; wherein, the appointed early warning strategy records an appointed terminal;
and sending the specified early warning strategy to the specified terminal.
2. The method for sending a strategy based on a scale recognition model according to claim 1, wherein the step of drawing a first path in the specified frame fire image so that the first path passes through all first color blocks in the shortest path, then obtaining the length of the first path, and judging whether the length of the first path is greater than a preset length threshold value comprises the following steps:
if the length of the first path is not greater than a preset length threshold, performing color mixing processing on the first color and the second color to obtain a third color;
acquiring all third color blocks in the appointed frame fire image, wherein each third color block is formed by continuous pixel points presenting a third color;
drawing a second path in the appointed frame fire image so that the second path passes through all the first color blocks and the third color blocks according to the shortest path, then acquiring the length of the second path, and judging whether the length of the second path is greater than a preset length threshold value or not;
and if the length of the second path is greater than a preset length threshold, generating a firework identification instruction, wherein the firework identification instruction is used for indicating that the appointed frame fire image is input into a preset firework scale identification model, so that a firework scale numerical value output by the firework scale identification model is obtained.
3. The strategy transmitting method based on scale recognition model according to claim 1, wherein the step of inputting the specified frame fire image into a preset fire scale recognition model if the length of the first path is greater than a preset length threshold value so as to obtain the fire scale value output by the fire scale recognition model is preceded by the step of:
acquiring a first number of initial fire pictures collected in advance, wherein the initial fire pictures have artificially marked fire scale numerical values;
according to a preset data expansion processing method, performing data expansion processing on the initial fire pictures to obtain a second number of expanded fire pictures;
taking the first number of initial fire pictures and the second number of expanded fire pictures as sample sets, and dividing the sample sets into training sets and verification sets according to a preset proportion;
calling a preset yolov3 network model, inputting data in a training set into a yolov3 network model for training, and thus obtaining a temporary model, wherein a designated loss function is adopted for training in the training process;
verifying the temporary model by using the data in the verification set to obtain a verification result, and judging whether the verification result is passed;
and if the verification result is that the verification is passed, recording the temporary model as a firework size identification model.
4. The scale-recognition-model-based strategy transmission method according to claim 3, wherein the step of training with a specified loss function in the training process comprises:
the formula for setting the specified loss function is:
Figure FDA0002649220520000031
and training by adopting a specified loss function in the training process, wherein L is the specified loss function, N pictures are in total in the training set, i refers to the ith picture in the N pictures, y(i)Refers to the desired output of the ith picture,
Figure FDA0002649220520000032
refers to the actual output of the ith picture.
5. The scale recognition model-based strategy transmission method according to claim 1, wherein the step of calculating the assigned firework size growth value corresponding to the two consecutive frames of fire images by using a preset firework size growth algorithm comprises:
respectively smoothing the two continuous frames of fire images by adopting a Gaussian smoothing method and a median smoothing method in sequence so as to correspondingly obtain two frames of smooth images;
subtracting all pixel color values corresponding to the previous frame of smooth image from all pixel color values of the next frame of smooth image to obtain a color value difference matrix, and taking the color value difference matrix as the pixel color values to construct a difference image;
acquiring a block formed by appointed pixel points from the difference image, wherein the color value of the appointed pixel points is greater than a preset color value threshold;
and counting the area of the block formed by the specified pixel points, and recording the block formed by the specified pixel points as a specified firework size increase value.
6. A policy transmitting apparatus based on a scale recognition model, comprising:
the fire image acquisition unit is used for adopting a preset camera to carry out continuous image acquisition processing on the designated area so as to obtain two continuous frames of fire images; wherein the designated area is planted with plants and the plants are burning; the designated area is also provided with a simulated tree, the simulated tree is made of designated materials, the flame of the designated materials is in a first color during combustion, the flame of the plants is in a second color during combustion, and the first color is different from the second color;
the fire image selecting unit is used for selecting a specified frame of fire image from the two frames of fire images, performing pixel point analysis processing on the specified frame of fire image and acquiring all first color blocks, wherein each first color block is formed by continuous pixels presenting a first color;
the first path drawing unit is used for drawing a first path in the appointed frame fire situation image so as to enable the first path to pass through all the first color blocks according to the shortest path, then obtaining the length of the first path, and judging whether the length of the first path is larger than a preset length threshold value or not;
the firework size numerical value acquisition unit is used for inputting the appointed frame fire image into a preset firework size recognition model if the length of the first path is larger than a preset length threshold value, so as to obtain a firework size numerical value output by the firework size recognition model; the firework size recognition model is obtained by training based on a yolov3 network model and by adopting training data, wherein the training data are formed by a training fire image and artificially marked fire size numerical values corresponding to the training fire image;
the firework size increase numerical value calculation unit is used for calculating the appointed firework size increase numerical value corresponding to the two continuous frames of fire images by using a preset firework size increase algorithm if the firework size numerical value is larger than a preset firework size threshold;
the appointed early warning strategy acquisition unit is used for acquiring an appointed early warning strategy corresponding to an appointed smoke and fire scale increase numerical value according to the corresponding relation between a preset smoke and fire scale increase numerical value and the early warning strategy; wherein, the appointed early warning strategy records an appointed terminal;
and the appointed early warning strategy sending unit is used for sending the appointed early warning strategy to the appointed terminal.
7. The device for sending policies based on scale recognition model according to claim 6, characterized in that the device comprises:
a third color obtaining unit, configured to perform color mixing processing on the first color and the second color to obtain a third color if the length of the first path is not greater than a preset length threshold;
the third color block acquisition unit is used for acquiring all third color blocks in the specified frame fire situation image, wherein each third color block is formed by continuous pixel points presenting a third color;
a second path drawing unit, configured to draw a second path in the specified frame fire image, so that the second path passes through all the first color blocks and the third color blocks according to a shortest path, obtain the length of the second path, and determine whether the length of the second path is greater than a preset length threshold;
and the firework identification instruction generating unit is used for generating a firework identification instruction if the length of the second path is greater than a preset length threshold, wherein the firework identification instruction is used for indicating that the appointed frame fire image is input into a preset firework scale identification model, so that a firework scale numerical value output by the firework scale identification model is obtained.
8. The device for sending policies based on scale recognition model according to claim 6, characterized in that the device comprises:
the device comprises an initial fire picture acquisition unit, a fire scale detection unit and a fire scale detection unit, wherein the initial fire picture acquisition unit is used for acquiring a first number of initial fire pictures which are collected in advance, and the initial fire pictures have artificially marked fire scale numerical values;
the data expansion unit is used for performing data expansion processing on the initial fire pictures according to a preset data expansion processing method so as to obtain a second number of expanded fire pictures;
the sample set dividing unit is used for taking the first number of initial fire pictures and the second number of expanded fire pictures as sample sets and dividing the sample sets into a training set and a verification set according to a preset proportion;
the temporary model obtaining unit is used for calling a preset yolov3 network model, inputting data in a training set into the yolov3 network model for training so as to obtain a temporary model, wherein a specified loss function is adopted for training in the training process;
the verification result judging unit is used for verifying the temporary model by using the data in the verification set to obtain a verification result and judging whether the verification result is passed;
and the temporary model marking unit is used for marking the temporary model as a firework scale identification model if the verification result is that the verification is passed.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN202010632220.1A 2020-07-03 2020-07-03 Strategy sending method and device based on scale recognition model and computer equipment Active CN111523528B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010632220.1A CN111523528B (en) 2020-07-03 2020-07-03 Strategy sending method and device based on scale recognition model and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010632220.1A CN111523528B (en) 2020-07-03 2020-07-03 Strategy sending method and device based on scale recognition model and computer equipment

Publications (2)

Publication Number Publication Date
CN111523528A CN111523528A (en) 2020-08-11
CN111523528B true CN111523528B (en) 2020-10-20

Family

ID=71910281

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010632220.1A Active CN111523528B (en) 2020-07-03 2020-07-03 Strategy sending method and device based on scale recognition model and computer equipment

Country Status (1)

Country Link
CN (1) CN111523528B (en)

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0313101A2 (en) * 1982-07-30 1989-04-26 Honeywell Inc. Fractional pixel mapping in a computer-controlled imaging system
KR101366198B1 (en) * 2013-01-21 2014-03-13 상지영서대학 산학협력단 Image processing method for automatic early smoke signature of forest fire detection based on the gaussian background mixture models and hsl color space analysis
CN106203334A (en) * 2016-07-11 2016-12-07 电子科技大学 A kind of indoor scene flare detection method
KR20170037375A (en) * 2015-09-25 2017-04-04 국민대학교산학협력단 System and method for real-time fire detection using color information of the image
KR20180107930A (en) * 2017-03-23 2018-10-04 한국과학기술원 Method and system for artificial intelligence based video surveillance using deep learning
CN109145689A (en) * 2017-06-28 2019-01-04 南京理工大学 A kind of robot fire detection method
CN109409256A (en) * 2018-10-10 2019-03-01 东南大学 A kind of forest rocket detection method based on 3D convolutional neural networks
CN109544854A (en) * 2018-10-16 2019-03-29 平安科技(深圳)有限公司 Fire detection method, device, electronic equipment and computer readable storage medium
CN109637068A (en) * 2018-11-23 2019-04-16 山东智洋电气股份有限公司 Intelligent pyrotechnics identifying system
CN109635814A (en) * 2018-12-21 2019-04-16 河南理工大学 Forest fire automatic testing method and device based on deep neural network
CN110135269A (en) * 2019-04-18 2019-08-16 杭州电子科技大学 A kind of fire image detection method based on blend color model and neural network
KR20190103855A (en) * 2018-02-28 2019-09-05 주식회사 비젼하이텍 Apparatus and method of searching fire image based on imaging area of the ptz camera
CN110334660A (en) * 2019-07-08 2019-10-15 天津城建大学 A kind of forest fire monitoring method based on machine vision under the conditions of greasy weather
CN110415396A (en) * 2019-06-24 2019-11-05 平安国际智慧城市科技股份有限公司 Access control method, system, equipment and storage medium based on artificial intelligence
CN110443969A (en) * 2018-05-03 2019-11-12 中移(苏州)软件技术有限公司 A kind of fire point detecting method, device, electronic equipment and storage medium
CN110516609A (en) * 2019-08-28 2019-11-29 南京邮电大学 A kind of fire video detection and method for early warning based on image multiple features fusion
CN110852347A (en) * 2019-10-17 2020-02-28 天津大学 Fire detection method using improved YOLO v3
CN111091072A (en) * 2019-11-29 2020-05-01 河海大学 YOLOv 3-based flame and dense smoke detection method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7093175B2 (en) * 2017-11-27 2022-06-29 ホーチキ株式会社 Fire alarm
CN108648402B (en) * 2018-05-02 2020-04-24 平安科技(深圳)有限公司 Intelligent fire alarm method, terminal and storage medium
CN108875600A (en) * 2018-05-31 2018-11-23 银江股份有限公司 A kind of information of vehicles detection and tracking method, apparatus and computer storage medium based on YOLO
CN110033040B (en) * 2019-04-12 2021-05-04 华南师范大学 Flame identification method, system, medium and equipment

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0313101A2 (en) * 1982-07-30 1989-04-26 Honeywell Inc. Fractional pixel mapping in a computer-controlled imaging system
KR101366198B1 (en) * 2013-01-21 2014-03-13 상지영서대학 산학협력단 Image processing method for automatic early smoke signature of forest fire detection based on the gaussian background mixture models and hsl color space analysis
KR20170037375A (en) * 2015-09-25 2017-04-04 국민대학교산학협력단 System and method for real-time fire detection using color information of the image
CN106203334A (en) * 2016-07-11 2016-12-07 电子科技大学 A kind of indoor scene flare detection method
KR20180107930A (en) * 2017-03-23 2018-10-04 한국과학기술원 Method and system for artificial intelligence based video surveillance using deep learning
CN109145689A (en) * 2017-06-28 2019-01-04 南京理工大学 A kind of robot fire detection method
KR20190103855A (en) * 2018-02-28 2019-09-05 주식회사 비젼하이텍 Apparatus and method of searching fire image based on imaging area of the ptz camera
CN110443969A (en) * 2018-05-03 2019-11-12 中移(苏州)软件技术有限公司 A kind of fire point detecting method, device, electronic equipment and storage medium
CN109409256A (en) * 2018-10-10 2019-03-01 东南大学 A kind of forest rocket detection method based on 3D convolutional neural networks
CN109544854A (en) * 2018-10-16 2019-03-29 平安科技(深圳)有限公司 Fire detection method, device, electronic equipment and computer readable storage medium
CN109637068A (en) * 2018-11-23 2019-04-16 山东智洋电气股份有限公司 Intelligent pyrotechnics identifying system
CN109635814A (en) * 2018-12-21 2019-04-16 河南理工大学 Forest fire automatic testing method and device based on deep neural network
CN110135269A (en) * 2019-04-18 2019-08-16 杭州电子科技大学 A kind of fire image detection method based on blend color model and neural network
CN110415396A (en) * 2019-06-24 2019-11-05 平安国际智慧城市科技股份有限公司 Access control method, system, equipment and storage medium based on artificial intelligence
CN110334660A (en) * 2019-07-08 2019-10-15 天津城建大学 A kind of forest fire monitoring method based on machine vision under the conditions of greasy weather
CN110516609A (en) * 2019-08-28 2019-11-29 南京邮电大学 A kind of fire video detection and method for early warning based on image multiple features fusion
CN110852347A (en) * 2019-10-17 2020-02-28 天津大学 Fire detection method using improved YOLO v3
CN111091072A (en) * 2019-11-29 2020-05-01 河海大学 YOLOv 3-based flame and dense smoke detection method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A YOLO based Technique for Early Forest Fire Detection;Sidhant Goyal et al;《International Journal of Innovative Technology and Exploring Engineering(IJITEE)》;20200430;第9卷(第6期);1357-1362 *
基于颜色和纹理特征的森林火灾图像识别;李巨虎 等;《华南理工大学学报(自然科学版)》;20200131;第48卷(第1期);70-83 *

Also Published As

Publication number Publication date
CN111523528A (en) 2020-08-11

Similar Documents

Publication Publication Date Title
CN110929648B (en) Monitoring data processing method and device, computer equipment and storage medium
CN110674790B (en) Abnormal scene processing method and system in video monitoring
CN110414400A (en) A kind of construction site safety cap wearing automatic testing method and system
CN111611439A (en) Fire safety monitoring method and device, computer equipment and storage medium
CN107766830B (en) A kind of image detection alarm method and relevant device
CN110493181A (en) User behavior detection method, device, computer equipment and storage medium
CN111506710B (en) Information sending method and device based on rumor prediction model and computer equipment
CN112036749A (en) Method and device for identifying risk user based on medical data and computer equipment
CN111523528B (en) Strategy sending method and device based on scale recognition model and computer equipment
CN111860187A (en) High-precision worn mask identification method and system
CN113505709A (en) Method and system for monitoring dangerous behaviors of human body in real time
CN111105582B (en) Forest fire prevention monitoring method and system, computer equipment and readable storage medium
CN111359132B (en) Intelligent fire-fighting alarm method and system based on artificial intelligence
CN113761217A (en) Artificial intelligence-based question set data processing method and device and computer equipment
CN111695544A (en) Information sending method and device based on crowd detection model and computer equipment
CN116911778A (en) Hotel project development management method and system
CN111582183A (en) Mask identification method and system in public place
CN113535260B (en) Simulator-based data processing method, device, equipment and storage medium
CN109544425A (en) Regional alarm method and device
CN113919953A (en) Method, device, equipment and storage medium for realizing cross-chain generation of intelligent contract
Krasuski A framework for Dynamic Analytical Risk Management at the emergency scene. From tribal to top down in the risk management maturity model
CN112037451A (en) Early warning method and device
CN111899765A (en) Method and device for sending voice based on emotion prediction model and computer equipment
CN117132945B (en) Multi-source data fusion-based key area security method and device
CN118115340B (en) Block chain-based emergency management method and system

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
GR01 Patent grant
GR01 Patent grant