Adaptive image segmentation method, system, device and medium

Through the adaptive image chunking method, the improved CLIPSelf model segmentation and screening image chunking are solved, and the CLIPSelf model lacks ability to identify objects in the railway perimeter and nearby areas is achieved, achieving more accurate target recognition and safety improvement.

CN118762047BActive Publication Date: 2024-12-27CRSC COMM & INFORMATION GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411244250.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-12-27
Estimated Expiration
2044-09-06

AI Technical Summary

Technical Problem

The existing CLIPSelf model is difficult to accurately identify various objects in the railway perimeter and its vicinity, especially small stones in the distance, resulting in insufficient recognition capabilities in the disaster prevention alarm system.

Method used

Adaptive image chunking method is adopted to segment images into multiple original chunks through the improved CLIPSelf model, and use convolutional neural network and region generation network to filter out chunks that meet the preset reliability range to enhance the local understanding of the model. ability.

Benefits of technology

It improves the local understanding of the image, can more accurately identify invasive foreign objects in the railway perimeter and its surroundings, improves the safety and reliability of modern rail transit systems, and reduces labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118762047B_ABST
    Figure CN118762047B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of computer vision and machine learning, and discloses an adaptive image segmentation method, system, device and medium, comprising: according to a training image, by using a segmentation module of an improved CLIPSelf model, using a preset segmentation rule, the training image is segmented into a plurality of original image segments; by using a screening module of the improved CLIPSelf model, using a preset screening rule, a plurality of image segments that meet a preset confidence range are screened from the plurality of original image segments and replaced with the plurality of original image segments, and an improved CLIPSelf model is trained. The trained improved CLIPSelf model has good image global understanding ability and image local understanding ability, obtains a better self-distillation effect in training, and can converge faster to obtain better results in reasoning of subtasks such as target detection, instance segmentation, and image retrieval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer vision and machine learning, and in particular to an adaptive image segmentation method, system, device and medium. Background Art

[0002] In modern rail transit systems, safety and reliability are of vital importance. With the application of computer vision technology in the field of rail transit, railway disaster prevention detection and early warning can be realized. Disaster prevention alarm systems usually need to effectively detect and alarm intrusive foreign objects such as stones, people, and mudslides that appear in and around the railway perimeter in the video image. Although the open target detection of the artificial intelligence large model can already identify most objects, such as people, it is very accurate, but it is difficult to identify stones such as railway perimeters and nearby, especially small stones in the distance.

[0003] The CLIP (Contrastive Language-Image Pre-training) model is a deep learning model that aims to achieve joint pre-training between images and texts through contrastive learning methods, so that the model can understand the image content and match it with the text description without additional training. The core of the CLIP model is the visual encoder and the text encoder, which map the image and text into the same vector space so that images and texts from the same concept are close in this space. The CLIPSelf model is an extended version of the CLIP model. It optimizes the domain shift problem encountered by CLIP ViT (Transformer-based visual encoder) when it switches from global image representation to local region representation in open vocabulary dense prediction tasks such as object detection and image segmentation, but its recognition ability in local regions of the image is still unsatisfactory.

[0004] In order to effectively identify various objects appearing in and around the railway perimeter, such as stones and human bodies of different distances and sizes, the present invention proposes a method to further improve the CLIPSelf model, namely, an adaptive image segmentation method, so as to further enhance the local understanding ability of the image while maintaining a good global understanding ability of the image. Summary of the invention

[0005] The present invention provides an adaptive image segmentation method, system, device and medium, which are used to solve the defect that the existing CLIPSelf model is difficult to accurately identify various objects such as railway perimeters and their vicinities.

[0006] The present invention provides an adaptive image segmentation method, comprising:

[0007] Get the training image, where the length and width of the training image are , and the training image contains the target to be identified;

[0008] According to the training image, the segmentation module of the improved CLIPSelf model is used to segment the training image into a plurality of original image blocks by using a preset segmentation rule;

[0009] According to the plurality of original image blocks, a screening module of the improved CLIPSelf model is used to screen the plurality of original image blocks to obtain a plurality of image blocks that meet a preset confidence range by using preset screening rules;

