CN117351352A - SAR ship image target recognition method based on lightweight YOLOv5 network model - Google Patents
SAR ship image target recognition method based on lightweight YOLOv5 network model Download PDFInfo
- Publication number
- CN117351352A CN117351352A CN202311329290.XA CN202311329290A CN117351352A CN 117351352 A CN117351352 A CN 117351352A CN 202311329290 A CN202311329290 A CN 202311329290A CN 117351352 A CN117351352 A CN 117351352A
- Authority
- CN
- China
- Prior art keywords
- network model
- lightweight
- yolov5
- loss
- sar
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000012549 training Methods 0.000 claims abstract description 25
- 238000012795 verification Methods 0.000 claims abstract description 11
- 238000004364 calculation method Methods 0.000 claims description 19
- 238000002372 labelling Methods 0.000 claims description 6
- 238000001514 detection method Methods 0.000 abstract description 7
- 230000006870 function Effects 0.000 description 6
- 238000013135 deep learning Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000011156 evaluation Methods 0.000 description 2
- 208000037170 Delayed Emergence from Anesthesia Diseases 0.000 description 1
- 241000238102 Scylla Species 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000011176 pooling Methods 0.000 description 1
- 238000013526 transfer learning Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/10—Terrestrial scenes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing 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/774—Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (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)
- Image Analysis (AREA)
Abstract
The invention discloses a SAR ship image target recognition method based on a lightweight YOLOv5 network model, which comprises the following steps: selecting pictures in the SAR-clip-Dataset data set and dividing the pictures into a training set and a verification set; building a lightweight YOLOv5 network model, wherein the lightweight YOLOv5 network model introduces a MobileNet module and a Ghost Bottleneck module, and adopts SIOU as a loss function; training the lightweight YOLOv5 network model by using a training set and a verification set to obtain a trained lightweight YOLOv5 network model; and inputting the SAR ship image to be tested into a trained lightweight YOLOv5 network model, and identifying a ship target. The ship image target recognition method has the advantages of less parameters and operation, ensured SAR image detection precision and shortened training time.
Description
Technical Field
The invention relates to the field of ship or other water ship detection and identification, in particular to a SAR ship image target identification method based on a lightweight YOLOv5 network model.
Background
Synthetic Aperture Radar (SAR) is a passive remote sensing technology for acquiring ground or target information by using radar technology, and has become one of the important technical means for ocean monitoring due to the advantages of high resolution, no remote sensing source, no weather influence and the like. Meanwhile, in the process of gradually improving the resolution of SAR images and developing a deep learning algorithm, the deep learning method gradually replaces the traditional method with complex calculation. Because the SAR ship image target recognition task has strong similarity with other computer vision tasks, the trained network model can be used for transfer learning, so that the training process of the model is accelerated and the accuracy of the model is improved. However, the SAR image and the optical image have significant differences in image characteristics, and the deep learning method applied to optical image recognition is directly transferred to the SAR image, so that the problems of multiple model parameters, large operation amount, sparse training samples, unbalanced classification and the like exist, which makes the YOLOv5 training time long and the training precision difficult to ensure.
Therefore, how to improve YOLOv5 and apply it to a target recognition method of SAR ship images is a problem to be solved.
Disclosure of Invention
In view of this, the present invention aims to migrate a deep learning method applied to optical image recognition to SAR image recognition, and lighten the model to reduce parameters and calculation amount of the model, improve accuracy of SAR image detection, and shorten training time.
The invention discloses a SAR ship image target recognition method based on a lightweight YOLOv5 network model. Comprises the following steps:
s1: selecting pictures in the SAR-clip-Dataset data set and dividing the pictures into a training set and a verification set;
s2: building a lightweight yolkv 5 network model, wherein the lightweight yolkv 5 network model is based on a traditional yolkv 5 network model, a mobile network module and a Ghostreck module are introduced, and SIOU is adopted as a loss function of the lightweight yolkv 5 network model, the mobile network module replaces all modules in a backbone network in the traditional yolkv 5 network model, the Ghostreck module replaces CSP modules in a neck network in the traditional yolkv 5 network model, and meanwhile, the Ghostreck module replaces Conv modules in the neck network in the traditional yolkv 5 network model;
s3: training the lightweight YOLOv5 network model by using the training set and the verification set in the S1 to obtain a trained lightweight YOLOv5 network model;
s4: and inputting the SAR ship image to be tested into a trained lightweight YOLOv5 network model, and identifying a ship target.
Preferably, in S1, the training set and the verification set are randomly divided according to a ratio of 7:3.
Further preferably, S1 further comprises the steps of: and labeling labels for each selected training sample by using a picture labeling tool LabelImg, and storing the position information and the category information of the labeling anchor frame as text files.
Further preferably, in S2, the calculation formula of the SIOU loss is as follows:
where IoU represents IoU loss, Δ represents distance loss, Ω represents shape loss;
the calculation formula of the distance loss is as follows:
in the middle of,γ=2-Λ,(c' w ,c' h ) Width and height of minimum bounding rectangle for real and predicted frames, +.>Is the center coordinate of the real frame, +.>For the center coordinates of the prediction box, Λ represents the angle loss, and the calculation formula is as follows:
wherein, c h The height difference is the height difference between the center points of the real frame and the predicted frame, and sigma is the distance between the center points of the real frame and the predicted frame;
the calculation formula of the shape loss is as follows:
in the method, in the process of the invention,(w, h) and (w gt ,h gt ) Respectively the width and the height of the prediction frame and the real frame, wherein theta represents the attention degree of shape loss, and the value range of theta is [2,6 ]];
The calculation formula of IoU loss is as follows:
compared with the traditional Yolov5 method, the SAR ship image target recognition method based on the lightweight Yolov5 network model has three main different points, wherein a backbone network adopts a MobileNet lightweight module, a neck network adopts a Bottleneck module, and a loss function SIOU is adopted to replace a loss function DIOU. The SAR ship image target recognition method based on the lightweight YOLOv5 network model provided by the invention has the advantages that the parameter quantity is greatly reduced compared with that of YOLOv5, but the detection precision, the model evaluation indexes such as MAP and the like are not obviously reduced, and the precision and the practicability of the model are ensured to a certain extent.
Drawings
FIG. 1 is a flow chart of a SAR ship image target recognition method based on a lightweight YOLOv5 network model provided by the invention;
FIG. 2 is a schematic diagram of a lightweight YOLOv5 network employed in the present invention;
FIG. 3 is a visual target detection result comparison chart;
fig. 4 is a schematic diagram of relevant parameters in the calculation process of the angle loss.
Detailed Description
The invention will be further explained below in connection with specific embodiments, but is not limited to the invention.
As shown in fig. 1, the invention discloses a light-weight YOLOv5 network model-based SAR ship image target recognition method, which comprises the following steps:
s1: selecting pictures in the SAR-clip-Dataset data set and dividing the pictures into a training set and a verification set;
preferably, the training set and the verification set are randomly divided according to the proportion of 7:3, a picture marking tool LabelImg is used for marking labels for each selected training sample, and the position information and the category information of the marking anchor frame are stored as text files;
s2: constructing a lightweight YOLOv5 network model, wherein the lightweight YOLOv5 network model is characterized in that a MobileNet (MNE) module and a Ghost Bottleneck module are introduced on the basis of a traditional YOLOv5 network model, scylla Intersection Over Union (SIOU) is adopted as a loss function of the lightweight YOLOv5 network model, the MobileNet (MNE) module replaces all modules in a backbone network in the traditional YOLOv5 network model, the Ghost Bottleneck module replaces a CSP module in a neck network in the traditional YOLOv5 network model, and meanwhile, the GhostConv module is adopted to replace a Conv module in the neck network in the traditional YOLOv5 network model;
the traditional YOLOv5 backbone network has ten layers, wherein the traditional YOLOv5 backbone network comprises a convolution layer, a Cross Stage Partial (CSP) module and a Spatial Pyramid Pooling Fast (SPPF) module, and the invention replaces all modules in the original backbone network by a lightweight module MobileNet (MNE) and expands the original ten layers into eleven layers;
according to the invention, the Ghost Bottleneck module is adopted to replace a CSP module in a neck network in a traditional YOLOv5 network model, and meanwhile, the Ghost Conv module is adopted to replace a Conv module in the neck network in the traditional YOLOv5 network model, so that the parameter scale and the calculation resource consumption of the network can be greatly optimized while the network training detection precision is not influenced; the Ghost Bottleneck module is similar to a basic residual block in ResNet, and mainly consists of two stacked Ghost modules, wherein the first module is used as an expansion layer to increase the number of channels, the second module is used for reducing the number of channels, and finally, the input and the output of the two Ghost modules are connected by using a Shortcut;
the vector angle between the real frame and the predicted frame is further considered on the basis of the IOU by the SIOU loss, and a specific calculation formula is as follows:
where IoU represents IoU loss, Δ represents distance loss, Ω represents shape loss;
the calculation formula of the distance loss is as follows:
in the method, in the process of the invention,γ=2-Λ,(c' w ,c' h ) Width and height of minimum bounding rectangle for real and predicted frames, +.>Is the center coordinate of the real frame, +.>For the center coordinates of the prediction box, Λ represents the angle loss, and the calculation formula is as follows:
wherein, c h For the difference in height between the center points of the real and predicted frames, σ is the distance between the center points of the real and predicted frames, in fact, as shown in figure 4,equal to angle alpha>
Is the center coordinate of the real frame, +.>As the central coordinates of the prediction box, it can be noted that when α is +.>Or 0, the angle loss is 0, if +.>Then alpha is minimized, otherwise beta is minimized;
the calculation formula of the shape loss is as follows:
in the method, in the process of the invention,(w, h) and (w gt ,h gt ) Respectively the width and the height of the prediction frame and the real frame, wherein theta represents the attention degree of shape loss, and the value range of theta is [2,6 ]]. The calculation formula of IoU loss is as follows:
s3: training the lightweight YOLOv5 network model by using the training set and the verification set in the S1 to obtain a trained lightweight YOLOv5 network model;
s4: inputting SAR ship images to be tested into a trained lightweight YOLOv5 network model, and identifying ship targets, such as: and the information such as the boundary box position, the category label, the confidence score and the like of the ship target.
Compared with the traditional Yolov5 method, the SAR ship image target recognition method based on the lightweight Yolov5 network model has three main different points, wherein a backbone network adopts a MobileNet lightweight module, a neck network adopts a Bottleneck module, and a loss function SIOU is adopted to replace a loss function DIOU. The SAR ship image target recognition method based on the lightweight YOLOv5 network model provided by the invention has the advantages that the parameter quantity is greatly reduced compared with that of YOLOv5, but the detection precision, the model evaluation indexes such as MAP and the like are not obviously reduced (as shown in figure 3), and the precision and the practicability of the model are ensured to a certain extent.
The embodiments of the present invention have been described in detail, but the present invention is not limited to the above embodiments, and various changes can be made without departing from the spirit of the present invention within the knowledge of those skilled in the art.
Claims (4)
1. The SAR ship image target recognition method based on the lightweight YOLOv5 network model is characterized by comprising the following steps of:
s1: selecting pictures in the SAR-clip-Dataset data set and dividing the pictures into a training set and a verification set;
s2: building a lightweight yolkv 5 network model, wherein the lightweight yolkv 5 network model is based on a traditional yolkv 5 network model, a mobile network module and a Ghostreck module are introduced, and SIOU is adopted as a loss function of the lightweight yolkv 5 network model, the mobile network module replaces all modules in a backbone network in the traditional yolkv 5 network model, the Ghostreck module replaces CSP modules in a neck network in the traditional yolkv 5 network model, and meanwhile, the Ghostreck module replaces Conv modules in the neck network in the traditional yolkv 5 network model;
s3: training the lightweight YOLOv5 network model by using the training set and the verification set in the S1 to obtain a trained lightweight YOLOv5 network model;
s4: and inputting the SAR ship image to be tested into a trained lightweight YOLOv5 network model, and identifying a ship target.
2. The method for identifying the SAR ship image target based on the lightweight YOLOv5 network model according to claim 1, wherein the method comprises the following steps: in S1, the training set and the verification set are randomly divided according to the proportion of 7:3.
3. The method for identifying the SAR ship image target based on the lightweight YOLOv5 network model according to claim 1, wherein the method comprises the following steps: s1 further comprises the following steps: and labeling labels for each selected training sample by using a picture labeling tool LabelImg, and storing the position information and the category information of the labeling anchor frame as text files.
4. The method for identifying the SAR ship image target based on the lightweight YOLOv5 network model according to claim 1, wherein the method comprises the following steps: in S2, the calculation formula of the SIOU loss is as follows:
where IoU represents IoU loss, Δ represents distance loss, Ω represents shape loss;
the calculation formula of the distance loss is as follows:
in the method, in the process of the invention,(c' w ,c' h ) Width and height of minimum bounding rectangle for real and predicted frames, +.>Is the center coordinate of the real frame, +.>For the center coordinates of the prediction box, Λ represents the angle loss, and the calculation formula is as follows:
wherein, c h The height difference is the height difference between the center points of the real frame and the predicted frame, and sigma is the distance between the center points of the real frame and the predicted frame;
the calculation formula of the shape loss is as follows:
in the method, in the process of the invention,(w, h) and (w gt ,h gt ) Respectively the width and the height of the prediction frame and the real frame, wherein theta represents the attention degree of shape loss, and the value range of theta is [2,6 ]];
The calculation formula of IoU loss is as follows:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311329290.XA CN117351352A (en) | 2023-10-13 | 2023-10-13 | SAR ship image target recognition method based on lightweight YOLOv5 network model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311329290.XA CN117351352A (en) | 2023-10-13 | 2023-10-13 | SAR ship image target recognition method based on lightweight YOLOv5 network model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117351352A true CN117351352A (en) | 2024-01-05 |
Family
ID=89355436
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311329290.XA Pending CN117351352A (en) | 2023-10-13 | 2023-10-13 | SAR ship image target recognition method based on lightweight YOLOv5 network model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117351352A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117576553A (en) * | 2024-01-15 | 2024-02-20 | 中国海洋大学 | Dual-polarized SAR image ocean ice vortex identification method and device and electronic equipment |
-
2023
- 2023-10-13 CN CN202311329290.XA patent/CN117351352A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117576553A (en) * | 2024-01-15 | 2024-02-20 | 中国海洋大学 | Dual-polarized SAR image ocean ice vortex identification method and device and electronic equipment |
CN117576553B (en) * | 2024-01-15 | 2024-04-02 | 中国海洋大学 | Dual-polarized SAR image ocean ice vortex identification method and device and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Spencer Jr et al. | Advances in computer vision-based civil infrastructure inspection and monitoring | |
CN108647585B (en) | Traffic identifier detection method based on multi-scale circulation attention network | |
CN110929607B (en) | Remote sensing identification method and system for urban building construction progress | |
CN111985376A (en) | Remote sensing image ship contour extraction method based on deep learning | |
CN111507222B (en) | Three-dimensional object detection frame based on multisource data knowledge migration | |
CN114495029B (en) | Traffic target detection method and system based on improved YOLOv4 | |
CN111738113A (en) | Road extraction method of high-resolution remote sensing image based on double-attention machine system and semantic constraint | |
CN113177560A (en) | Universal lightweight deep learning vehicle detection method | |
CN117351352A (en) | SAR ship image target recognition method based on lightweight YOLOv5 network model | |
CN110610165A (en) | Ship behavior analysis method based on YOLO model | |
CN113076804B (en) | Target detection method, device and system based on YOLOv4 improved algorithm | |
CN111652273A (en) | Deep learning-based RGB-D image classification method | |
CN109325407B (en) | Optical remote sensing video target detection method based on F-SSD network filtering | |
CN116740344A (en) | Knowledge distillation-based lightweight remote sensing image semantic segmentation method and device | |
CN113177503A (en) | Arbitrary orientation target twelve parameter detection method based on YOLOV5 | |
CN110223310A (en) | A kind of line-structured light center line and cabinet edge detection method based on deep learning | |
CN113159215A (en) | Small target detection and identification method based on fast Rcnn | |
CN115424237A (en) | Forward vehicle identification and distance detection method based on deep learning | |
CN112364709A (en) | Cabinet intelligent asset checking method based on code identification | |
CN114358133B (en) | Method for detecting looped frames based on semantic-assisted binocular vision SLAM | |
CN117456480B (en) | Light vehicle re-identification method based on multi-source information fusion | |
CN113284185B (en) | Rotating target detection method for remote sensing target detection | |
CN113255555A (en) | Method, system, processing equipment and storage medium for identifying Chinese traffic sign board | |
CN116612382A (en) | Urban remote sensing image target detection method and device | |
CN115019174B (en) | Up-sampling remote sensing image target recognition method based on pixel recombination and attention |
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 |