[go: up one dir, main page]

CN115601657A - A method for ship target detection and recognition in bad weather - Google Patents

A method for ship target detection and recognition in bad weather Download PDF

Info

Publication number
CN115601657A
CN115601657A CN202211270809.7A CN202211270809A CN115601657A CN 115601657 A CN115601657 A CN 115601657A CN 202211270809 A CN202211270809 A CN 202211270809A CN 115601657 A CN115601657 A CN 115601657A
Authority
CN
China
Prior art keywords
model
branch
defogging
detection
image
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
CN202211270809.7A
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.)
Beijing Institute of Technology BIT
Original Assignee
Beijing Institute of Technology BIT
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 Beijing Institute of Technology BIT filed Critical Beijing Institute of Technology BIT
Priority to CN202211270809.7A priority Critical patent/CN115601657A/en
Publication of CN115601657A publication Critical patent/CN115601657A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • G06V20/13Satellite images
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/42Global feature extraction by analysis of the whole pattern, e.g. using frequency domain transformations or autocorrelation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/806Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of extracted features
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Astronomy & Astrophysics (AREA)
  • Remote Sensing (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the fields of image defogging, target detection and the like, and provides a method applied to ship target detection and identification in severe weather, aiming at the problems of difficult ship detection, low precision and the like in severe weather. The method comprises two stages: firstly, converting a fog image into a clear fog-free image through a defogging model; secondly, an improved detection network is used for carrying out target detection tasks on the processed clear input, and interesting ship targets are identified and positioned. The defogging model consists of a CNN branch, a transformer branch and a fusion branch. The CNN branch is responsible for local feature extraction, the transformer branch is used for long-distance global feature dependence, and the fusion branch realizes feature adaptive mode fusion. The detection model is based on an original YOLOV5 framework, and a multi-branch convolution structure is used for replacing an original feature extraction module, so that the detection performance is improved. The method can solve the problems of low detection precision and the like of the ship target in severe weather, and has higher practical value.

Description

一种应用于恶劣天气下舰船目标检测与识别的方法A Method for Ship Target Detection and Recognition in Bad Weather

技术领域technical field

本发明主要涉及智能图像处理、深度学习、目标检测等技术领域,结合图 像去雾与目标检测模型,提出了一种应用于恶劣天气下舰船目标检测与识别的 方法。The present invention mainly relates to technical fields such as intelligent image processing, deep learning, and target detection. Combining image defogging and target detection models, a method for ship target detection and recognition in severe weather is proposed.

背景技术Background technique

目标检测技术是计算机视觉领域中重要的分支之一,逐渐成为各个高校、 科研院所关注的重点研究问题。近年来,基于单阶段、双阶段策略的目标检测 算法层出不穷,并取得了优异的检测效果,有效的应用于边境安防、人群分析、 车流估计等军民用领域。具体来说,现有的目标检测技术主要将清晰干净的图 像作为目标输入,即输入检测网络的图像都是未受到噪声干扰,保证具有较高 的图像质量。然而,由于复杂、恶劣的天气条件影响,在舰船目标检测识别过 程中,获取的遥感图像很容易受云、雾霾等汽状物遮挡干扰,很大程度影响了 图像的质量,从而对后续检测任务造成误检、漏检等问题。因此,如何提升在 恶劣天气下舰船目标检测效果,提升检测算法对恶劣天气条件的抗干扰能力, 成为亟需解决的一个重点问题。Object detection technology is one of the important branches in the field of computer vision, and it has gradually become a key research issue of various universities and research institutes. In recent years, target detection algorithms based on single-stage and two-stage strategies have emerged in an endless stream, and have achieved excellent detection results, which are effectively used in military and civilian fields such as border security, crowd analysis, and traffic flow estimation. Specifically, the existing target detection technology mainly uses clear and clean images as the target input, that is, the images input to the detection network are not disturbed by noise, which ensures high image quality. However, due to complex and harsh weather conditions, during the ship target detection and recognition process, the acquired remote sensing images are easily blocked by clouds, haze and other vapors, which greatly affects the quality of the image, thus affecting the follow-up The detection task causes problems such as false detection and missed detection. Therefore, how to improve the detection effect of ship targets in severe weather and improve the anti-interference ability of the detection algorithm to severe weather conditions has become a key problem that needs to be solved urgently.

发明内容Contents of the invention

为满足目标检测算法在雾天的需求,解决由于云雾遮挡造成的检测率低、 漏检率高等问题,实现更好的舰船目标检测性能。本发明提供了一种应用于恶 劣天气下舰船目标检测与识别的方法。In order to meet the needs of the target detection algorithm in foggy days, solve the problems of low detection rate and high missed detection rate caused by cloud and fog occlusion, and achieve better ship target detection performance. The invention provides a method for ship target detection and recognition in bad weather.

一种应用于恶劣天气下舰船目标检测与识别的方法,包括:第一阶段,将 所得到的雾化遥感图像进行清晰化处理,即通过一个去雾模型将雾化图像转化 为清晰无雾图像;第二阶段,将所得到的清晰图像作为检测网络的图像输入, 即利用一个改进型的检测网络对处理后的清晰输入进行目标检测任务,识别定 位感兴趣的舰船目标。A method for ship target detection and recognition in severe weather, including: in the first stage, the obtained fogged remote sensing image is cleared, that is, the fogged image is converted into a clear and fog-free image by a dehazing model Image; in the second stage, the obtained clear image is used as the image input of the detection network, that is, an improved detection network is used to perform target detection tasks on the processed clear input to identify and locate the ship target of interest.

所描述的第一阶段包括:基于大气散射模型的雾化-清晰数据集构建、建立 结合CNN与transformer结构的去雾模型、全局特征与局部特征融合模块的设计; 用于实现雾化图像的去雾处理。The first stage described includes: the construction of fog-clear data set based on the atmospheric scattering model, the establishment of the dehazing model combined with CNN and transformer structure, the design of global feature and local feature fusion module; used to realize the defog image fog treatment.

所描述的第二阶段包括:遥感舰船数据的采集与标注、利用改进型YOLOv5 进行舰船目标检测任务、检测模型的训练及测试部署。The second stage described includes: the collection and labeling of remote sensing ship data, the use of improved YOLOv5 for ship target detection tasks, the training and test deployment of the detection model.

此外,第一阶段去雾模型与第二阶段的检测模型采用级联端到端同时训练 的模式,即把损失函数进行组合相加以此来优化整体模型。具体来说,模型总 损失函数如下所示:In addition, the dehazing model in the first stage and the detection model in the second stage adopt the mode of cascading end-to-end simultaneous training, that is, the loss function is combined and added to optimize the overall model. Specifically, the model total loss function is as follows:

Ltotal=Lh+Ld (1.1)L total =L h +L d (1.1)

其中,Ltotal表示模型总损失函数;Lh表示为去雾模型的损失函数;Ld表示为 目标检测模型的损失函数。Among them, L total represents the total loss function of the model; L h represents the loss function of the dehazing model; L d represents the loss function of the target detection model.

本发明所采用的技术方案是,一种应用于恶劣天气下舰船目标检测与识别 的方法,具体按照以下步骤实施:The technical scheme adopted in the present invention is, a kind of method that is applied to ship target detection and recognition under bad weather, specifically implements according to the following steps:

如上所示的第一阶段去雾模型:The first-stage dehazing model shown above:

步骤1:基于大气散射模型的雾化-清晰数据集构建。已有的去雾算法研究 中,常采用如下所示的大气散射模型,Step 1: Fog-clear dataset construction based on atmospheric scattering model. In the existing dehazing algorithm research, the atmospheric scattering model as shown below is often used,

I(x)=J(x)t(x)+A(1-t(x)) (1.2) 其中,I(x)表示雾化图像,J(x)表示清晰无雾图像,t(x)表示传输矩阵,A 表示大气散射系数。由参数分析可以得知:已知清晰的无雾图像,利用其深度 图,设置对应的大气散射系数与投射系数就能够仿真生成对应的雾化图像。因 此,将采集得到的遥感图像进行上式中的加雾处理,构建用于训练测试的雾化- 清晰遥感图像数据集。I(x)=J(x)t(x)+A(1-t(x)) (1.2) Among them, I(x) represents the fogged image, J(x) represents the clear and fog-free image, t(x ) represents the transmission matrix, and A represents the atmospheric scattering coefficient. From the parameter analysis, it can be known that the clear fog-free image is known, and the corresponding fogged image can be simulated and generated by setting the corresponding atmospheric scattering coefficient and projection coefficient by using its depth map. Therefore, the collected remote sensing images are subjected to the fogging process in the above formula to construct a fogged-clear remote sensing image data set for training and testing.

步骤2:建立结合CNN与Transformer结构的去雾模型。得益于卷积神经网 络CNN的局部特征感知能力,使其有效的应用于各类图像恢复任务。然而,CNN 结构缺乏捕获长距离的依赖关系,现有的方法主要通过加大网络的层数来缓解 这一问题,但是这一简单朴素的想法很容易导致网络冗余,丢失更多局部细节 信息。Transformer的提出能够很好地解决这一问题,通过自注意力机制很好地 描述了特征全局依赖关系。因此,所提出的去雾模型由CNN分支与Transformer 分支所构成,充分利用各自结构的优点,得到更优异的去雾效果。此外,利用 融合分支,将所得到的特征进行叠加融合,以实现更强的特征表示能力。Step 2: Establish a dehazing model that combines CNN and Transformer structures. Thanks to the local feature perception ability of the convolutional neural network CNN, it can be effectively applied to various image restoration tasks. However, the CNN structure lacks the ability to capture long-distance dependencies. Existing methods mainly alleviate this problem by increasing the number of layers of the network, but this simple idea can easily lead to network redundancy and loss of more local details. . The proposal of Transformer can solve this problem very well, and the global dependence of features is well described through the self-attention mechanism. Therefore, the proposed defogging model is composed of CNN branch and Transformer branch, making full use of the advantages of their respective structures to obtain a better defogging effect. In addition, using the fusion branch, the obtained features are superimposed and fused to achieve stronger feature representation capabilities.

步骤3:全局特征与局部特征融合模块的设计。在特征融合过程中,同时利 用CNN和Transformer结构提取的有效特征,使得融合的特征更加紧凑、网络 表达能力更强。具体操作包括有通道注意力模块、空间注意力模块、常规卷积 操作、残差连接等。Step 3: Design of global feature and local feature fusion module. In the process of feature fusion, the effective features extracted by CNN and Transformer structures are used at the same time, which makes the fused features more compact and the network expression ability stronger. Specific operations include channel attention module, spatial attention module, conventional convolution operation, residual connection, etc.

如上所示的第二阶段目标检测模型:The second-stage object detection model shown above:

步骤1:遥感舰船数据的采集与标注。首先,在卫星地图上截取包含舰船目 标的遥感图像,获取原始图像数据。其次,利用标注工具对采集得到的图像数 据中的舰船目标进行标注,得到对应的图像特征。最后,将图像与标注得到的 目标位置信息一一对应,建立遥感舰船目标数据集;Step 1: Collection and labeling of remote sensing ship data. First, capture the remote sensing image containing the ship target on the satellite map to obtain the original image data. Secondly, use the labeling tool to mark the ship target in the collected image data to get the corresponding image features. Finally, one-to-one correspondence between the image and the marked target position information is established to establish a remote sensing ship target data set;

步骤2:利用改进型YOLOv5进行舰船目标检测任务。为了满足算法后续 部署机载硬件的需求,对原始YOLOv5特征骨干提取网络进行简化设计调整。 其中,基于拓扑结构范式,利用多分支卷积结构替换原始的特征提取模块。同 时,对整体骨干网络的算子进行调整,以实现在硬件上高效推理的同时,保持 高效的多尺度特征融合能力;Step 2: Use the improved YOLOv5 for the ship target detection task. In order to meet the requirements of the algorithm's subsequent deployment of airborne hardware, the original YOLOv5 feature backbone extraction network is simplified and adjusted. Among them, based on the topology paradigm, the original feature extraction module is replaced by a multi-branch convolution structure. At the same time, the operators of the overall backbone network are adjusted to achieve efficient reasoning on hardware while maintaining efficient multi-scale feature fusion capabilities;

步骤3:检测模型的训练及测试部署。利用标注好舰船数据集对检测模型进 行训练,在完成模型训练之后,获得相应的训练权重。为了加速模型的推理速 度,进行TensorRT配置操作。其中,TensorRT可以被视为一个只有前向传播推 理的深度学习框架,框架可以将Caffe,TensorFlow的网络模型解析,然后与 TensorRT中对应的层进行一一映射,把其他框架的模型统一转换到TensorRT 中,从而进行部署加速。Step 3: Detection model training and test deployment. Use the marked ship data set to train the detection model, and obtain the corresponding training weight after the model training is completed. To speed up the inference speed of the model, perform the TensorRT configuration operation. Among them, TensorRT can be regarded as a deep learning framework with only forward propagation reasoning. The framework can analyze the network model of Caffe and TensorFlow, and then perform one-to-one mapping with the corresponding layers in TensorRT, and uniformly convert the models of other frameworks to TensorRT. In order to accelerate the deployment.

本发明的特点还在于:The present invention is also characterized in that:

去雾模型和舰船目标检测模型采用联合训练模式。首先,利用高斯随机变 量对去雾子网络的权值进行初始化。其次,目标检测子网不做随机初始化权值 操作,而是将在COCO数据集上经过预训练得到的模型进行类别下采样微调, 实现权重初始化。最后,整体模型在所构建的数据集上进行端到端的训练,同 时学习图像去雾增强、舰船目标分类和定位目的。The dehazing model and the ship target detection model adopt a joint training mode. First, the weights of the dehazing sub-network are initialized with Gaussian random variables. Secondly, the target detection subnetwork does not perform random initialization of weights, but fine-tunes the model obtained through pre-training on the COCO dataset by downsampling to achieve weight initialization. Finally, the overall model is trained end-to-end on the constructed dataset, simultaneously learning image dehazing enhancement, ship object classification and localization purposes.

综上所述,本发明的主要贡献在于:In summary, the main contribution of the present invention is:

(1)本发明提供了一种应用于恶劣天气下舰船目标检测与识别的方法,级 联去雾模型与检测模型,雾化图像作为去雾模型的输入,将去雾模型的清晰输 出作为下一阶段检测模型的输入,输出得到舰船目标的类别定位结果。(1) The present invention provides a method for ship target detection and recognition in severe weather, cascading the defogging model and the detection model, the fogged image is used as the input of the defogging model, and the clear output of the defogging model is used as In the next stage, the input of the detection model is output, and the category positioning result of the ship target is obtained as an output.

(2)本发明提供了一种应用于恶劣天气下舰船目标检测与识别的方法,采 用的去雾模型由CNN和Transformer结构组合合成,其中包含有三个分支:CNN 分支,Transformer分支与融合分支。充分融合利用CNN和Transformer的结构 特性,以实现更优异的去雾效果。(2) The present invention provides a method for ship target detection and recognition in bad weather. The dehazing model used is composed of CNN and Transformer structures, which includes three branches: CNN branch, Transformer branch and fusion branch . Fully integrate and utilize the structural characteristics of CNN and Transformer to achieve better defogging effect.

(3)本发明提供了一种应用于恶劣天气下舰船目标检测与识别的方法,利 用拓扑结构范式对检测模型进行轻量化调整,减少网络内存,此外,将训练好 的模型进行TensorRT部署,加快模型在硬件上的推理速度。(3) The present invention provides a method for ship target detection and recognition in severe weather, using the topology paradigm to carry out lightweight adjustments to the detection model, reducing network memory, and deploying the trained model in TensorRT, Accelerate model inference on hardware.

附图说明Description of drawings

图1为本发明提出的恶劣天气下舰船目标检测与识别的方法结构示意图;Fig. 1 is a schematic structural diagram of a method for ship target detection and identification under bad weather proposed by the present invention;

图2为本发明提出的去雾方法模型整体结构示意图;Fig. 2 is a schematic diagram of the overall structure of the defogging method model proposed by the present invention;

图3为本发明提出的特征融合结构示意图;Fig. 3 is a schematic diagram of the feature fusion structure proposed by the present invention;

具体实施方式detailed description

下面结合附图和具体实施例对本发明进行详细说明。应指出的是,所描述 的实施例仅旨在便于对本发明的理解,而对其不起任何限定作用。附图均采用 非常简化的形式且均使用非精准的比例,仅用以方便、明晰地辅助说明本发明 实施例的目的,附图所展示的结构是实际结构的一部分。此外,下面所描述的 本发明各个实施方式中所涉及到的技术特征只要彼此之间未构成冲突就可以相 互组合。The present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be pointed out that the described embodiments are only intended to facilitate the understanding of the present invention, rather than limiting it in any way. The accompanying drawings all adopt very simplified forms and use inaccurate scales, and are only used to facilitate and clearly assist the purpose of illustrating the embodiments of the present invention, and the structures shown in the accompanying drawings are part of the actual structure. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not constitute a conflict with each other.

本发明提供了一种应用于恶劣天气下舰船目标检测与识别的方法,所提出 的方法整体模型如图1所示,它包含有两个阶段:第一阶段,将所得到的雾化 遥感图像进行清晰化处理,即通过一个去雾模型将雾化图像转化为清晰无雾图 像;第二阶段,将去雾模型所得到的清晰图像作为检测网络的图像输入,即利 用一个改进型的检测网络对处理后的清晰输入进行目标检测任务,识别定位感 兴趣的舰船目标。通过上述技术步骤,实现恶劣天气下舰船目标智能检测定位 的目的。The present invention provides a method for ship target detection and recognition in bad weather. The overall model of the proposed method is shown in Figure 1, which includes two stages: the first stage, the obtained atomized remote The image is cleared, that is, the fogged image is converted into a clear and fog-free image through a dehazing model; in the second stage, the clear image obtained by the dehazing model is used as the image input of the detection network, that is, an improved detection The network performs the target detection task on the processed clear input to identify and locate the ship target of interest. Through the above technical steps, the purpose of intelligent detection and positioning of ship targets in severe weather is realized.

雾化遥感图像去雾清晰化处理阶段,将雾化图像恢复为清晰的无雾图像。Fogged remote sensing image defogging and clearing processing stage, the fogged image is restored to a clear fog-free image.

对大气散射模型物理机制进行分析,以模拟仿真生成的方式构建用于训练 测试的雾化-清晰图像数据对。其中,主要包括原始遥感图像采集和雾化图像的 构建两个步骤。原始遥感图像采集:通过卫星遥感地图,截取获得感兴趣的遥 感图像,注意,图像尽量包含带有舰船目标,便于后续构建舰船目标检测数据 集。雾化图像的构建:将采集的遥感图像计算得出各自的深度图,设置相应的 大气散射系数与透过系数,基于大气散射模型,仿真计算得到对应的雾化图像。 为了更好地模拟现实雾霾场景,参数的设置尽量覆盖0~1区间,以满足不同浓 度雾霾的遥感图像的需求。The physical mechanism of the atmospheric scattering model is analyzed, and the fog-clear image data pairs used for training and testing are constructed in the form of simulation generation. Among them, it mainly includes two steps of original remote sensing image acquisition and fog image construction. Raw remote sensing image collection: through satellite remote sensing maps, intercept and obtain remote sensing images of interest. Note that the images contain ship targets as much as possible, which is convenient for subsequent construction of ship target detection data sets. Fog image construction: calculate the respective depth maps from the collected remote sensing images, set the corresponding atmospheric scattering coefficient and transmission coefficient, and based on the atmospheric scattering model, simulate and calculate the corresponding fog image. In order to better simulate the realistic haze scene, the parameter setting should cover the interval from 0 to 1 as much as possible to meet the needs of remote sensing images with different concentrations of haze.

构建去雾模型以实现图像去雾目的。所提出的去雾模型如图2所示,包含 有三个分支:CNN分支、transformer分支与融合分支。Build a dehazing model to achieve the purpose of image dehazing. The proposed dehazing model is shown in Figure 2, which includes three branches: CNN branch, transformer branch and fusion branch.

具体来说,在CNN分支中,通过堆叠N层常规残差模块以实现特征积累, 其中,每个残差模块前都带有一个下采样系数为2的池化层,用于减少特征的 尺寸。CNN所提取的特征表示主要是关于图像的局部特征,例如轮廓、边界等, 而不能够很好的感知其全局信息。因此,需要transformer分支对对特征进行加 强补充。Specifically, in the CNN branch, feature accumulation is achieved by stacking N layers of conventional residual modules, where each residual module is preceded by a pooling layer with a downsampling coefficient of 2 to reduce the size of the feature . The feature representation extracted by CNN is mainly about the local features of the image, such as contours, boundaries, etc., and cannot perceive its global information well. Therefore, the transformer branch is needed to strengthen and supplement the features.

具体来说,在transformer分支中,transformer结构遵循经典的编解码结构。 首先,在编码器中,将输入的图像

Figure BDA0003892514520000061
被划分为N个图像块,图像尺寸变 换为
Figure BDA0003892514520000062
S的大小设置为16。随后,将这些图像块进行拉伸并输入到一个 嵌入层中,输出得到一个嵌入向量
Figure BDA0003892514520000063
其中,D表示维度大小。为保证图 像的空间先验只是,加入一个可学习的位置编码向量,其大小与图像嵌入向量 保持一致,将两者结合作为编码器的共同输入。编码器由多头注意力模块与多 层感知器组成,其中,自注意力模块作为transformer的核心操作,可以表示为:Specifically, in the transformer branch, the transformer structure follows the classic codec structure. First, in the encoder, the input image is
Figure BDA0003892514520000061
is divided into N image blocks, and the image size is transformed into
Figure BDA0003892514520000062
The size of S is set to 16. Subsequently, these image patches are stretched and input into an embedding layer, which outputs an embedding vector
Figure BDA0003892514520000063
Among them, D represents the dimension size. In order to ensure the spatial prior of the image, a learnable position encoding vector is added, whose size is consistent with the image embedding vector, and the two are combined as the common input of the encoder. The encoder consists of a multi-head attention module and a multi-layer perceptron. The self-attention module is the core operation of the transformer, which can be expressed as:

Figure BDA0003892514520000071
Figure BDA0003892514520000071

此外,出去上述的操作之外,我们还加入了实例正则化操作。最后,获得了编 码器的输出

Figure BDA0003892514520000072
在解码器中,我们遵循时序的上采样方法,即逐渐提升特 征的尺寸大小。具体来说,首先将特征返回原始的尺寸大小
Figure BDA0003892514520000073
然后 使用上采样的卷积层依次提升特征的空间分辨率,最后将所获取得到特征按照 其尺寸大小传递给下阶段的融合模块。In addition, in addition to the above operations, we also added an instance regularization operation. Finally, the output of the encoder is obtained
Figure BDA0003892514520000072
In the decoder, we follow a temporal upsampling method, which gradually increases the size of the features. Specifically, first return the features to their original size
Figure BDA0003892514520000073
Then use the upsampled convolutional layer to sequentially increase the spatial resolution of the features, and finally pass the acquired features to the fusion module in the next stage according to their size.

具体来说,在融合分支中,具体的步骤如图3所示。两个特征分别来自于 CNN分支与transformer分支,用

Figure BDA0003892514520000074
Figure BDA0003892514520000075
依次表示这两个特 征流。其中,H,W,C分别表示特征的高宽及通道数大小。首先,考虑到Fc只 包含有局部的特征信息,利用空间注意力模块加强特征像素级别的依赖作用; 考虑到Ft包含有更多全局依赖信息,利用通道注意力模块,增强特征在不同通 道之间的相互作用关系。其次,将特征流进行像素级别的相乘操作,探索特征 之间的相互作用,再利用残差模块进行特征加强作用。最后,将这三种特征流 进行通道拼接处理,得到最终融合结果。Specifically, in the fusion branch, the specific steps are shown in Figure 3. The two features come from the CNN branch and the transformer branch respectively, using
Figure BDA0003892514520000074
and
Figure BDA0003892514520000075
These two feature streams are represented in turn. Among them, H, W, and C represent the height and width of the feature and the number of channels, respectively. First of all, considering that F c only contains local feature information, the spatial attention module is used to strengthen the dependence of the feature pixel level; considering that F t contains more global dependency information, the channel attention module is used to enhance features in different channels the interaction between them. Secondly, the feature stream is multiplied at the pixel level to explore the interaction between features, and then the residual module is used to enhance the feature. Finally, the three feature streams are processed by channel splicing to obtain the final fusion result.

构建检测模型以实现舰船目标识别定位的目的。其中,包括以下三个步骤: 遥感舰船数据的采集与标注、利用改进型YOLOv5进行舰船目标检测任务、检 测模型的训练及测试部署Build a detection model to achieve the purpose of ship target recognition and positioning. Among them, the following three steps are included: the collection and labeling of remote sensing ship data, the use of improved YOLOv5 for ship target detection tasks, the training and test deployment of detection models

具体来说,遥感舰船数据的采集与标注过程主要依靠人工操作。在开源的 Google卫星地图上,截取包含有舰船目标的遥感图像,将所有的遥感图像保存 为同一分辨率。利用标注软件labelme,对所获取的遥感图像舰船目标进行标注 任务,以获得带有位置大小信息的xml文件。Specifically, the collection and labeling process of remote sensing ship data mainly relies on manual operations. On the open source Google satellite map, capture remote sensing images containing ship targets, and save all remote sensing images at the same resolution. Using the labeling software labelme, the task of labeling the acquired remote sensing image ship target is carried out to obtain the xml file with position and size information.

具体来说,在目标检测阶段,所述方法利用改进型YOLOv5进行舰船目标 检测任务。在解耦检测头结构中,对其进行了精简设计。原始YOLOv5的检测 头是通过分类和回归分支融合共享的方式来实现的,虽然提升了目标检测的精 度,但一定程度上增加了网络延时,推理速度变慢。因此,所述方法同时综合 考虑到相关算子表征能力和硬件上计算开销这两者的平衡,采用Hybrid Channels策略重新设计了一个更高效的解耦头结构,在维持精度的同时降低了 延时,缓解了原始解耦头中常规卷积带来的额外延时开销,提升了网络的运行 速度。Specifically, in the target detection stage, the method uses the improved YOLOv5 for ship target detection tasks. In the structure of the decoupling detection head, the design is simplified. The detection head of the original YOLOv5 is realized through the fusion and sharing of classification and regression branches. Although the accuracy of target detection is improved, the network delay is increased to a certain extent, and the reasoning speed is slowed down. Therefore, the method comprehensively considers the balance between the representation ability of related operators and the computing overhead on the hardware, and adopts the Hybrid Channels strategy to redesign a more efficient decoupling head structure, which reduces the delay while maintaining accuracy. , which alleviates the extra delay overhead caused by the conventional convolution in the original decoupling head, and improves the speed of the network.

具体来说,在舰船目标检测模型的训练及测试部署过程中,对所提出的检 测方法进行TensorRT移植部署。部署分为两个阶段:即模型预处理阶段和模型 推理阶段。其大致流程如下:1)导出检测网络定义以及相关训练好的权重;2) 重新解析检测网络定义以及相关权重;3)根据所使用的显卡算子构造出最优执 行计划;4)将所执行的计划序列化存储在显卡中;5)反向序列化执行目标检 测计划;6)进行舰船检测模型的前向推理过程。Specifically, during the training and test deployment of the ship target detection model, the proposed detection method is transplanted and deployed in TensorRT. The deployment is divided into two phases: the model preprocessing phase and the model inference phase. The general process is as follows: 1) Export the detection network definition and related trained weights; 2) Re-analyze the detection network definition and related weights; 3) Construct the optimal execution plan according to the graphics card operator used; The serialization of the plan is stored in the graphics card; 5) The reverse serialization executes the target detection plan; 6) The forward reasoning process of the ship detection model is carried out.