[0010] Multiple image blocks that meet the preset confidence range are used to replace multiple original image blocks, and the improved CLIPSelf model is obtained through training.

[0011] In one embodiment, the training image is segmented into a plurality of original image blocks by using a segmentation module of the improved CLIPSelf model and a preset segmentation rule according to the training image, including:

[0012] According to the training image, the segmentation module of the improved CLIPSelf model is used to segment the training image into OK Column, get The original image is divided into blocks, where ;

[0013] according to The original image is divided into blocks, and the segmentation module of the improved CLIPSelf model is used to obtain the improved CLIPSelf model to achieve global understanding of the image using the preset segmentation rules. The original image is divided into blocks and the improved CLIPSelf model is used to realize local understanding of the image The original image is divided into blocks.

[0014] In one embodiment, the preset block rules include:

[0015] when is set to , that is, when the improved CLIPSelf model is expected to achieve global understanding of the image, according to The original image is divided into blocks and the segmentation module of the improved CLIPSelf model is used to obtain The original image is divided into blocks, where ;

[0016] when is set to or , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, we get The original image is divided into blocks, where ;

[0017] when is set to , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, the non-edge intersection in the training image is taken as the center, and the The length and width are The new original image blocks will be The original image is divided into blocks and The new original image is integrated into blocks, and we get The original image is divided into blocks, where .

[0018] In one embodiment, the screening module of the improved CLIPSelf model includes a convolutional neural network and a region generation network, and the screening module of the improved CLIPSelf model uses preset screening rules to screen multiple image blocks that meet a preset confidence range from multiple original image blocks, including:

[0019] when is set to , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, the convolutional neural network and region generation network of the screening module of the improved CLIPSelf model are used to obtain The confidence of each original image block in the original image blocks;

[0020] according to The confidence of each original image block in the original image blocks ,Will The original image blocks are sorted from high to low, and the first The original image blocks are used as multiple image blocks that meet the preset confidence range.

[0021] In one embodiment, the is set to , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, the convolutional neural network and region generation network of the screening module of the improved CLIPSelf model are used to obtain The confidence of each original image block in the original image blocks includes:

[0022] when is set to , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, according to Each of the original image blocks is obtained by passing the convolutional neural network of the screening module of the improved CLIPSelf model. The feature map of each original image block in the original image blocks, where A set of predefined anchor boxes are set on the feature map of each original image block in the original image blocks;

[0023] for For each of the feature maps of the original image blocks in the original image blocks, for each of the predefined anchor boxes in the set of predefined anchor boxes on the feature map, the region generation network of the screening module of the improved CLIPSelf model is used to obtain the anchor box confidence and the regression parameters for adjusting the anchor box position and size;

[0024] for For each original image block in the original image blocks, according to the anchor frame confidence of each predefined anchor frame in a set of predefined anchor frames on the feature map, the non-maximum suppression method is used to filter out the predefined anchor frames whose overlap exceeds the preset overlap threshold, and the predefined anchor frame that is most likely to contain the target is obtained and its confidence is used as the confidence of the corresponding original image block.

[0025] In one embodiment, the The confidence of each original image block in the original image blocks is The original image blocks are sorted from high to low, and the first The original image blocks are used as multiple image blocks that meet the preset confidence range, including:

[0026] for The original image is divided into blocks according to The confidence of the predefined anchor box that is most likely to contain the target corresponding to each original image block in the original image blocks is The original image blocks are sorted from high to low, and the first The original image blocks are used as multiple image blocks that meet the preset confidence range.

[0027] In one embodiment, the method of replacing a plurality of original image blocks with a plurality of image blocks that meet a preset confidence range, and using the improved CLIPSelf model to implement target recognition of a target to be recognized in a training image, comprises:

[0028] Will The original image is replaced by blocks The original image blocks are used in the improved CLIPSelf model to realize target recognition of the target to be recognized in the training image.

[0029] The present invention also provides an adaptive image segmentation system, comprising:

