CN113378953A - Method, device, equipment and medium for manufacturing training sample of fire detection model - Google Patents

Method, device, equipment and medium for manufacturing training sample of fire detection model Download PDF

Info

Publication number
CN113378953A
CN113378953A CN202110694190.1A CN202110694190A CN113378953A CN 113378953 A CN113378953 A CN 113378953A CN 202110694190 A CN202110694190 A CN 202110694190A CN 113378953 A CN113378953 A CN 113378953A
Authority
CN
China
Prior art keywords
target
image
smoke
images
initial
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
Application number
CN202110694190.1A
Other languages
Chinese (zh)
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.)
Xuzhou Caiju Intelligent Technology Co ltd
Original Assignee
Xuzhou Caiju Intelligent 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 Xuzhou Caiju Intelligent Technology Co ltd filed Critical Xuzhou Caiju Intelligent Technology Co ltd
Priority to CN202110694190.1A priority Critical patent/CN113378953A/en
Publication of CN113378953A publication Critical patent/CN113378953A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/28Design optimisation, verification or simulation using fluid dynamics, e.g. using Navier-Stokes equations or computational fluid dynamics [CFD]
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B17/00Fire alarms; Alarms responsive to explosion
    • G08B17/12Actuation by presence of radiation or particles, e.g. of infrared radiation or of ions
    • G08B17/125Actuation by presence of radiation or particles, e.g. of infrared radiation or of ions by using a video camera to detect fire or smoke

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Algebra (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Business, Economics & Management (AREA)
  • Emergency Management (AREA)
  • Evolutionary Biology (AREA)
  • Computing Systems (AREA)
  • Fluid Mechanics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Geometry (AREA)
  • Fire-Detection Mechanisms (AREA)
  • Image Analysis (AREA)

Abstract

The application provides a method, a device, equipment and a medium for manufacturing a training sample of a fire detection model, and relates to the technical field of image processing. The method comprises the steps of obtaining a plurality of initial background images under different brightness and different weather conditions; synthesizing a plurality of initial smoke images through fluid simulation software; traversing a plurality of initial background images and a plurality of initial smoke images, and randomly determining a target smoke image and a target background image corresponding to the target smoke image; inserting the target smoke image into the corresponding target background image to obtain a training sample for training a fire detection model; the target smoke image is one or more of the initial smoke images, and the target background image is one or more of the initial background images. The method, the device, the equipment and the medium can provide a large number of training samples for fire detection model training so as to train a detection model capable of accurately detecting fire when the fire occurs.

Description

Method, device, equipment and medium for manufacturing training sample of fire detection model
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method, an apparatus, a device, and a medium for making a training sample of a fire detection model.
Background
Forest fires have the characteristics of outburst, randomness, high harmfulness and quick diffusivity, and once a fire occurs, the fire can spread quickly. Therefore, whether the fire can be found in time or not so as to put out the fire by adopting a reasonable means is the core of forest fire prevention.
With the development of technology, deep learning is more and more widely applied to fire detection, and when forest fires are detected through deep learning, a large amount of image data of the forest fires occurring in the early stage are required to be used as training samples to train a fire detection model. However, the forest fire is often discovered not in the early stage of the fire, so that the image data of the forest fire in the early stage of the fire is very little, and a training sample is not enough to train a detection model capable of accurately detecting the fire.
Therefore, it is an urgent problem in the prior art to provide an effective solution for providing a large number of training samples for fire detection model training to train a fire detection model capable of accurately detecting a fire when the fire occurs.
Disclosure of Invention
In a first aspect, an embodiment of the present application provides a method for making a training sample of a fire detection model, including:
acquiring a plurality of initial background images under different brightness and different weather conditions;
synthesizing a plurality of initial smoke images through fluid simulation software;
traversing the initial background images and the initial smoke images, and randomly determining a target smoke image and a target background image corresponding to the target smoke image;
inserting the target smoke image into the corresponding target background image to obtain a training sample for training a fire detection model;
wherein the target smoke image is one or more of the plurality of initial smoke images, and the target background image is one or more of the plurality of initial background images.
In one possible design, the inserting the target smoke image into the corresponding target background image includes:
adjusting the transparency and the brightness of the target smoke image according to the image brightness and the weather condition corresponding to the target background image;
and inserting the target smoke image with the transparency and the brightness adjusted into the corresponding target background image.
In one possible design, the adjusting the transparency and the brightness of the target smoke image according to the image brightness and the weather condition corresponding to the target background image includes:
determining a corresponding brightness adjusting range and a corresponding transparency adjusting range according to the image brightness and the weather condition corresponding to the target background image;
randomly adjusting the brightness of the target smoke image within the brightness adjustment range;
and randomly adjusting the transparency of the target smoke image within the transparency adjustment range.
In one possible design, the inserting the target smoke image into the corresponding target background image includes:
adjusting the size of the target smoke image according to the depth of field corresponding to the target background image;
inserting the target smoke image after the size is adjusted into the target background image.
In one possible design, the inserting the resized target smoke image into the target background image includes:
and inserting the target smoke image with the adjusted size into a preset area in the target background image.
In one possible design, the acquiring multiple initial background images under different brightness and different weather conditions includes:
acquiring videos shot by a camera under different brightness and different weather conditions at different shooting angles;
and extracting the initial background images from the video.
In one possible design, the method further includes:
and carrying out fire detection model training through the training sample.
In a second aspect, an embodiment of the present application provides a device for making a training sample of a fire detection model, including:
the acquisition module is used for acquiring a plurality of initial background images under different brightness and different weather conditions;
the synthesis module is used for synthesizing a plurality of initial smoke images through fluid simulation software;
the determining module is used for traversing the initial background images and the initial smoke images and randomly determining a target smoke image and a target background image corresponding to the target smoke image;
the inserting module is used for inserting the target smoke image into the corresponding target background image to obtain a training sample for training a fire detection model;
wherein the target smoke image is one or more of the plurality of initial smoke images, and the target background image is one or more of the plurality of initial background images.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the bus;
a memory for storing a computer program;
the processor is used for executing the program stored in the memory and realizing the following processes:
acquiring a plurality of initial background images under different brightness and different weather conditions;
synthesizing a plurality of initial smoke images through fluid simulation software;
traversing the initial background images and the initial smoke images, and randomly determining a target smoke image and a target background image corresponding to the target smoke image;
inserting the target smoke image into the corresponding target background image to obtain a training sample for training a fire detection model;
wherein the target smoke image is one or more of the plurality of initial smoke images, and the target background image is one or more of the plurality of initial background images.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the following processes:
acquiring a plurality of initial background images under different brightness and different weather conditions;
synthesizing a plurality of initial smoke images through fluid simulation software;
traversing the initial background images and the initial smoke images, and randomly determining a target smoke image and a target background image corresponding to the target smoke image;
inserting the target smoke image into the corresponding target background image to obtain a training sample for training a fire detection model;
wherein the target smoke image is one or more of the plurality of initial smoke images, and the target background image is one or more of the plurality of initial background images.
The above-mentioned at least one technical scheme that this application one or more embodiments adopted can reach following beneficial effect:
the method comprises the steps of obtaining a plurality of initial background images under different brightness and different weather conditions, synthesizing the plurality of initial smoke images through fluid simulation software, traversing the plurality of initial background images and the plurality of initial smoke images, randomly determining a target smoke image and a target background image corresponding to the target smoke image, and inserting the target smoke image into the corresponding target background image to obtain a training sample for training a fire detection model. So, the training sample that is used for the training of fire detection model in a large number of preparation that can be very convenient to train out and to detect out the detection model that the conflagration can accurately detect out the conflagration when the conflagration takes place, and for gathering the image as training sample in fact, the cost of manufacture of reduction sample that can be very big.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure in any way. In the drawings:
fig. 1 is a schematic application environment diagram of a method, an apparatus, a device, and a medium for making a training sample of a fire detection model according to an embodiment of the present application.
Fig. 2 is a flowchart of a method for making training samples of a fire detection model according to an embodiment of the present disclosure.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a training sample preparation device of a fire detection model according to an embodiment of the present application.
Detailed Description
In order to provide a large number of training samples for fire detection model training, the embodiment of the application provides a method, a device, equipment and a medium for making the training samples of the fire detection model.
First, in order to more intuitively understand the scheme provided by the embodiment of the present application, a system architecture of a training sample preparation scheme of a fire detection model provided by the embodiment of the present application is described below with reference to fig. 1.
Fig. 1 is a schematic application environment diagram of a method, an apparatus, a device, and a medium for making a training sample of a fire detection model according to one or more embodiments of the present disclosure. As shown in fig. 1, the edge computing device is connected to a camera for capturing images and sending the images to a user terminal through the edge computing device, and is communicatively connected to the user terminal through a network, the edge computing device is used for controlling the camera to rotate the images obtained at different angles, and the user terminal is, but not limited to, a personal computer, a smart phone, a tablet computer, a Personal Digital Assistant (PDA), and the like.
The following describes in detail a method for making a training sample of a fire detection model provided in an embodiment of the present application.
The method for manufacturing the training sample of the fire detection model can be applied to the user terminal. For convenience of description, the embodiments of the present application are described with reference to a user terminal as an implementation subject, unless otherwise specified.
It is to be understood that the described execution body does not constitute a limitation of the embodiments of the present application.
The embodiment of the application provides a method for manufacturing a training sample of a fire detection model, the method can be used for manufacturing the training sample for training the fire detection model, and the fire detection model can be used for detecting forest fires. As shown in fig. 2, a method for making a training sample of a fire detection model according to an embodiment of the present disclosure may include the following steps:
in step S201, a plurality of initial background images under different brightness and different weather conditions are acquired.
In the embodiment of the application, the camera is provided with the pan-tilt, and the edge computing device connected with the camera can control the pan-tilt to rotate, so that the camera can shoot videos at different shooting angles under different brightness and different weather conditions, the obtained videos are sent to the user terminal (through the edge computing device), and the user terminal extracts a plurality of initial background images under different brightness and different weather conditions from the videos sent by the camera.
The brightness can be determined according to the brightness value of each color channel in the initial background image, the weather condition can be identified by performing image recognition on the initial background image, or the weather condition is determined according to the weather condition of the area where the camera is located in the time period corresponding to the time stamp of the initial background image, and the embodiment of the application is not particularly limited.
It will be appreciated that in other embodiments, multiple initial background images at different intensities and under different weather conditions may be manually selected from the video.
Step S202, synthesizing a plurality of initial smoke images through fluid simulation software.
When a plurality of initial smoke images are synthesized through fluid simulation software, the synthesized initial smoke images are preferably smoke images in different forms, so that when a fire detection model is trained subsequently, the images with smoke in different forms can be used as training samples, and the detection accuracy of the trained detection model is ensured.
The fluid simulation software may be, but is not limited to, simulation software such as C4D (Cinema 4D), XFlow, and the like, and is not particularly limited in this embodiment.
Step S203, traversing a plurality of initial background images and a plurality of initial smoke images, and randomly determining a target smoke image and a target background image corresponding to the target smoke image.
The target smoke image is one or more of the initial smoke images, and the target background image is one or more of the initial background images.
Specifically, a plurality of initial background images and a plurality of initial smoke images can be traversed, one or more of the initial background images are randomly selected as target background images, and one or more corresponding to the target background images are selected from the initial smoke images as target smoke images.
In the embodiment of the application, the number of the target background images and the number of the target smoke images may be the same or different, and if the number of the target background images is the same as that of the target smoke images and is multiple, the multiple target background images correspond to the multiple target smoke images one to one. The number of the target background images and the number of the target smoke images can be different, and at least one of the target smoke images corresponds to two or more than two target background images if the number of the target background images is larger than the number of the target smoke images. If the number of the target smoke images is larger than that of the target background images, at least one of the target background images corresponds to two or more than two target smoke images.
For example, in one embodiment, the target smoke images are 2, divided into a1 and a2, and the target background images are 4, respectively b1, b2, b3 and b4, then the target background image corresponding to the target smoke image a1 may be the target background images b1 and b2, and the target background image corresponding to the target smoke image a2 may be the target background images b3 and b 4.
And S204, inserting the target smoke image into the corresponding target background image to obtain a training sample for training a fire detection model.
In case of fire, the brightness and transparency of smoke in images captured by the camera under different weather conditions may differ (for example, the brightness and transparency of smoke in images captured on a sunny day and a cloudy day may differ), and the brightness and transparency of smoke in images captured by the camera with different brightness may also differ. Therefore, in order to enable the obtained image to be closer to a real image after the target smoke image is inserted into the corresponding target background image, the scheme provided in the embodiment of the present application may further adjust the transparency and the brightness of the corresponding target smoke image according to the image brightness and the weather condition corresponding to the target background image, then insert the target smoke image with the adjusted transparency and brightness into the corresponding target background image, and insert the target smoke image into the corresponding target background image to obtain an image, which is a training sample for training the fire detection model.
Specifically, the brightness adjustment range and the transparency adjustment range of the smoke image corresponding to the background image under different image brightness and weather conditions may be predefined at the user terminal, and the brightness adjustment range may be determined according to the image brightness and weather corresponding to the background in the image captured when a fire actually occurs, and the brightness and transparency of the smoke in the captured image.
After the target smoke image and the target background image corresponding to the target smoke image are determined, a corresponding brightness adjusting range and a corresponding transparency adjusting range can be determined according to the image brightness and the weather condition corresponding to the target background image, then the brightness of the target smoke image is randomly adjusted in the brightness adjusting range, and the transparency of the target smoke image is randomly adjusted in the transparency adjusting range. Therefore, the target smoke image is inserted into the corresponding target background image, the obtained image is closer to a real image, and meanwhile, certain difference exists between the images, so that the subsequently trained detection model can accurately detect the fire when the fire happens.
The distance of the clear image shot by the camera is related to the depth of field, the size of the shot clear image in the image is different from the distance of the scene from the camera, and the size of the shot clear image in the image is gradually changed along with the increase of the depth of field. Therefore, in order to make the target smoke image closer to the real smoke, the size of the target smoke image corresponding to the target background image may be adjusted according to the depth of field corresponding to the target background image, and the size of the target smoke image is smaller when the depth of field is deeper. And then inserting the target smoke image with the adjusted size into a corresponding target background image.
Further, in this embodiment of the application, before inserting the size-adjusted target smoke image into the corresponding target background image, a preset region into which the target smoke image can be inserted may be defined in the target background image in advance, where the preset region is some regions where fire may occur, and when inserting the size-adjusted target smoke image into the corresponding target background image, the size-adjusted target smoke image may be inserted into the preset region in the corresponding target background image. Specifically, a mask region may be set in the target background image, the mask region is a region where fire is unlikely to occur (such as the sky), a region outside the mask region is a preset region into which the target smoke image may be inserted, and when the target smoke image with the adjusted size is inserted into the preset region in the target background image, the target smoke image may be randomly inserted into any position in the preset region.
In addition, after the target smoke image is inserted into the corresponding target background image to obtain a training sample for training the fire detection model, the fire detection model can be trained through the training sample.
In summary, in the method for manufacturing the training sample of the fire detection model provided in the embodiment of the present application, the training sample for training the fire detection model is obtained by obtaining a plurality of initial background images under different brightness and different weather conditions, synthesizing a plurality of initial smoke images through the fluid simulation software, traversing the plurality of initial background images and the plurality of initial smoke images, randomly determining the target smoke image and the target background image corresponding to the target smoke image, and inserting the target smoke image into the corresponding target background image. So, the training sample that is used for the training of fire detection model in a large number of preparation that can be very convenient to train out and to detect out the detection model that the conflagration can accurately detect out the conflagration when the conflagration takes place, and for gathering the image as training sample in fact, the cost of manufacture of reduction sample that can be very big. Meanwhile, when the target smoke image is inserted into the corresponding target background image, the corresponding brightness adjusting range and the corresponding transparency adjusting range can be determined according to the image brightness and the weather condition corresponding to the target background image, then the brightness of the target smoke image is randomly adjusted in the brightness adjusting range, and the transparency of the target smoke image is randomly adjusted in the transparency adjusting range. Therefore, the target smoke image is inserted into the corresponding target background image, the obtained image is closer to a real image, and meanwhile, certain difference exists between the images, so that the subsequently trained detection model can accurately detect the fire when the fire happens. In addition, when the target smoke image is inserted into the corresponding target background image, the size of the target smoke image can be adjusted according to the depth of field, so that the target smoke image is further ensured to approach to real smoke, and a subsequently trained detection model can accurately detect a fire when the fire occurs.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Referring to fig. 3, at a hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 3, but this does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads a corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the training sample making device of the fire detection model on a logic level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
acquiring a plurality of initial background images under different brightness and different weather conditions;
synthesizing a plurality of initial smoke images through fluid simulation software;
traversing the initial background images and the initial smoke images, and randomly determining a target smoke image and a target background image corresponding to the target smoke image;
inserting the target smoke image into the corresponding target background image to obtain a training sample for training a fire detection model;
wherein the target smoke image is one or more of the plurality of initial smoke images, and the target background image is one or more of the plurality of initial background images.
The method performed by the training sample preparation device of the fire detection model according to the embodiment of fig. 3 of the present application may be implemented in or by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in one or more embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with one or more embodiments of the present application may be embodied directly in the hardware decoding processor, or in a combination of the hardware and software modules included in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The electronic device may further execute the method shown in fig. 2, and implement the functions of the training sample making apparatus for a fire detection model in the embodiment shown in fig. 3, which are not described herein again in this application.
Of course, besides the software implementation, the electronic device of the present application does not exclude other implementations, such as a logic device or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or a logic device.
Embodiments of the present application also provide a computer-readable storage medium storing one or more programs, where the one or more programs include instructions, which when executed by a portable electronic device including a plurality of application programs, enable the portable electronic device to perform the method of the embodiment shown in fig. 2, and are specifically configured to:
acquiring a plurality of initial background images under different brightness and different weather conditions;
synthesizing a plurality of initial smoke images through fluid simulation software;
traversing the initial background images and the initial smoke images, and randomly determining a target smoke image and a target background image corresponding to the target smoke image;
inserting the target smoke image into the corresponding target background image to obtain a training sample for training a fire detection model;
wherein the target smoke image is one or more of the plurality of initial smoke images, and the target background image is one or more of the plurality of initial background images.
Fig. 4 is a schematic structural diagram of a training sample preparation device of a fire detection model according to an embodiment of the present application. Referring to fig. 4, in one software implementation, the apparatus for making training samples of a fire detection model includes:
the acquisition module is used for acquiring a plurality of initial background images under different brightness and different weather conditions;
the synthesis module is used for synthesizing a plurality of initial smoke images through fluid simulation software;
the determining module is used for traversing the initial background images and the initial smoke images and randomly determining a target smoke image and a target background image corresponding to the target smoke image;
the inserting module is used for inserting the target smoke image into the corresponding target background image to obtain a training sample for training a fire detection model;
wherein the target smoke image is one or more of the plurality of initial smoke images, and the target background image is one or more of the plurality of initial background images.
In short, the above description is only a preferred embodiment of this document, and is not intended to limit the scope of protection of this document. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this document shall be included in the protection scope of this document.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
All the embodiments in this document are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.

Claims (10)

1. A method for making a training sample of a fire detection model is characterized by comprising the following steps:
acquiring a plurality of initial background images under different brightness and different weather conditions;
synthesizing a plurality of initial smoke images through fluid simulation software;
traversing the initial background images and the initial smoke images, and randomly determining a target smoke image and a target background image corresponding to the target smoke image;
inserting the target smoke image into the corresponding target background image to obtain a training sample for training a fire detection model;
wherein the target smoke image is one or more of the plurality of initial smoke images, and the target background image is one or more of the plurality of initial background images.
2. The method of claim 1, wherein said inserting said target smoke image into said corresponding target background image comprises:
adjusting the transparency and the brightness of the target smoke image according to the image brightness and the weather condition corresponding to the target background image;
and inserting the target smoke image with the transparency and the brightness adjusted into the corresponding target background image.
3. The method according to claim 2, wherein the adjusting the transparency and brightness of the target smoke image according to the image brightness and weather conditions corresponding to the target background image comprises:
determining a corresponding brightness adjusting range and a corresponding transparency adjusting range according to the image brightness and the weather condition corresponding to the target background image;
randomly adjusting the brightness of the target smoke image within the brightness adjustment range;
and randomly adjusting the transparency of the target smoke image within the transparency adjustment range.
4. The method of claim 1, wherein said inserting said target smoke image into said corresponding target background image comprises:
adjusting the size of the target smoke image according to the depth of field corresponding to the target background image;
inserting the target smoke image after the size is adjusted into the target background image.
5. The method of claim 4, wherein said inserting the resized target smoke image into the target background image comprises:
and inserting the target smoke image with the adjusted size into a preset area in the target background image.
6. The method of claim 1, wherein the obtaining a plurality of initial background images at different brightness and different weather conditions comprises:
acquiring videos shot by a camera under different brightness and different weather conditions at different shooting angles;
and extracting the initial background images from the video.
7. The method of claim 1, further comprising:
and carrying out fire detection model training through the training sample.
8. A training sample preparation device for a fire detection model is characterized by comprising:
the acquisition module is used for acquiring a plurality of initial background images under different brightness and different weather conditions;
the synthesis module is used for synthesizing a plurality of initial smoke images through fluid simulation software;
the determining module is used for traversing the initial background images and the initial smoke images and randomly determining a target smoke image and a target background image corresponding to the target smoke image;
the inserting module is used for inserting the target smoke image into the corresponding target background image to obtain a training sample for training a fire detection model;
wherein the target smoke image is one or more of the plurality of initial smoke images, and the target background image is one or more of the plurality of initial background images.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the bus;
a memory for storing a computer program;
the processor is used for executing the program stored in the memory and realizing the following processes:
acquiring a plurality of initial background images under different brightness and different weather conditions;
synthesizing a plurality of initial smoke images through fluid simulation software;
traversing the initial background images and the initial smoke images, and randomly determining a target smoke image and a target background image corresponding to the target smoke image;
inserting the target smoke image into the corresponding target background image to obtain a training sample for training a fire detection model;
wherein the target smoke image is one or more of the plurality of initial smoke images, and the target background image is one or more of the plurality of initial background images.
10. A computer-readable storage medium, in which a computer program is stored, which computer program, when being executed by a processor, carries out the following procedure:
acquiring a plurality of initial background images under different brightness and different weather conditions;
synthesizing a plurality of initial smoke images through fluid simulation software;
traversing the initial background images and the initial smoke images, and randomly determining a target smoke image and a target background image corresponding to the target smoke image;
inserting the target smoke image into the corresponding target background image to obtain a training sample for training a fire detection model;
wherein the target smoke image is one or more of the plurality of initial smoke images, and the target background image is one or more of the plurality of initial background images.
CN202110694190.1A 2021-06-22 2021-06-22 Method, device, equipment and medium for manufacturing training sample of fire detection model Pending CN113378953A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110694190.1A CN113378953A (en) 2021-06-22 2021-06-22 Method, device, equipment and medium for manufacturing training sample of fire detection model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110694190.1A CN113378953A (en) 2021-06-22 2021-06-22 Method, device, equipment and medium for manufacturing training sample of fire detection model

Publications (1)

Publication Number Publication Date
CN113378953A true CN113378953A (en) 2021-09-10

Family

ID=77578427

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110694190.1A Pending CN113378953A (en) 2021-06-22 2021-06-22 Method, device, equipment and medium for manufacturing training sample of fire detection model

Country Status (1)

Country Link
CN (1) CN113378953A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115034962A (en) * 2022-08-11 2022-09-09 中科开创(广州)智能科技发展有限公司 Channel visualization training data synthesis method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018004825A (en) * 2016-06-29 2018-01-11 国立大学法人京都工芸繊維大学 Virtual reality type fire fighting training system, fire disaster simulator for fire fighting training, fire disaster simulation method for fire fighting training, and program
CN110991242A (en) * 2019-11-01 2020-04-10 武汉纺织大学 Deep learning smoke identification method for negative sample excavation
CN111814635A (en) * 2020-06-30 2020-10-23 神思电子技术股份有限公司 Smoke and fire identification model establishing method and smoke and fire identification method based on deep learning
CN112149532A (en) * 2020-09-09 2020-12-29 温州大学 Smoke detection method and system based on foreground and background analysis and electronic equipment
CN112529022A (en) * 2019-08-28 2021-03-19 杭州海康威视数字技术股份有限公司 Training sample generation method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018004825A (en) * 2016-06-29 2018-01-11 国立大学法人京都工芸繊維大学 Virtual reality type fire fighting training system, fire disaster simulator for fire fighting training, fire disaster simulation method for fire fighting training, and program
CN112529022A (en) * 2019-08-28 2021-03-19 杭州海康威视数字技术股份有限公司 Training sample generation method and device
CN110991242A (en) * 2019-11-01 2020-04-10 武汉纺织大学 Deep learning smoke identification method for negative sample excavation
CN111814635A (en) * 2020-06-30 2020-10-23 神思电子技术股份有限公司 Smoke and fire identification model establishing method and smoke and fire identification method based on deep learning
CN112149532A (en) * 2020-09-09 2020-12-29 温州大学 Smoke detection method and system based on foreground and background analysis and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115034962A (en) * 2022-08-11 2022-09-09 中科开创(广州)智能科技发展有限公司 Channel visualization training data synthesis method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109190539B (en) Face recognition method and device
US11481574B2 (en) Image processing method and device, and storage medium
CN110276767B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN109086734B (en) Method and device for positioning pupil image in human eye image
US11210541B2 (en) Liveness detection method, apparatus and computer-readable storage medium
CN110731078B (en) Exposure time calculation method, device and storage medium
CN109040594B (en) Photographing method and device
CN104601876B (en) Method and device for detecting passerby
CN105430247A (en) Method and device for taking photograph by using image pickup device
CN110705532B (en) Method, device and equipment for identifying copied image
CN112200851B (en) Point cloud-based target detection method and device and electronic equipment thereof
CN112017137A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN113228622A (en) Image acquisition method, image acquisition device and storage medium
CN111405185B (en) Zoom control method and device for camera, electronic equipment and storage medium
CN113378953A (en) Method, device, equipment and medium for manufacturing training sample of fire detection model
CN111272388A (en) Method and device for detecting camera flash lamp
CN110737795A (en) Photo album cover determining method, device, equipment and storage medium
CN110689007B (en) Subject recognition method and device, electronic equipment and computer-readable storage medium
CN109145821B (en) Method and device for positioning pupil image in human eye image
CN112215069A (en) Method, device and equipment for detecting living body and assisting living body detection
CN113312949A (en) Video data processing method, video data processing device and electronic equipment
CN105791689A (en) Image processing method and image processing device
CN113379999B (en) Fire detection method, device, electronic equipment and storage medium
CN111386699A (en) Digital ledger camera and image functionality
CN111476132A (en) Video scene recognition method and device, electronic equipment and storage medium

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