CN116630743A - Deep learning-based weather image recognition method, device, equipment and medium - Google Patents

Deep learning-based weather image recognition method, device, equipment and medium Download PDF

Info

Publication number
CN116630743A
CN116630743A CN202310546116.4A CN202310546116A CN116630743A CN 116630743 A CN116630743 A CN 116630743A CN 202310546116 A CN202310546116 A CN 202310546116A CN 116630743 A CN116630743 A CN 116630743A
Authority
CN
China
Prior art keywords
weather
identification model
image
data set
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
CN202310546116.4A
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.)
Wuhan Polytechnic University
Original Assignee
Wuhan Polytechnic University
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 Wuhan Polytechnic University filed Critical Wuhan Polytechnic University
Priority to CN202310546116.4A priority Critical patent/CN116630743A/en
Publication of CN116630743A publication Critical patent/CN116630743A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • G06V10/765Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects using rules for classification or partitioning the feature space
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The invention belongs to the technical field of image recognition, and discloses a weather image recognition method, device, equipment and medium based on deep learning. The method comprises the following steps: pre-training the initial weather identification model by using a source data set to obtain a first weather identification model; migrating the weight parameters of the first weather identification model to an untrained initial weather identification model to obtain a target weather identification model; constructing a weather image dataset; training the target weather identification model by using the weather image data set to obtain a second weather identification model; and inputting the current weather image into the second weather identification model, and identifying the weather category of the current weather image. By the method, the weather condition can be quickly and accurately identified.

Description