[0030] The image acquisition module is used to: acquire a training image, wherein the length and width of the training image are respectively , and the training image contains the target to be identified;

[0031] A segmentation module is used to: according to the training image, divide the training image into a plurality of original image blocks by using the segmentation module of the improved CLIPSelf model and a preset block rule;

[0032] A screening module is used to: according to a plurality of original image blocks, through the screening module of the improved CLIPSelf model, using preset screening rules, screen out a plurality of image blocks that meet a preset confidence range from the plurality of original image blocks;

[0033] The training module is used to replace a plurality of original image blocks with a plurality of image blocks that meet a preset confidence range, and train to obtain an improved CLIPSelf model.

[0034] The present invention also provides an electronic device, comprising a processor and a memory storing a computer program, wherein the processor implements any of the above-mentioned adaptive image segmentation methods when executing the computer program.

[0035] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any of the above-mentioned adaptive image segmentation methods is implemented.

[0036] The present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute any of the above-mentioned adaptive image segmentation methods.

[0037] The present invention provides an adaptive image segmentation method, system, device and medium. Through new preset segmentation rules and preset screening rules, the improved CLIPSelf model obtained through training can have good global image understanding ability and local image understanding ability, obtain better self-distillation effect in training, converge faster, and help downstream subtasks to obtain better results in subtask reasoning such as target detection, instance segmentation, and image retrieval. When applied to the reasoning of the disaster prevention alarm system, it can accurately identify intrusive foreign objects such as stones, personnel, mudslides, etc. that appear in and around the railway perimeter, avoid safety hazards caused by failure to identify foreign objects, greatly improve the safety and reliability of modern rail transit coefficients, and effectively reduce labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 A schematic flow chart of an adaptive image segmentation method provided by the present invention.

[0040] Figure 2 This is an example diagram of image segmentation in an adaptive image segmentation method provided by the present invention (M=2, N=3).

[0041] Figure 3 A schematic structural diagram of an adaptive image segmentation system provided by the present invention.

[0042] Figure 4 This is a schematic structural diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments, and they should not be understood as limitations on the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In the description of the present invention, it should be understood that the terms used are only for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0044] Combine the following Figure 1-Figure 4 The adaptive image segmentation method, system, device and medium provided by the present invention are described. It should be noted that the execution subject of the adaptive image segmentation method provided by the present invention can be any network side device / terminal side device that meets the technical requirements, such as an adaptive image segmentation device.

[0045] Figure 1 Schematic diagram of the process of the adaptive image segmentation method provided by the present invention. Figure 1 The present invention provides an adaptive image segmentation method, which may include:

[0046] Step S110: Obtain a training image, where the length and width of the training image are respectively , and the training images contain the targets to be identified.

[0047] In one embodiment, step S110 may obtain images in surveillance videos from a disaster prevention alarm system as training images, etc., and the target to be identified may be intrusive foreign objects such as stones, personnel, mudslides, etc. that appear in and around the railway perimeter.

[0048] Step S120 : According to the training image, the segmentation module of the improved CLIPSelf model uses a preset segmentation rule to segment the training image into a plurality of original image segments.

[0049] In one embodiment, the preset block rules include:

[0050] when is set to , that is, when the improved CLIPSelf model is expected to achieve global understanding of the image, according to The original image is divided into blocks and the segmentation module of the improved CLIPSelf model is used to obtain The original image is divided into blocks, where ; You can set the focus image to the entire image The probability of when is α, and α≥0.5; when is set to or , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, we get The original image is divided into blocks, where ;

[0051] when is set to , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, the non-edge intersection in the training image is taken as the center, and the The length and width are The new original image blocks will be The original image is divided into blocks and The new original image is integrated into blocks, and we get The original image is divided into blocks, where , Figure 2 Show An example block diagram of .

[0052] You can set the full image of non-focus images , that is, when focusing on a local image, the random probability of other situations occurring is β.

[0053] In one embodiment, the screening module of the improved CLIPSelf model includes a convolutional neural network and a region generation network, and step S120 may include:

