Track detection method and system based on segmentation model and single sample learning
By using a segmentation model and single-sample learning approach, and leveraging a segment-anything segmentation model and a self-attention mechanism to detect intrusion targets on railway tracks, the problem of low detection accuracy was solved, achieving higher accuracy and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LI CHUANG ZHI HENG ELECTRONICS TECH CO LTD
- Filing Date
- 2023-07-21
- Publication Date
- 2026-04-17
AI Technical Summary
The detection accuracy of intrusion targets on railway tracks is low, and is affected by factors such as lighting, weather, and image noise, leading to false detections and missed detections.
A segmentation model-based and single-sample learning approach is adopted. By acquiring images containing orbital features, a segmentation mask is generated using a pre-trained segment-anything segmentation model. Features are then fused using self-attention and mutual attention mechanisms, and single-sample learning is performed to detect orbital parameters and intrusion targets.
It improved the detection accuracy of intruding targets on the track, increased the accuracy of the segmentation model by 5%, and improved computational efficiency by 35%.
Smart Images

Figure CN116844127B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer vision, and in particular to a method and system for track detection based on segmentation models and single-sample learning. Background Technology
[0002] Semantic segmentation is an important task in computer vision. By assigning each pixel in an image to a specific semantic category, accurate identification and localization of objects in the image can be achieved. In the field of railway transportation, intrusion targets on railway tracks pose a significant safety hazard. If semantic segmentation can be performed on railway track images, intrusion targets on the railway can be effectively detected, thus ensuring the safety of railway transportation.
[0003] Semantic segmentation of vehicle track images can be performed using various methods, such as pixel-level classification using deep learning models. However, due to the unique properties of vehicle track images, such as variations in lighting, weather conditions, and image noise, segmentation becomes challenging.
[0004] Image processing methods, such as threshold-based binarization, edge detection, and morphological processing, are used to process vehicle track images. However, the effectiveness of these methods is affected by multiple factors, such as lighting, weather, and image noise, which can easily lead to false positives and false negatives, resulting in low detection accuracy of intrusion targets on the track. Summary of the Invention
[0005] This application provides a method and system for track detection based on segmentation model and single-sample learning to solve the problem of low detection accuracy of intrusive targets on tracks.
[0006] Firstly, this application provides a trajectory detection method based on a segmentation model and single-sample learning, including:
[0007] Obtain the first image to be predicted that contains orbital features;
[0008] The first image to be predicted is input into a pre-trained segmentation model to obtain a segmentation mask. The segmentation model is a segment-anything segmentation model.
[0009] Obtain first prediction information, wherein the first prediction information is feature information of a first preset image and / or a mask of the first preset image;
[0010] Obtain a second image to be predicted that contains orbital features;
[0011] Based on the segmentation mask and the first prediction information, single-sample learning is performed on the second image to be predicted to obtain the first target image;
[0012] The orbital parameters in the first target image are detected, including length parameters, width parameters, and intrusion target parameters.
[0013] Optionally, the first image to be predicted is input into a pre-trained segmentation model to obtain a segmentation mask, including:
[0014] Obtain feature points from the first image to be predicted to obtain point class features;
[0015] The orbital features of the second preset image and the point class features are input into the image decoder;
[0016] The orbital features and point class features of the second preset image are fused based on the self-attention mechanism and the mutual attention mechanism to obtain the fused feature map;
[0017] The fused feature map is input into a convolutional neural network, and the first mask is obtained by upsampling.
[0018] The fused feature map is input into an artificial neural network, and a second mask is obtained by determining pixel points.
[0019] A segmentation mask is generated, wherein the segmentation mask is the product of the first mask and the second mask.
[0020] Optionally, obtain first prediction information, including:
[0021] The first preset image is input into a convolutional neural network to obtain the feature information of the first preset image;
[0022] And / or,
[0023] The first preset image is pre-segmented to obtain a mask of the first preset image.
[0024] Optionally, detecting orbital parameters in the first target image includes:
[0025] Locate the two tracks on the first target image;
[0026] Compare the lengths and / or widths of the two described tracks;
[0027] If the length of the two tracks is greater than a length threshold, and / or the width of the two tracks is greater than a width threshold, then the first target image is marked as a first abnormal target image.
[0028] Optionally, the method further includes:
[0029] The first image to be predicted and the second image to be predicted are input into the segmentation model to obtain the intrusion target mask;
[0030] Compare the distance between the intrusion target mask and the segmentation mask;
[0031] If the distance is less than or equal to a preset distance threshold, the first image to be predicted and / or the second image to be predicted that segments the intrusion target mask will be marked as the second abnormal target image.
[0032] Optionally, detecting orbital parameters in the first target image includes:
[0033] The lengths of the two tracks on the first target image are compared to obtain a truncated track image, which is a segmented image of the track with the relatively shorter length among the two tracks.
[0034] Locate the truncation position of the truncated track image;
[0035] Dot-matrix feature marking is performed on the truncated position to obtain a dot-matrix marked image;
[0036] The dotted marker image is used to detect whether there is an intrusion target on the truncated track;
[0037] If an intrusion target exists on the truncated track, the first target image is marked as a first abnormal target image.
[0038] Optionally, detecting whether an intrusion target exists on the truncated track using the dotted marker image includes:
[0039] The dot-marked image is input into a pre-trained segmentation model to obtain a truncated track mask;
[0040] If an intrusion target mask exists within the truncated track mask, then an intrusion target exists on the truncated track.
[0041] Optionally, detecting whether an intrusion target exists on the truncated track using the dotted marker image further includes:
[0042] Based on the preset intrusion target mask and the second prediction information, single-sample learning is performed on the dot-marked image to obtain the second target image, where the second prediction information is the feature information of the preset intrusion target mask;
[0043] The orbital parameters are used to detect whether the intrusion target mask exists in the second target image;
[0044] If the intrusion target mask is present in the truncated track mask, then there is an intrusion target on the truncated track.
[0045] Secondly, this application provides a trajectory detection system based on a segmentation model and single-sample learning, comprising: an acquisition unit, a processing unit, and a detection unit, wherein the acquisition unit is used to acquire a first image to be predicted containing trajectory features; and is also used to acquire a second image to be predicted containing trajectory features; and to acquire first prediction information, wherein the first prediction information is feature information of a first preset image and / or a mask of the first preset image; the processing unit is used to input the first image to be predicted into a pre-trained segmentation model to obtain a segmentation mask, wherein the segmentation model is a segment-anything segmentation model; and is also used to perform single-sample learning on the second image to be predicted based on the segmentation mask and the first prediction information to obtain a first target image; the detection unit is used to detect trajectory parameters in the first target image, wherein the trajectory parameters include length parameters, width parameters, and intrusion target parameters.
[0046] Optionally, the detection unit is further configured to locate two tracks on the first target image and compare the length and / or width of the two tracks. If the length of the two tracks is greater than a length threshold and / or the width of the two tracks is greater than a width threshold, then the first target image is marked as a first abnormal target image.
[0047] As can be seen from the above technical solutions, this application provides a track detection method and system based on segmentation model and single-sample learning. The method first acquires a first image to be predicted containing track features, then inputs the first image to be predicted into a pre-trained segmentation model to obtain a segmentation mask; then acquires a second image to be predicted containing track features and acquires first prediction information; based on the segmentation mask and the first prediction information, performs single-sample learning on the second image to be predicted to obtain a first target image; finally, it determines whether there is an intrusion target on the track by detecting the track parameters in the first target image, wherein the track parameters include length parameters, width parameters, and intrusion target parameters, so as to solve the problem of low detection accuracy of intrusion targets on the track. Attached Figure Description
[0048] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 The flowchart shows a trajectory detection method based on segmentation model and single-sample learning.
[0050] Figure 2 This is a schematic diagram of the segmentation model structure;
[0051] Figure 3 This is a schematic diagram of the first image to be predicted;
[0052] Figure 4 for Figure 3 The segmentation mask;
[0053] Figure 5 This is a schematic diagram of the second image to be predicted;
[0054] Figure 6 This is a schematic diagram of the first target image. Detailed Implementation
[0055] The embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described below do not represent all embodiments consistent with this application. They are merely examples of systems and methods consistent with some aspects of this application as detailed in the claims.
[0056] In the field of railway transportation, obstacles on railways can pose safety hazards, such as those caused by humans or animals. Detecting the tracks and potential obstacles can increase railway safety. In some embodiments, edge detection, morphological processing, and analytical models are used to detect obstacles in railway images. However, factors such as lighting, weather, and image noise can lead to low detection accuracy.
[0057] To improve the accuracy of intrusion target detection, see [link / reference]. Figure 1 This application provides a trajectory detection method based on a segmentation model and single-sample learning in some embodiments, including:
[0058] S100: Obtain the first image to be predicted containing orbital features.
[0059] See Figure 3 , Figure 3 This is a schematic diagram of the first image to be predicted. It can be understood that the first image to be predicted can be an image captured by an industrial camera, or it can be a video recording from which one frame is selected.
[0060] The first image to be predicted can contain one railway, i.e., two tracks; or it can contain multiple railways, i.e., multiple railways consisting of two tracks.
[0061] S200: Input the first image to be predicted into the pre-trained segmentation model to obtain the segmentation mask.
[0062] Among them, the segmentation model is the segment-anything segmentation model. Compared with other segmentation models, the segment-anything segmentation model has better generalization ability, which can improve the accuracy of segmentation and better adapt to the problems of data changes and sample shortage in real application scenarios.
[0063] See Figure 2 The segment-anything segmentation model comprises an image decoder, a feature encoder, and a decoder. The image decoder is based on a scalable pre-training method, suitable for processing high-resolution input images. The feature encoder includes two sets of features: sparse and dense features. Sparse features consist of point class features, bounding box features, and text features. Dense features are mask features, which represent points and bounding boxes using positional masks. The learned embeddings for each feature type, free-form text, and existing text from the multimodal model CLIP are summed. Dense features are embedded using convolution and element-wise summed using image embeddings. The decoder maps image embeddings, feature embeddings, and output features to mask features.
[0064] To obtain the segmentation mask, feature points of the first image to be predicted are first acquired to obtain point class features. Then, the orbital features and point class features of the second preset image are input into the image decoder. The orbital features and point class features of the second preset image are fused based on the self-attention mechanism and the mutual attention mechanism to obtain a fused feature map. The fused feature map is then input into the convolutional neural network and the artificial neural network respectively. The convolutional neural network uses upsampling to obtain the first mask, and the artificial neural network uses pixels to obtain the second mask. Finally, the segmentation mask is generated by multiplying the first mask and the second mask.
[0065] See Figure 2 Alternatively, the features of the first image to be predicted can be obtained through a segmentation model. The first image to be predicted can be input into an image encoder, which can then obtain the features of the first image to be predicted and further obtain point class features.
[0066] See Figure 4 , Figure 4 for Figure 3 The segmentation mask, by comparison Figure 3 and Figure 4 It can be seen that, Figure 4 Only Figure 3 Central Figure 3 The two tracks in the middle are segmented because, when selecting track features and point class features from the second preset image, Figure 3 Other orbital feature points were discarded, and only those located in the middle were selected. Figure 3 The two tracks in the middle position are thus used to determine the segmentation mask for the first image to be predicted, which is the two tracks in the middle.
[0067] For an image containing tracks, there may be multiple tracks. Two or more tracks can be selected using point class features and track features of a second preset image, which can then be used to generate a first segmentation mask, a second segmentation mask, and so on up to the nth segmentation mask. It is understood that each segmentation mask includes only two tracks. However, due to limitations in image size or other factors, the first image to be predicted may contain three tracks. For example, the three tracks are track 1, track 2, and track 3, where track 1 and track 2 belong to railway 1, and track 3 belongs to railway 2. If the other track of railway 2 was not captured during the acquisition of the first image to be predicted, then track 3 is discarded during the generation of the fused feature map, and only the segmentation mask for track 1 is generated.
[0068] S300: Obtain the first prediction information.
[0069] The first prediction information can be the feature information of the first preset image, which can be obtained by inputting the first preset image into a convolutional neural network. It is understandable that in a language system, various objects are classified, and the feature information of the first preset image is the information describing the trajectory.
[0070] The first prediction information can also be a mask of the first preset image, which can be obtained by pre-segmenting the first preset image.
[0071] The first prediction information can also be a combination of the feature information of the first preset image and the mask of the first preset image, using the feature information and the mask together as the first prediction information.
[0072] S400: Obtain the second image to be predicted, which contains orbital features.
[0073] Real-time images of the railway in this area were captured using industrial cameras. (See attached image.) Figure 5 , Figure 5 This is a schematic diagram of the second image to be predicted. Figure 5 There are pedestrians on the tracks. Pedestrians on the tracks not only affect the movement of vehicles, but also put pedestrians in dangerous situations.
[0074] Regarding the first image to be predicted and the second image to be predicted, in this embodiment, the first image to be predicted can be the image obtained during the first prediction, and the second image to be predicted can be the image obtained at other times besides the first time. For example, if the first image to be predicted is obtained at 7:00 AM, then the second image to be predicted is the image obtained after 7:00 AM. For example, the first image to be predicted is input into the segmentation model to obtain the segmentation mask. Then, the images obtained after 7:00 AM do not go through the segmentation model, but use the segmentation mask as supervision for single-sample learning.
[0075] To ensure the safe operation of vehicles on the track by detecting intrusion targets, real-time monitoring is required. The detection frequency is relatively high, and as the frequency increases, efficiency may decrease while processing a large number of images. To improve computational efficiency, the process of obtaining the first target image can be decomposed into multiple stages. For example, this can be decomposed by setting the time. The time can be set to four hours, and the day can be divided into six stages. At midnight, the first image to be predicted is obtained. The first stage is from midnight to 4:00. The first image to be predicted is obtained only once at midnight. The images to be predicted obtained at other times are the second images to be predicted. The second stage begins at 4:00. At the same time as the first stage ends at 4:00, the first image to be predicted in the second stage is obtained.
[0076] Understandably, the calculation can be broken down based on the amount of computation and the time period. For example, the probability of an intrusion target appearing on the track is lower at night or in the early morning, so the calculation process is faster. In some embodiments, the time period of the night or early morning phase can be extended. The probability of an intrusion target appearing during the day is higher, so the time period of the daytime phase can be reduced to improve computational efficiency.
[0077] S500: Based on the segmentation mask and the first prediction information, perform single-sample learning on the second image to be predicted to obtain the first target image.
[0078] For example: in order to detect Figure 5 Pedestrian targets existing in the scene, utilizing Figure 4 And the first prediction information, will Figure 5 To perform single-sample learning, see [link / reference]. Figure 6 , Figure 6 This is a schematic diagram of the first target image. Figure 5 After performing single-sample learning, an interruption appears on the left side of the track in the first target image, meaning that the interruption could be the location of a pedestrian. It's understandable that the presence of a pedestrian can be detected not only by the interruption location but also by the width of the track.
[0079] S600: Detects orbital parameters in the first target image.
[0080] The detection can be performed by setting the order of the track parameters. In this embodiment, the length parameter, width parameter, and intrusion target parameter can be detected separately.
[0081] For length parameter detection, the two tracks on the first target image can be located first, and their lengths compared. If the lengths of the two tracks are greater than a length threshold, the first target image is marked as the first abnormal target image; for example, see again. Figure 6Position the left and right tracks, defining the left track as 2m and the right track as 3m. The difference between the left and right tracks is 1m. If the length threshold is 0.5m, then if the difference between the left and right tracks is greater than the length threshold, the track can be marked. Figure 6 This is the first abnormal target image.
[0082] Understandably, further detection of the first anomalous target image can be performed to make the detection results more accurate. By comparing the lengths of the two tracks in the first target image, a truncated track image is obtained, which is a segmented image of the shorter track among the two tracks. The truncation position of the truncated track image is then located, and point-based feature labeling is performed on the truncation position to obtain a point-labeled image. The point-labeled image is used to detect whether an intrusion target exists on the truncated track; if an intrusion target exists on the truncated track, the first target image is labeled as the first anomalous target image.
[0083] For example, the left track can be used as a truncated track image, and the position where the left track is interrupted can be marked with point features to obtain a point-marked image. The point-marked image can be an image that magnifies the position where the track is interrupted, or it can be an image that contains two tracks. Then, the presence of an intrusion target can be detected in the point-marked image.
[0084] It is understood that the intrusion targets provided in this embodiment include, but are not limited to, people, animals, etc., and may also be other objects that may obstruct the train's movement.
[0085] In some embodiments, the dot-marked image can also be input into a pre-trained segmentation model to obtain a truncated track mask. If an intrusion target mask exists in the truncated track mask, then an intrusion target exists on the truncated track. It is understood that the truncated track mask may include the track and / or the intrusion target.
[0086] Furthermore, based on the preset intrusion target mask and the second prediction information, single-sample learning is performed on the dot-marked image to obtain the second target image. The second prediction information is the feature information of the preset intrusion target mask. If there is an intrusion target mask in the truncated track mask, then there is an intrusion target on the truncated track.
[0087] For width parameter detection, the two tracks on the first target image can be located first, and their widths compared. If the difference in width between the two tracks is greater than a width threshold, the first target image is marked as the first anomalous target image. For example, the width of track 1 is 0.5m, and the width of a part of track 2 is 1m. The width threshold is 0.2m. If the difference between track 1 and track 2 is greater than the width threshold, it indicates that the 1m wide area of track 2 is anomalous and can be defined as an anomalous region. This anomalous region may be the result of the intrusion target's posture. To determine the degree of influence of the intrusion target on the track environment, the specific situation of the intrusion target can be further identified in the anomalous region, i.e., further analysis of the anomalous region. Alternatively, the first target image can be input into a segmentation model to segment the image with the anomalous region of track 2, and then prediction information can be obtained. This prediction information includes the feature information of the intrusion target and the feature information of the track. The prediction information is used as supervision information to perform single-sample learning on the image with the anomalous region of track 2, output the image, and then perform intrusion target detection on the output image to further identify whether there is an intrusion target in the anomalous region.
[0088] During width parameter detection, there may be differences in the width of one or more tracks. To achieve more accurate width parameter detection, in some embodiments, after locating the two tracks on the first target image, the two tracks are divided into different regions. This division can be based on the track length on the first target image. The two tracks in different regions are then compared separately. For example, if the two tracks are divided into a first region, a second region, and a third region, the width difference between the two tracks in each of these regions is compared. If the width difference in each of these regions is greater than a width threshold, the first target image is marked as a first abnormal target image. Again, for example, if the two tracks are divided into a first region, a second region, and a third region, and the width difference between the two tracks in each of these regions is compared, if the width difference in only one region is greater than a width threshold, the region with the width difference greater than the threshold is cropped, and the cropped region is marked as a first abnormal target image.
[0089] In some embodiments, for intrusion target parameter detection, after acquiring the first image to be predicted and the second image to be predicted, the first image to be predicted and the second image to be predicted are first input into a segmentation model to obtain intrusion target masks for the first image to be predicted and the second image to be predicted. Then, the first image to be predicted and the second image to be predicted are input into the segmentation model to obtain segmentation masks for the first image to be predicted and the second image to be predicted. The intrusion target mask and the segmentation mask of the first image to be predicted are compared to obtain a first distance. If the first distance is less than or equal to a preset distance threshold, the first image to be predicted is marked as a second abnormal target image. The intrusion target mask and the segmentation mask of the second image to be predicted are compared to obtain a second distance. If the second distance is less than or equal to a preset distance threshold, the first image to be predicted is marked as a second abnormal target image. Intrusion target parameter detection can directly detect intrusion targets in the acquired images to be predicted, more accurately detecting whether an intrusion target exists in the images to be predicted.
[0090] It is understood that the segmentation model provided in this embodiment can be used regardless of which track parameter is used for detection. In some embodiments, an independent model can also be used for the detection of intrusion target parameters, such as the CoralBodyPix model. The CoralBodyPix model can perform image segmentation on different parts of the intrusion target. For example, when only the lower half of a pedestrian's body is on the track, the CoralBodyPix model can perform image segmentation on the lower half of the human body to obtain leg images, etc.
[0091] In this embodiment, the segmentation mask output by the segmentation model is used as supervision for single-sample learning, and further prompts are provided through prediction information to output the target image. In practical applications, more complex tasks can be decomposed into multiple stages. In each stage, the segmentation mask of the previous stage can be used as supervision for single-sample learning, thereby improving the accuracy and efficiency of the segmentation model.
[0092] In terms of accuracy, the detection method using segmentation mask as supervision improves accuracy by 5% compared to the method without segmentation mask as supervision; in terms of efficiency, the model can improve efficiency by 35% because it can decompose complex tasks and complete segmentation faster through the segmentation model.
[0093] Based on the above-described orbit detection method based on segmentation models and single-sample learning, some embodiments of this application also provide an orbit detection system based on segmentation models and single-sample learning, comprising: an acquisition unit, a processing unit, and a detection unit, wherein...
[0094] The acquisition unit is used to acquire a first image to be predicted containing orbital features; it is also used to acquire a second image to be predicted containing orbital features; and to acquire first prediction information, wherein the first prediction information is feature information of a first preset image and / or a mask of the first preset image.
[0095] The processing unit is used to input the first image to be predicted into a pre-trained segmentation model to obtain a segmentation mask, wherein the segmentation model is a segment-anything segmentation model; it is also used to perform single-sample learning on the second image to be predicted based on the segmentation mask and the first prediction information to obtain the first target image.
[0096] The detection unit is used to detect the trajectory parameters in the first target image. The trajectory parameters include length parameters, width parameters, and intrusion target parameters.
[0097] The detection unit is also used to locate two tracks on the first target image and compare the length and / or width of the two tracks. If the length of the two tracks is greater than the length threshold and / or the width of the two tracks is greater than the width threshold, then the first target image is marked as the first abnormal target image.
[0098] The system may also include an alarm unit connected to the detection unit. The alarm unit is used to detect whether the trajectory parameters of the first target image are abnormal according to the detection unit. If the trajectory parameters are abnormal, the alarm unit will issue an alarm to achieve the effect of warning.
[0099] This application provides a track detection method and system based on a segmentation model and single-sample learning. The method first acquires a first image to be predicted containing track features, then inputs the first image to be predicted into a pre-trained segmentation model to obtain a segmentation mask; then acquires a second image to be predicted containing track features and obtains first prediction information; based on the segmentation mask and the first prediction information, performs single-sample learning on the second image to be predicted to obtain a first target image; finally, it determines whether there is an intrusion target on the track by detecting the track parameters in the first target image, wherein the track parameters include length parameters, width parameters, and intrusion target parameters, in order to solve the problem of low detection accuracy of pedestrians on the track.
[0100] Similar parts between the embodiments provided in this application can be referred to mutually. The specific implementation methods provided above are only a few examples under the overall concept of this application and do not constitute a limitation on the scope of protection of this application. For those skilled in the art, any other implementation methods extended from the solution of this application without creative effort shall fall within the scope of protection of this application.
Claims
1. A trajectory detection method based on segmentation model and single-sample learning, characterized in that, include: Obtain the first image to be predicted that contains orbital features; The first image to be predicted is input into a pre-trained segmentation model to obtain a segmentation mask. The segmentation model is a segment-anything segmentation model. Obtain first prediction information, wherein the first prediction information is feature information of a first preset image and / or a mask of the first preset image; Obtain a second image to be predicted that contains orbital features; Based on the segmentation mask and the first prediction information, the second image to be predicted is subjected to single-sample learning to obtain the first target image; wherein, in the single-sample learning of the second image to be predicted, the segmentation mask serves as supervision for the single-sample learning, and the first prediction information serves as a prompt, thereby obtaining the first target image; The orbital parameters in the first target image are detected, including length parameters, width parameters, and intrusion target parameters.
2. The trajectory detection method based on segmentation model and single-sample learning according to claim 1, characterized in that, The first image to be predicted is input into a pre-trained segmentation model to obtain a segmentation mask, including: Obtain feature points from the first image to be predicted to obtain point class features; The orbital features of the second preset image and the point class features are input into the image decoder; The orbital features and point class features of the second preset image are fused based on the self-attention mechanism and the mutual attention mechanism to obtain the fused feature map; The fused feature map is input into a convolutional neural network, and the first mask is obtained by upsampling. The fused feature map is input into an artificial neural network, and a second mask is obtained by determining pixel points. A segmentation mask is generated, wherein the segmentation mask is the product of the first mask and the second mask.
3. The trajectory detection method based on segmentation model and single-sample learning according to claim 1, characterized in that, Obtain first prediction information, including, The first preset image is input into a convolutional neural network to obtain the feature information of the first preset image; And / or, The first preset image is pre-segmented to obtain a mask of the first preset image.
4. The trajectory detection method based on segmentation model and single-sample learning according to claim 1, characterized in that, Detecting orbital parameters in the first target image includes: Locate the two tracks on the first target image; Compare the lengths and / or widths of the two described tracks; If the length of the two tracks is greater than a length threshold, and / or the width of the two tracks is greater than a width threshold, then the first target image is marked as a first abnormal target image.
5. The trajectory detection method based on segmentation model and single-sample learning according to claim 1, characterized in that, The method further includes: The first image to be predicted and the second image to be predicted are input into the segmentation model to obtain the intrusion target mask; Compare the distance between the intrusion target mask and the segmentation mask; If the distance is less than or equal to a preset distance threshold, the first image to be predicted and / or the second image to be predicted that segments the intrusion target mask will be marked as the second abnormal target image.
6. The trajectory detection method based on segmentation model and single-sample learning according to claim 1, characterized in that, Detecting orbital parameters in the first target image includes: Locate the two tracks on the first target image; The lengths of the two tracks on the first target image are compared to obtain a truncated track image, which is a segmented image of the track with the relatively shorter length among the two tracks. Locate the truncation position of the truncated track image; Dot-matrix feature marking is performed on the truncated position to obtain a dot-matrix marked image; The dotted marker image is used to detect whether there is an intrusion target on the truncated track; If an intrusion target exists on the truncated track, the first target image is marked as a first abnormal target image.
7. The trajectory detection method based on segmentation model and single-sample learning according to claim 6, characterized in that, Detecting the presence of an intrusion target on the truncated track using the dotted marker image includes: The dot-marked image is input into a pre-trained segmentation model to obtain a truncated track mask; If an intrusion target mask exists within the truncated track mask, then an intrusion target exists on the truncated track.
8. The orbit detection method based on segmentation model and single-sample learning according to claim 7, characterized in that, Detecting whether an intrusion target exists on the truncated track using the dotted marked image further includes: Based on the preset intrusion target mask and the second prediction information, single-sample learning is performed on the dot-marked image to obtain the second target image, where the second prediction information is the feature information of the preset intrusion target mask; The orbital parameters are used to detect whether the intrusion target mask exists in the second target image; If the intrusion target mask is present in the truncated track mask, then there is an intrusion target on the truncated track.
9. A trajectory detection system based on segmentation model and single-sample learning, characterized in that, The orbit detection method based on segmentation model and single-sample learning as described in any one of claims 1-8 includes: The acquisition unit is configured to acquire a first image to be predicted containing orbital features; to acquire a second image to be predicted containing orbital features; and to acquire first prediction information, wherein the first prediction information is feature information of a first preset image and / or a mask of the first preset image. The processing unit is configured to input the first image to be predicted into a pre-trained segmentation model to obtain a segmentation mask, wherein the segmentation model is a segment-anything segmentation model; and to perform single-sample learning on the second image to be predicted based on the segmentation mask and the first prediction information to obtain a first target image; wherein, in performing single-sample learning on the second image to be predicted, the segmentation mask serves as supervision for single-sample learning, and the first prediction information serves as a prompt, thereby obtaining the first target image; The detection unit is used to detect the trajectory parameters in the first target image, the trajectory parameters including length parameters, width parameters, and intrusion target parameters.
10. The trajectory detection system based on segmentation model and single-sample learning according to claim 9, characterized in that, The detection unit is further configured to locate two tracks on the first target image and compare the length and / or width of the two tracks. If the length of the two tracks is greater than a length threshold and / or the width of the two tracks is greater than a width threshold, then the first target image is marked as a first abnormal target image.
Citation Information
Patent Citations
Migration model training method and device and fault detection method and device
CN111612035A
Track component inspection method and device, computer equipment and storage medium
CN113361354A