Deep learning-based weather image recognition method, device, equipment and medium
Technical Field
The present invention relates to the field of image recognition technologies, and in particular, to a weather image recognition method, apparatus, device, and medium based on deep learning.
Background
Weather refers to the specific state of the atmosphere in a region closer to the surface of the earth in a short time. The weather phenomenon refers to various natural phenomena occurring in the atmosphere, namely, the comprehensive manifestation of the spatial distribution of various meteorological elements (such as air temperature, air pressure, humidity, wind, cloud, fog, rain, flash, snow, frost, thunder, hail, haze, etc.) in the atmosphere in a certain moment.
At present, the technology of weather identification mainly relies on manual observation, but the workload of weather identification through manpower is huge, and because the manual standards are not uniform, the identification efficiency is low, and the identification accuracy is very low.
Disclosure of Invention
The invention mainly aims to provide a weather image recognition method, device, equipment and medium based on deep learning, which aim to solve the technical problems of low recognition efficiency and low recognition accuracy caused by weather recognition by means of manual observation in the prior art.
In order to achieve the above object, the present invention provides a weather image recognition method based on deep learning, the method comprising the steps of:
pre-training the initial weather identification model by using a source data set to obtain a first weather identification model;
migrating the weight parameters of the first weather identification model to an untrained initial weather identification model to obtain a target weather identification model;
constructing a weather image dataset;
training the target weather identification model by using the weather image data set to obtain a second weather identification model;
and inputting the current weather image into the second weather identification model, and identifying the weather category of the current weather image.
Optionally, before the initial weather identification model is pre-trained by using the source data set to obtain the first weather identification model, the method further includes:
determining the category number of weather categories according to the fine granularity distinction of weather;
and adjusting the number of the fully connected layers of the initial weather identification model according to the category number.
Optionally, the initial weather identification model includes an input layer, a convolution layer, an expansion layer, a separable convolution layer, a global average layer, a max pooling layer, a fully connected layer, and an output layer connected in sequence.
Optionally, the initial weather identification model further comprises an attention mechanism comprising an SE module for adaptively adjusting channel weights in the initial weather identification model and an NL module for calculating a self-attention matrix of a feature image to enhance spatial context information of the current weather image.
Optionally, the constructing the weather image dataset includes:
determining a plurality of weather categories according to the fine granularity distinction of weather;
acquiring a plurality of weather images, and labeling the weather images according to the weather categories to obtain labeled weather images;
and constructing a weather image dataset based on the plurality of annotated weather images.
Optionally, the constructing a weather image dataset based on the plurality of annotated weather images includes:
constructing an initial weather image data set based on the plurality of marked weather images, and determining the number of marked weather images of each weather category in the initial weather image data set;
and carrying out data enhancement on the initial weather image data set based on the number of the marked weather images of each weather category to obtain the weather image data set, wherein the number of samples of each weather category in the weather image data set is in an equilibrium state.
Optionally, the data enhancement includes a roll-over transformation, a shift transformation, a rotation transformation, adding noise, and random clipping; the turning transformation is to sequentially perform vertical and horizontal turning operations on the marked weather image; the displacement transformation is to move the marked weather image by a certain number of pixel values along the X direction or the Y direction; the rotation is converted into the rotation of the weather-marked image at a preset angle; the noise adding points are used for adding Gaussian noise in the marked weather image; and the random clipping is to randomly clip out a small part of the area marked with the weather image.
In addition, in order to achieve the above object, the present invention also provides a weather image recognition device based on deep learning, the weather image recognition device based on deep learning includes:
the acquisition module is used for pre-training the initial weather identification model by using the source data set to obtain a first weather identification model;
the acquisition module is used for migrating the weight parameters of the first weather identification model into an untrained initial weather identification model to obtain a target weather identification model;
the construction module is used for constructing a weather image data set;
the acquisition module is used for training the target weather identification model by using the weather image data set to obtain a second weather identification model;
the identification module is used for inputting the current weather image into the second weather identification model and identifying the weather category of the current weather image.
In addition, to achieve the above object, the present invention also proposes a weather image recognition apparatus based on deep learning, the weather image recognition apparatus based on deep learning including: the system comprises a memory, a processor, and a deep learning based weather image recognition program stored on the memory and executable on the processor, the deep learning based weather image recognition program configured to implement the steps of the deep learning based weather image recognition method as described above.
In addition, in order to achieve the above object, the present invention also proposes a storage medium having stored thereon a weather image recognition program based on deep learning, which when executed by a processor, implements the steps of the weather image recognition method based on deep learning as described above.
According to the deep learning-based weather image recognition method, device, equipment and medium, the initial weather recognition model is pre-trained by using the source data set, so that a first weather recognition model is obtained; migrating the weight parameters of the first weather identification model to an untrained initial weather identification model to obtain a target weather identification model; constructing a weather image dataset; training the target weather identification model by using the weather image data set to obtain a second weather identification model; and inputting the current weather image into the second weather identification model, and identifying the weather category of the current weather image. Through the method, the initial weather identification model is trained by using the source data set to obtain the first weather identification model, and then partial model parameters of the first weather identification model are migrated to the untrained initial weather identification model, so that the influence on the training effect of the model due to the insufficient number of images in the weather image data set can be avoided, and the classification accuracy and generalization capability of the model are effectively improved.
Drawings
FIG. 1 is a schematic diagram of a deep learning-based weather image recognition device of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a first embodiment of a weather image recognition method based on deep learning according to the present invention;
FIG. 3 is a schematic flow chart of training a network model and using the network model in a first embodiment of a weather image recognition method based on deep learning according to the present invention;
FIG. 4 is a schematic flow chart of a weather image recognition method based on deep learning according to a second embodiment of the present invention;
fig. 5 is a block diagram of a weather image recognition apparatus based on deep learning according to a first embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a weather image recognition device based on deep learning of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 1, the deep learning-based weather image recognition apparatus may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) Memory or a stable nonvolatile Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the structure shown in fig. 1 does not constitute a limitation of the deep learning based weather image recognition device, and may include more or fewer components than illustrated, or may combine certain components, or may be a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a weather image recognition program based on deep learning may be included in the memory 1005 as one storage medium.
In the weather image recognition device based on deep learning shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the deep learning-based weather image recognition apparatus of the present invention may be disposed in the deep learning-based weather image recognition apparatus, which invokes the deep learning-based weather image recognition program stored in the memory 1005 through the processor 1001 and performs the deep learning-based weather image recognition method provided by the embodiment of the present invention.
Based on the hardware structure, the embodiment of the weather image recognition method based on deep learning is provided.
Referring to fig. 2, fig. 2 is a schematic flow chart of a weather image recognition method based on deep learning according to a first embodiment of the present invention.
In this embodiment, the weather image recognition method based on deep learning includes the following steps:
step S10: and pre-training the initial weather identification model by using the source data set to obtain a first weather identification model.
It should be noted that, the execution body of the embodiment may be a computing service device with functions of data processing, network communication and program running, such as a mobile phone, a tablet computer, a personal computer, or an electronic device or a weather image recognition device based on deep learning, which can implement the above functions. The present embodiment and the following embodiments will be described below by taking the weather image recognition apparatus based on deep learning as an example.
It should be noted that the source dataset may be an ImageNet image dataset; the initial weather identification model uses a MobileNet V3 network model, and MobileNet V3 is a lightweight convolutional neural network model, and is mainly applied to scenes with limited resources such as mobile equipment and embedded systems.
It will be appreciated that although the ImageNet image dataset is not weather image recognition, the ImageNet image dataset can be used to make preliminary adjustments and training of the model, and then migrate model parameters of the preliminary trained model to the untrained model, so that the model can be trained to a satisfactory effect in a short time without significant computational support.
In an embodiment, the pre-training the initial weather identification model using the source data set further includes, before obtaining the first weather identification model:
determining the category number of weather categories according to the fine granularity distinction of weather;
and adjusting the number of the fully connected layers of the initial weather identification model according to the category number.
It will be appreciated that the number of fully connected layers of the network model should be consistent with the number of weather categories to ensure that the model is able to implement classification of weather images for each weather category.
In one embodiment, the initial weather identification model includes an input layer, a convolution layer, an expansion layer, a separable convolution layer, a global average layer, a max pooling layer, a fully connected layer, and an output layer that are connected in sequence.
It should be noted that, the method of optimizing the convolution operation and reusing the features of the image can reduce the parameters and the calculation amount of the model while maintaining the higher accuracy of the model.
In an embodiment, the initial weather identification model further comprises an attention mechanism comprising an SE module for adaptively adjusting channel weights in the initial weather identification model and an NL module for calculating a self-attention matrix of feature images to enhance spatial context information of the current weather image.
It should be noted that, the SE module (squeze-and-Excitation Module) compresses the number of channels of the feature image, then performs weight learning on each channel by using the full connection layer, finally generates a channel weight vector, and then adaptively adjusts the weight of each channel by using the channel weight vector, thereby increasing the weight of important channels and reducing the weight of unimportant channels.
It should be noted that, the NL Module (Non-Local Module) calculates the similarity between different regions in the feature image, so as to determine information interaction and influence between the different regions. The NL module can effectively enhance the spatial context information of the image, so that the accuracy and generalization capability of the model are improved. The module is implemented by computing a self-attention matrix of the global feature image.
In this embodiment, an attention mechanism is added to the model, the weights of all channels in the model are adaptively adjusted by an SE module in the attention mechanism (i.e., the weights of important features in the image are adaptively improved by the attention mechanism), and then the spatial context information of the image is enhanced by an NL module, so that the accuracy and generalization capability of the model can be effectively improved.
Step S20: and migrating the weight parameters of the first weather identification model to an untrained initial weather identification model to obtain a target weather identification model.
It is understood that the weight parameters of the first atmospheric identification model refer to weight parameters of other layers in the model than the fully connected layer.
Step S30: a weather image dataset is constructed.
When the weather image data set is constructed, firstly collecting and sorting the fine-granularity image data set of the disaster weather, selecting three disaster weather types of snow weather, rain weather and fog weather, and then respectively re-labeling to finally obtain the fine-granularity image data set of the snow weather: big snow and small snow; fine-grained image dataset in rainy days: heavy rain and light rain; fine-grained image dataset for foggy days: large fog and small fog.
Step S40: and training the target weather identification model by using the weather image data set to obtain a second weather identification model.
It will be appreciated that the model architecture of the initial weather identification model, the first weather identification model, the second weather identification model, and the target identification model are identical, except that the parameter weights are not identical.
Step S50: and inputting the current weather image into the second weather identification model, and identifying the weather category of the current weather image.
In a specific implementation, as shown in fig. 3, the second weather identification model is an identification model, and the weather category corresponding to the current weather image can be identified by inputting the current weather image into the second weather identification model.
The method comprises the steps that an initial weather identification model is pre-trained by using a source data set, so that a first weather identification model is obtained; migrating the weight parameters of the first weather identification model to an untrained initial weather identification model to obtain a target weather identification model; constructing a weather image dataset; training the target weather identification model by using the weather image data set to obtain a second weather identification model; and inputting the current weather image into the second weather identification model, and identifying the weather category of the current weather image. Through the method, the initial weather identification model is trained by using the source data set to obtain the first weather identification model, and then partial model parameters of the first weather identification model are migrated to the untrained initial weather identification model, so that the influence on the training effect of the model due to the insufficient number of images in the weather image data set can be avoided, and the classification accuracy and generalization capability of the model are effectively improved.
Referring to fig. 4, fig. 4 is a flowchart of a weather image recognition method based on deep learning according to a second embodiment of the present invention.
Based on the first embodiment, the constructing a weather image dataset according to the weather image recognition method based on deep learning of the present embodiment includes:
step S301: a plurality of weather categories are determined based on the fine-grained differentiation of weather.
The weather may be classified into heavy rain, light rain, heavy snow, light snow, heavy fog, light, sunny days, and cloudy days according to the fine granularity of the weather.
Step S302: and acquiring a plurality of weather images, and labeling the weather images according to the weather categories to obtain labeled weather images.
It is understood that annotating a weather image refers to annotating a weather image of a weather category.
Step S303: and constructing a weather image dataset based on the plurality of annotated weather images.
In an embodiment, the constructing a weather image dataset based on the plurality of annotated weather images includes:
constructing an initial weather image data set based on the plurality of marked weather images, and determining the number of marked weather images of each weather category in the initial weather image data set;
and carrying out data enhancement on the initial weather image data set based on the number of the marked weather images of each weather category to obtain the weather image data set, wherein the number of samples of each weather category in the weather image data set is in an equilibrium state.
In this embodiment, the data set is enhanced to ensure that the number of samples of each weather category in the data set for training the target recognition model is balanced, so as to ensure that the effect of the second weather recognition model obtained by final training is more accurate.
In one embodiment, the data enhancement includes a roll-over transform, a shift transform, a rotation transform, adding noise, and random clipping; the turning transformation is to sequentially perform vertical and horizontal turning operations on the marked weather image; the displacement transformation is to move the marked weather image by a certain number of pixel values along the X direction or the Y direction; the rotation is converted into the rotation of the weather-marked image at a preset angle; the noise adding points are used for adding Gaussian noise in the marked weather image; and the random clipping is to randomly clip out a small part of the area marked with the weather image.
It should be noted that, the inversion is the easiest method of data enhancement, and performing the vertical inversion operation on the image is equivalent to performing the 180-degree rotation on the image first, and then performing the horizontal inversion operation; displacement transformation is typically the shifting of an image by a certain number of pixel values in either the X-direction or the Y-direction and in both directions simultaneously; rotation transformation in the field of image processing, performing rotation transformation operation on an image is a common data enhancement method, and when the length and width dimensions of the image are consistent to be square, the image is rotated by 90 degrees to finally obtain the image with the same size as the original image; overfitting typically occurs when a neural network attempts to learn high frequency features that may not be useful. Gaussian noise with zero mean has data points in substantially all frequencies, thus effectively distorting the high frequency characteristics, and model learning ability can be enhanced by adding an appropriate amount of noise; random cropping, which extracts a small portion of the original image from the random cropping and resumes the same size as the original image, is called random cropping of the image.
The embodiment determines a plurality of weather categories by distinguishing according to the fine granularity of weather; acquiring a plurality of weather images, and labeling the weather images according to the weather categories to obtain labeled weather images; and constructing a weather image dataset based on the plurality of annotated weather images. Through the mode, the weather image can be marked according to the actual situation, so that the second weather identification model is more accurate in identifying the category of the weather image.
In addition, the embodiment of the invention also provides a storage medium, wherein the storage medium is stored with a weather image recognition program based on deep learning, and the weather image recognition program based on deep learning realizes the steps of the weather image recognition method based on deep learning.
Referring to fig. 5, fig. 5 is a block diagram illustrating a weather image recognition apparatus based on deep learning according to a first embodiment of the present invention.
As shown in fig. 5, a weather image recognition device based on deep learning according to an embodiment of the present invention includes:
the acquisition module 10 is configured to pretrain the initial weather identification model by using the source data set, so as to obtain a first weather identification model.
The obtaining module 10 is configured to migrate the weight parameter of the first weather identification model to an untrained initial weather identification model, so as to obtain a target weather identification model.
A construction module 20 for constructing a weather image dataset.
The obtaining module 10 is configured to train the target weather identification model by using the weather image dataset to obtain a second weather identification model.
The identifying module 30 is configured to input a current weather image into the second weather identifying model, and identify a weather category of the current weather image.
It should be understood that the foregoing is illustrative only and is not limiting, and that in specific applications, those skilled in the art may set the invention as desired, and the invention is not limited thereto.
The method comprises the steps that an initial weather identification model is pre-trained by using a source data set, so that a first weather identification model is obtained; migrating the weight parameters of the first weather identification model to an untrained initial weather identification model to obtain a target weather identification model; constructing a weather image dataset; training the target weather identification model by using the weather image data set to obtain a second weather identification model; and inputting the current weather image into the second weather identification model, and identifying the weather category of the current weather image. Through the method, the initial weather identification model is trained by using the source data set to obtain the first weather identification model, and then partial model parameters of the first weather identification model are migrated to the untrained initial weather identification model, so that the influence on the training effect of the model due to the insufficient number of images in the weather image data set can be avoided, and the classification accuracy and generalization capability of the model are effectively improved.
In an embodiment, the obtaining module 10 is further configured to:
determining the category number of weather categories according to the fine granularity distinction of weather;
and adjusting the number of the fully connected layers of the initial weather identification model according to the category number.
In an embodiment, the obtaining module 10 is further configured to:
the initial weather identification model comprises an input layer, a convolution layer, an expansion layer, a separable convolution layer, a global average layer, a maximum pooling layer, a full connection layer and an output layer which are sequentially connected.
In an embodiment, the obtaining module 10 is further configured to:
the initial weather identification model also includes an attention mechanism including an SE module for adaptively adjusting channel weights in the initial weather identification model and an NL module for calculating a self-attention matrix of a feature image to enhance spatial context information of the current weather image.
In an embodiment, the construction module 20 is further configured to:
determining a plurality of weather categories according to the fine granularity distinction of weather;
acquiring a plurality of weather images, and labeling the weather images according to the weather categories to obtain labeled weather images;
and constructing a weather image dataset based on the plurality of annotated weather images.
In an embodiment, the construction module 20 is further configured to:
constructing an initial weather image data set based on the plurality of marked weather images, and determining the number of marked weather images of each weather category in the initial weather image data set;
and carrying out data enhancement on the initial weather image data set based on the number of the marked weather images of each weather category to obtain the weather image data set, wherein the number of samples of each weather category in the weather image data set is in an equilibrium state.
In an embodiment, the construction module 20 is further configured to:
the data enhancement comprises turnover transformation, displacement transformation, rotation transformation, noise addition and random clipping; the turning transformation is to sequentially perform vertical and horizontal turning operations on the marked weather image; the displacement transformation is to move the marked weather image by a certain number of pixel values along the X direction or the Y direction; the rotation is converted into the rotation of the weather-marked image at a preset angle; the noise adding points are used for adding Gaussian noise in the marked weather image; and the random clipping is to randomly clip out a small part of the area marked with the weather image.
It should be noted that the above-described working procedure is merely illustrative, and does not limit the scope of the present invention, and in practical application, a person skilled in the art may select part or all of them according to actual needs to achieve the purpose of the embodiment, which is not limited herein.
In addition, technical details which are not described in detail in the present embodiment may refer to the weather image recognition method based on deep learning provided in any embodiment of the present invention, and are not described herein.
Furthermore, 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, method, article, or system 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, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. Read Only Memory)/RAM, magnetic disk, optical disk) and including several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. The weather image recognition method based on the deep learning is characterized by comprising the following steps of:
pre-training the initial weather identification model by using a source data set to obtain a first weather identification model;
migrating the weight parameters of the first weather identification model to an untrained initial weather identification model to obtain a target weather identification model;
constructing a weather image dataset;
training the target weather identification model by using the weather image data set to obtain a second weather identification model;
and inputting the current weather image into the second weather identification model, and identifying the weather category of the current weather image.
2. The method of claim 1, wherein the pre-training the initial weather identification model using the source data set further comprises, prior to deriving the first weather identification model:
determining the category number of weather categories according to the fine granularity distinction of weather;
and adjusting the number of the fully connected layers of the initial weather identification model according to the category number.
3. The method of claim 1, wherein the initial weather identification model comprises an input layer, a convolution layer, an expansion layer, a separable convolution layer, a global average layer, a max pooling layer, a fully connected layer, and an output layer connected in sequence.
4. The method of claim 3, wherein the initial weather identification model further comprises an attention mechanism comprising an SE module for adaptively adjusting channel weights in the initial weather identification model and an NL module for calculating a self-attention matrix of feature images to enhance spatial context information of the current weather image.
5. The method of claim 1, wherein the constructing a weather image dataset comprises:
determining a plurality of weather categories according to the fine granularity distinction of weather;
acquiring a plurality of weather images, and labeling the weather images according to the weather categories to obtain labeled weather images;
and constructing a weather image dataset based on the plurality of annotated weather images.
6. The method of claim 5, wherein the constructing a weather image dataset based on the plurality of annotated weather images comprises:
constructing an initial weather image data set based on the plurality of marked weather images, and determining the number of marked weather images of each weather category in the initial weather image data set;
and carrying out data enhancement on the initial weather image data set based on the number of the marked weather images of each weather category to obtain the weather image data set, wherein the number of samples of each weather category in the weather image data set is in an equilibrium state.
7. The method of claim 6, wherein the data enhancement comprises a flip transform, a shift transform, a rotation transform, adding noise, and random clipping; the turning transformation is to sequentially perform vertical and horizontal turning operations on the marked weather image; the displacement transformation is to move the marked weather image by a certain number of pixel values along the X direction or the Y direction; the rotation is converted into the rotation of the weather-marked image at a preset angle; the noise adding points are used for adding Gaussian noise in the marked weather image; and the random clipping is to randomly clip out a small part of the area marked with the weather image.
8. A deep learning-based weather image recognition apparatus, the deep learning-based weather image recognition apparatus comprising:
the acquisition module is used for pre-training the initial weather identification model by using the source data set to obtain a first weather identification model;
the acquisition module is used for migrating the weight parameters of the first weather identification model into an untrained initial weather identification model to obtain a target weather identification model;
the construction module is used for constructing a weather image data set;
the acquisition module is used for training the target weather identification model by using the weather image data set to obtain a second weather identification model;
the identification module is used for inputting the current weather image into the second weather identification model and identifying the weather category of the current weather image.
9. A deep learning-based weather image recognition apparatus, the apparatus comprising: a memory, a processor, and a deep learning based weather image recognition program stored on the memory and executable on the processor, the deep learning based weather image recognition program configured to implement the steps of the deep learning based weather image recognition method of any one of claims 1 to 7.
10. A storage medium having stored thereon a deep learning based weather image recognition program which when executed by a processor implements the steps of the deep learning based weather image recognition method of any one of claims 1 to 7.
CN202310546116.4A 2023-05-15 2023-05-15 Deep learning-based weather image recognition method, device, equipment and medium Pending CN116630743A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310546116.4A CN116630743A (en) 2023-05-15 2023-05-15 Deep learning-based weather image recognition method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310546116.4A CN116630743A (en) 2023-05-15 2023-05-15 Deep learning-based weather image recognition method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN116630743A true CN116630743A (en) 2023-08-22