[0054] when is set to , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, the convolutional neural network and region generation network of the screening module of the improved CLIPSelf model are used to obtain The confidence of each original image block in the original image blocks;

[0055] according to The confidence of each original image block in the original image blocks ,Will The original image blocks are sorted from high to low, and the first The original image blocks are used as multiple image blocks that meet the preset confidence range. .

[0056] In one embodiment, the is set to , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, the convolutional neural network and region generation network of the screening module of the improved CLIPSelf model are used to obtain The confidence of each original image block in the original image blocks includes:

[0057] when is set to , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, according to Each of the original image blocks is obtained by passing the convolutional neural network of the screening module of the improved CLIPSelf model. The feature map of each original image block in the original image blocks, where A set of predefined anchor boxes is set on the feature map of each original image block in the original image blocks, and the set of predefined anchor boxes covers different sizes and aspect ratios;

[0058] for For each of the feature maps of the original image blocks in the original image blocks, for each of the predefined anchor boxes in the set of predefined anchor boxes on the feature map, the region generation network of the screening module of the improved CLIPSelf model is used to obtain the anchor box confidence (indicating the confidence score of the existence of the object in the predefined anchor box) and the regression parameters for adjusting the position and size of the anchor box;

[0059] for For each original image block in the original image blocks, according to the anchor frame confidence of each predefined anchor frame in a set of predefined anchor frames on the feature map, the non-maximum suppression method (NMS) is used to filter out the predefined anchor frames whose overlap exceeds the preset overlap threshold, and obtain the candidate frame with the highest confidence that does not overlap with other frames, and its confidence is used as the confidence of the corresponding original image block.

[0060] Step S130: Based on the multiple original image blocks, a screening module of the improved CLIPSelf model is used to screen the multiple original image blocks to obtain multiple image blocks that meet a preset confidence range using preset screening rules.

[0061] In one embodiment, step S130 may be for The original image is divided into blocks according to The confidence of the predefined anchor box that is most likely to contain the target corresponding to each original image block in the original image blocks is The original image blocks are sorted from high to low, and the first The original image blocks are used as multiple image blocks that meet the preset confidence range.

[0062] Step S140: replace the multiple original image blocks with the multiple image blocks that meet the preset confidence range, and train to obtain the improved CLIPSelf model.

[0063] In one embodiment, step S140 may The original image is replaced by blocks The original image is divided into blocks and trained to obtain the improved CLIPSelf model.

[0064] The present invention provides an adaptive image segmentation method, system, device and medium. Through new preset segmentation rules and preset screening rules, the improved CLIPSelf model obtained through training can have good global image understanding ability and local image understanding ability, obtain better self-distillation effect in training, converge faster, and help downstream subtasks to obtain better results in subtask reasoning such as target detection, instance segmentation, and image retrieval. When applied to the reasoning of the disaster prevention alarm system, it can accurately identify intrusive foreign objects such as stones, personnel, mudslides, etc. that appear in and around the railway perimeter, avoid safety hazards caused by failure to identify foreign objects, greatly improve the safety and reliability of modern rail transit coefficients, and effectively reduce labor costs.

[0065] The adaptive image segmentation system provided by the present invention is described below. The adaptive image segmentation system described below and the adaptive image segmentation method described above can be referred to each other.

[0066] Reference Figure 3 The present invention provides an adaptive image segmentation system, which may include:

[0067] The image acquisition module is used to: acquire a training image, wherein the length and width of the training image are respectively , and the training image contains the target to be identified;

[0068] A segmentation module is used to: according to the training image, divide the training image into a plurality of original image blocks by using the segmentation module of the improved CLIPSelf model and a preset block rule;

[0069] A screening module is used to: according to a plurality of original image blocks, through the screening module of the improved CLIPSelf model, using preset screening rules, screen out a plurality of image blocks that meet a preset confidence range from the plurality of original image blocks;

[0070] The training module is used to replace a plurality of original image blocks with a plurality of image blocks that meet a preset confidence range, and train to obtain an improved CLIPSelf model.