综上所述,以上仅为本发明的较佳实施例而已,并非用于限定本发明的保 护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等, 均应包含在本发明的保护范围之内。In summary, the above are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (6)

1. A method for detecting and identifying ship targets in severe weather is characterized by comprising the following steps:
step 1: cascading the defogging model and the detection model, wherein the fogging image is used as the input of the defogging model, the clear output of the defogging model is used as the input of the detection model of the next stage, and the category positioning result of the ship target is obtained through output;
step 2: the defogging model is synthesized by combining CNN and Transformer structures, and comprises three branches: CNN branch, transformer branch and fusogenic branch. Structural characteristics of CNN and Transformer are fully fused and utilized to realize more excellent defogging effect;
and 3, step 3: and the detection model is adjusted in a light weight manner by utilizing the topological structure paradigm, the network memory is reduced, and in addition, the trained model is deployed in a TensorRT manner, so that the reasoning speed of the model on hardware is accelerated.
2. The cascade defogging model and the detection model in the step 1 are characterized in that: and initializing the weight of the defogging subnetwork by using a Gaussian random variable in a joint training mode. The target detection subnet does not use random initialization weight operation, but carries out class down-sampling fine adjustment on a model obtained by pre-training on a COCO data set so as to realize weight initialization. The whole model carries out end-to-end training on the constructed data set and simultaneously learns the purposes of image defogging, ship target classification and positioning.
3. The defogging model construction according to the step 2 is characterized in that: in the CNN branch, local feature information about an image, such as contours, boundaries, etc., is mainly characterized by stacking N layers of conventional residual modules to achieve feature accumulation.
4. The defogging model construction method according to the step 2 is characterized in that: in the transform branch, based on the coding and decoding structure, the long-distance dependent global feature representation is realized by using operations such as a multi-head self-attention module, a multi-layer perceptron and an upsampling convolutional layer. Supplementing the characteristics of the CNN branch to achieve better defogging performance.
5. The defogging model construction according to the step 2 is characterized in that: in the feature fusion branch, based on a feature adaptive fusion strategy, a channel attention module, a space attention module, a conventional convolution operation, residual connection and the like are utilized, and effective features extracted by CNN and Transformer structures are utilized simultaneously.
6. The construction of the ship target detection model in the step 3 is characterized in that: and replacing the original feature extraction module by using a multi-branch convolution structure based on the topological structure paradigm. Meanwhile, operators of the whole backbone network are adjusted, and high-efficiency multi-scale feature fusion capability is kept.
CN202211270809.7A 2022-10-17 2022-10-17 A method for ship target detection and recognition in bad weather Pending CN115601657A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211270809.7A CN115601657A (en) 2022-10-17 2022-10-17 A method for ship target detection and recognition in bad weather

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211270809.7A CN115601657A (en) 2022-10-17 2022-10-17 A method for ship target detection and recognition in bad weather