Family

ID=87601878

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310546116.4A Pending CN116630743A (en) 2023-05-15 2023-05-15 Deep learning-based weather image recognition method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN116630743A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117092723A (en) * 2023-08-23 2023-11-21 辽宁石油化工大学 Meteorological intelligent identification equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117092723A (en) * 2023-08-23 2023-11-21 辽宁石油化工大学 Meteorological intelligent identification equipment
CN117092723B (en) * 2023-08-23 2024-04-12 辽宁石油化工大学 Meteorological intelligent identification equipment

Similar Documents

Publication Publication Date Title
CN109903304B (en) Automatic building contour extraction algorithm based on convolutional neural network and polygon regularization
CN108961235B (en) Defective insulator identification method based on YOLOv3 network and particle filter algorithm
CN110929577A (en) Improved target identification method based on YOLOv3 lightweight framework
CN109785298B (en) Multi-angle object detection method and system
CN112115783A (en) Human face characteristic point detection method, device and equipment based on deep knowledge migration
CN111640125A (en) Mask R-CNN-based aerial photograph building detection and segmentation method and device
CN111126359A (en) High-definition image small target detection method based on self-encoder and YOLO algorithm
CN111582339B (en) Vehicle detection and recognition method based on deep learning
CN112381299A (en) Method and device for determining air quality
CN112800915A (en) Building change detection method, building change detection device, electronic device, and storage medium
CN112434618A (en) Video target detection method based on sparse foreground prior, storage medium and equipment
CN111353396A (en) Concrete crack segmentation method based on SCSEOCUnet
CN116630743A (en) Deep learning-based weather image recognition method, device, equipment and medium
CN112766170B (en) Self-adaptive segmentation detection method and device based on cluster unmanned aerial vehicle image
CN115049841A (en) Depth unsupervised multistep anti-domain self-adaptive high-resolution SAR image surface feature extraction method
CN114782355B (en) Gastric cancer digital pathological section detection method based on improved VGG16 network
CN116091946A (en) Yolov 5-based unmanned aerial vehicle aerial image target detection method
CN113963333A (en) Traffic sign board detection method based on improved YOLOF model
CN113628180A (en) Semantic segmentation network-based remote sensing building detection method and system
CN117496426A (en) Precast beam procedure identification method and device based on mutual learning
CN110929726B (en) Railway contact network support number plate identification method and system
CN113361384A (en) Face recognition model compression method, device, medium, and computer program product
CN113034511A (en) Rural building identification algorithm based on high-resolution remote sensing image and deep learning
CN112597875A (en) Multi-branch network anti-missing detection aerial photography target detection method
CN116777929A (en) Night scene image semantic segmentation method, device and computer 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