[0071] In one embodiment, the segmentation module may include:

[0072] The first segmentation module is used to: divide the training image into OK Column, get The original image is divided into blocks, where ;

[0073] The second cutting molecular module is used to: The original image is divided into blocks, and the segmentation module of the improved CLIPSelf model is used to obtain the improved CLIPSelf model to achieve global understanding of the image using the preset segmentation rules. The original image is divided into blocks and the improved CLIPSelf model is used to realize local understanding of the image The original image is divided into blocks.

[0074] In one embodiment, a screening module may include:

[0075] The confidence obtaining submodule is used for: is set to , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, the convolutional neural network and region generation network of the screening module of the improved CLIPSelf model are used to obtain The confidence of each original image block in the original image blocks;

[0076] The confidence screening submodule is used to: The confidence of each original image block in the original image blocks ,Will The original image blocks are sorted from high to low, and the first The original image blocks are used as multiple image blocks that meet the preset confidence range.

[0077] In one embodiment, the confidence obtaining submodule may include:

[0078] The feature map is obtained as a submodule, which is used for: is set to , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, according to Each of the original image blocks is obtained by passing the convolutional neural network of the screening module of the improved CLIPSelf model. The feature map of each original image block in the original image blocks, where A set of predefined anchor boxes are set on the feature map of each original image block in the original image blocks;

[0079] The confidence calculation submodule is used to: For each of the feature maps of the original image blocks in the original image blocks, for each of the predefined anchor boxes in the set of predefined anchor boxes on the feature map, the region generation network of the screening module of the improved CLIPSelf model is used to obtain the anchor box confidence and the regression parameters for adjusting the anchor box position and size;

[0080] The confidence optimization submodule is used to: For each original image block in the original image blocks, according to the anchor frame confidence of each predefined anchor frame in a set of predefined anchor frames on the feature map, the non-maximum suppression method is used to filter out the predefined anchor frames whose overlap exceeds the preset overlap threshold, and the predefined anchor frame that is most likely to contain the target is obtained and its confidence is used as the confidence of the corresponding original image block.

[0081] In one embodiment, the confidence screening submodule can be specifically used to: The original image is divided into blocks according to The confidence of the predefined anchor box that is most likely to contain the target corresponding to each original image block in the original image blocks is The original image blocks are sorted from high to low, and the first The original image blocks are used as multiple image blocks that meet the preset confidence range.

[0082] In one embodiment, the training module can be used to: The original image is replaced by blocks The original image is divided into blocks and trained to obtain the improved CLIPSelf model.

[0083] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the adaptive image segmentation method, which includes:

[0084] Get the training image, where the length and width of the training image are , and the training image contains the target to be identified;

[0085] According to the training image, the segmentation module of the improved CLIPSelf model is used to segment the training image into a plurality of original image blocks by using a preset segmentation rule;

[0086] According to the plurality of original image blocks, a screening module of the improved CLIPSelf model is used to screen the plurality of original image blocks to obtain a plurality of image blocks that meet a preset confidence range by using preset screening rules;

[0087] Multiple image blocks that meet the preset confidence range are used to replace multiple original image blocks, and the improved CLIPSelf model is obtained through training.

[0088] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0089] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the adaptive image segmentation method provided by the above methods, the method comprising:

[0090] Get the training image, where the length and width of the training image are , and the training image contains the target to be identified;

[0091] According to the training image, the segmentation module of the improved CLIPSelf model is used to segment the training image into a plurality of original image blocks by using a preset segmentation rule;

[0092] According to the plurality of original image blocks, a screening module of the improved CLIPSelf model is used to screen the plurality of original image blocks to obtain a plurality of image blocks that meet a preset confidence range by using preset screening rules;

[0093] Multiple image blocks that meet the preset confidence range are used to replace multiple original image blocks, and the improved CLIPSelf model is obtained through training.

[0094] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the adaptive image segmentation method provided by the above methods, the method comprising:

[0095] Get the training image, where the length and width of the training image are , and the training image contains the target to be identified;