Publications (1)

Publication Number Publication Date
CN115601657A true CN115601657A (en) 2023-01-13

Family

ID=84846270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211270809.7A Pending CN115601657A (en) 2022-10-17 2022-10-17 A method for ship target detection and recognition in bad weather

Country Status (1)

Country Link
CN (1) CN115601657A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116228572A (en) * 2023-02-09 2023-06-06 浙江理工大学 Scattering imaging device system based on transducer and CNN
CN116503276A (en) * 2023-04-10 2023-07-28 深圳大学 Hyperspectral Image Dehazing Method
CN117557477A (en) * 2024-01-09 2024-02-13 浙江华是科技股份有限公司 Defogging recovery method and system for ship
CN117789041A (en) * 2024-02-28 2024-03-29 浙江华是科技股份有限公司 Ship defogging method and system based on atmospheric scattering priori diffusion model
CN117952865A (en) * 2024-03-25 2024-04-30 中国海洋大学 A Single Image Dehazing Method Based on Cyclic Generative Adversarial Network

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114283078A (en) * 2021-12-09 2022-04-05 北京理工大学 An adaptive fusion image dehazing method based on two-way convolutional neural network
CN114842329A (en) * 2022-03-23 2022-08-02 河海大学 Image self-adaptive ship detection method and device and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114283078A (en) * 2021-12-09 2022-04-05 北京理工大学 An adaptive fusion image dehazing method based on two-way convolutional neural network
CN114842329A (en) * 2022-03-23 2022-08-02 河海大学 Image self-adaptive ship detection method and device and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
PENGWEI DONG等: "TransRA: transformer and residual attention fusion for single remote sensing image dehazing", 《 MULTIDIMENSIONAL SYSTEMS AND SIGNAL PROCESSING 》, vol. 33, 20 May 2022 (2022-05-20), pages 1119 - 1138 *
SHUPING LI 等: "Image Dehazing Algorithm Based on Deep Learning Coupled Local and Global Features", 《APPLIED SCIENCE》, vol. 12, no. 17, 26 August 2022 (2022-08-26), pages 1 - 14 *
刘明等: "基于生成对抗网络的遥感图像去雾研究", 《航天返回与遥感》, vol. 41, no. 6, 15 December 2020 (2020-12-15), pages 14 - 20 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116228572A (en) * 2023-02-09 2023-06-06 浙江理工大学 Scattering imaging device system based on transducer and CNN
CN116503276A (en) * 2023-04-10 2023-07-28 深圳大学 Hyperspectral Image Dehazing Method
CN117557477A (en) * 2024-01-09 2024-02-13 浙江华是科技股份有限公司 Defogging recovery method and system for ship
CN117557477B (en) * 2024-01-09 2024-04-05 浙江华是科技股份有限公司 Defogging recovery method and system for ship
CN117789041A (en) * 2024-02-28 2024-03-29 浙江华是科技股份有限公司 Ship defogging method and system based on atmospheric scattering priori diffusion model
CN117789041B (en) * 2024-02-28 2024-05-10 浙江华是科技股份有限公司 Ship defogging method and system based on atmospheric scattering priori diffusion model
CN117952865A (en) * 2024-03-25 2024-04-30 中国海洋大学 A Single Image Dehazing Method Based on Cyclic Generative Adversarial Network