[0096] According to the training image, the segmentation module of the improved CLIPSelf model is used to segment the training image into a plurality of original image blocks by using a preset segmentation rule;

[0097] According to the plurality of original image blocks, a screening module of the improved CLIPSelf model is used to screen the plurality of original image blocks to obtain a plurality of image blocks that meet a preset confidence range by using preset screening rules;

[0098] Multiple image blocks that meet the preset confidence range are used to replace multiple original image blocks, and the improved CLIPSelf model is obtained through training.

[0099] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0100] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An adaptive image segmentation method, characterized in that: include: Get the training image, where the length and width of the training image are , and the training image contains the target to be identified; According to the training image, the segmentation module of the improved CLIPSelf model is used to segment the training image into a plurality of original image blocks by using a preset segmentation rule; According to the plurality of original image blocks, a screening module of the improved CLIPSelf model is used to screen the plurality of original image blocks to obtain a plurality of image blocks that meet a preset confidence range by using preset screening rules; Replacing multiple original image blocks with multiple image blocks that meet a preset confidence range, and training to obtain an improved CLIPSelf model; Wherein, according to the training image, the segmentation module of the improved CLIPSelf model is used to segment the training image into a plurality of original image blocks by using a preset segmentation rule, including: According to the training image, the segmentation module of the improved CLIPSelf model is used to segment the training image into OK Column, get The original image is divided into blocks, where ; according to The original image is divided into blocks, and the segmentation module of the improved CLIPSelf model is used to obtain the improved CLIPSelf model to achieve global understanding of the image using the preset segmentation rules. The original image is divided into blocks and the improved CLIPSelf model is used to realize local understanding of the image The original image is divided into blocks; The preset block rules include: when is set to , that is, when the improved CLIPSelf model is expected to achieve global understanding of the image, according to The original image is divided into blocks and the segmentation module of the improved CLIPSelf model is used to obtain The original image is divided into blocks, where ; when is set to or , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, we get The original image is divided into blocks, where ; when is set to , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, the non-edge intersection in the training image is taken as the center, and the The length and width are The new original image blocks will be The original image is divided into blocks and The new original image is integrated into blocks, and we get The original image is divided into blocks, where ; The screening module of the improved CLIPSelf model includes a convolutional neural network and a region generation network. According to the plurality of original image blocks, the screening module of the improved CLIPSelf model uses preset screening rules to screen out a plurality of image blocks that meet a preset confidence range from the plurality of original image blocks, including: when is set to , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, the convolutional neural network and region generation network of the screening module of the improved CLIPSelf model are used to obtain The confidence of each original image block in the original image blocks; according to The confidence of each original image block in the original image blocks is The original image blocks are sorted from high to low, and the first original image blocks as multiple image blocks that meet a preset confidence range; Among them, the is set to , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, the convolutional neural network and region generation network of the screening module of the improved CLIPSelf model are used to obtain The confidence of each original image block in the original image blocks include: when is set to , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, according to Each of the original image blocks is obtained by passing the convolutional neural network of the screening module of the improved CLIPSelf model. The feature map of each original image block in the original image blocks, where A set of predefined anchor boxes are set on the feature map of each original image block in the original image blocks; for For each of the feature maps of the original image blocks in the original image blocks, for each of the predefined anchor boxes in the set of predefined anchor boxes on the feature map, the region generation network of the screening module of the improved CLIPSelf model is used to obtain the anchor box confidence and the regression parameters for adjusting the anchor box position and size; for For each original image block in the original image blocks, according to the anchor frame confidence of each predefined anchor frame in a set of predefined anchor frames on the feature map, the non-maximum suppression method is used to filter out the predefined anchor frames whose overlap exceeds the preset overlap threshold, and the predefined anchor frame that is most likely to contain the target is obtained and its confidence is used as the confidence of the corresponding original image block.

2. The adaptive image segmentation method according to claim 1, characterized in that: The basis The confidence of each original image block in the original image blocks is The original image blocks are sorted from high to low, and the first The original image blocks are used as multiple image blocks that meet the preset confidence range, including: for The original image is divided into blocks according to The confidence of the predefined anchor box that is most likely to contain the target for each original image block in the original image blocks is The original image blocks are sorted from high to low, and the first The original image blocks are used as multiple image blocks that meet the preset confidence range.

3. The adaptive image segmentation method according to claim 2, characterized in that: The method of replacing a plurality of original image blocks with a plurality of image blocks that meet a preset confidence range and training to obtain an improved CLIPSelf model comprises: Will The original image is replaced by blocks The original image is divided into blocks and trained to obtain the improved CLIPSelf model.

4. An adaptive image segmentation system, characterized in that: include: The image acquisition module is used to: acquire a training image, wherein the length and width of the training image are respectively , and the training image contains the target to be identified; A segmentation module is used to: according to the training image, divide the training image into a plurality of original image blocks by using the segmentation module of the improved CLIPSelf model and a preset block rule; A screening module is used to: according to a plurality of original image blocks, through the screening module of the improved CLIPSelf model, using preset screening rules, screen out a plurality of image blocks that meet a preset confidence range from the plurality of original image blocks; A training module, used for: replacing a plurality of original image blocks with a plurality of image blocks that meet a preset confidence range, and training to obtain an improved CLIPSelf model; The segmentation module includes: The first segmentation module is used to: divide the training image into OK Column, get The original image is divided into blocks, where ; The second cutting molecular module is used to: The original image is divided into blocks, and the segmentation module of the improved CLIPSelf model is used to obtain the improved CLIPSelf model to achieve global understanding of the image using the preset segmentation rules. The original image is divided into blocks and the improved CLIPSelf model is used to realize local understanding of the image The original image is divided into blocks; The preset block rules include: when is set to , that is, when the improved CLIPSelf model is expected to achieve global understanding of the image, according to The original image is divided into blocks and the segmentation module of the improved CLIPSelf model is used to obtain The original image is divided into blocks, where ; when is set to or , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, we get The original image is divided into blocks, where ; when is set to , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, the non-edge intersection in the training image is taken as the center, and the The length and width are The new original image blocks will be The original image is divided into blocks and The new original image is integrated into blocks, and we get The original image is divided into blocks, where ; Among them, the screening module of the improved CLIPSelf model includes a convolutional neural network and a region generation network, and the screening module includes: The confidence obtaining submodule is used for: is set to , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, the convolutional neural network and region generation network of the screening module of the improved CLIPSelf model are used to obtain The confidence of each original image block in the original image blocks; The confidence screening submodule is used to: The confidence of each original image block in the original image blocks ,Will The original image blocks are sorted from high to low, and the first original image blocks as multiple image blocks that meet a preset confidence range; Among them, the confidence obtaining submodule includes: The feature map is obtained as a submodule, which is used for: is set to , that is, when the improved CLIPSelf model is expected to achieve local understanding of the image, according to Each of the original image blocks is obtained by passing the convolutional neural network of the screening module of the improved CLIPSelf model. The feature map of each original image block in the original image blocks, where A set of predefined anchor boxes are set on the feature map of each original image block in the original image blocks; The confidence calculation submodule is used to: For each of the feature maps of the original image blocks in the original image blocks, for each of the predefined anchor boxes in the set of predefined anchor boxes on the feature map, the region generation network of the screening module of the improved CLIPSelf model is used to obtain the anchor box confidence and the regression parameters for adjusting the anchor box position and size; The confidence optimization submodule is used to: For each original image block in the original image blocks, according to the anchor frame confidence of each predefined anchor frame in a set of predefined anchor frames on the feature map, the non-maximum suppression method is used to filter out the predefined anchor frames whose overlap exceeds the preset overlap threshold, and the predefined anchor frame that is most likely to contain the target is obtained and its confidence is used as the confidence of the corresponding original image block.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the adaptive image segmentation method according to any one of claims 1 to 3 is implemented.

6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the adaptive image segmentation method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Object detection network training method and device

    CN109409517A

  • Image processing method and device

    CN111178445A