Similar Documents

Publication Publication Date Title
CN115601657A (en) A method for ship target detection and recognition in bad weather
Yu et al. Underwater-GAN: Underwater image restoration via conditional generative adversarial network
CN116503602A (en) Unstructured environment three-dimensional point cloud semantic segmentation method based on multi-level edge enhancement
CN113269133A (en) Unmanned aerial vehicle visual angle video semantic segmentation method based on deep learning
CN116188342B (en) Infrared light and visible light image fusion method combining target detection
CN110210354A (en) A kind of detection of haze weather traffic mark with know method for distinguishing
Yang et al. [Retracted] A Method of Image Semantic Segmentation Based on PSPNet
CN114708297A (en) A video target tracking method and device
CN111582232A (en) A SLAM method based on pixel-level semantic information
CN110222822A (en) The construction method of black box prediction model internal feature cause-and-effect diagram
CN116385876A (en) Optical remote sensing image ground object detection method based on YOLOX
CN116740516A (en) Target detection method and system based on multi-scale fusion feature extraction
CN111599007A (en) Smart city CIM road mapping method based on unmanned aerial vehicle aerial photography
CN119068080A (en) Method, electronic device and computer program product for generating an image
CN115424026A (en) An end-to-end multi-target detection model in foggy images based on knowledge embedding
CN119229374A (en) A lightweight and dense pedestrian detection method and system based on YOLOv8
CN116310900A (en) A target recognition and tracking method, device and system on a complex battlefield
CN115063434A (en) A low-low-light image instance segmentation method and system based on feature denoising
CN117372838A (en) Lightweight non-cooperative target local feature recognition method
CN116757957A (en) Two-stage decoupling image defogging method based on zero sample learning
CN103778644A (en) Infrared motion object detection method based on multi-scale codebook model
CN119516187B (en) Multi-mode unmanned aerial vehicle image segmentation method
CN114757819A (en) Structure-guided style deviation correction type style migration method and system
CN113095207A (en) Lightweight and efficient single-stage night vehicle detection algorithm
CN120426982A (en) An occupancy grid prediction method combining city-level neural radiation field prior and time domain enhancement

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