Mulching film hidden danger intelligent detection method based on deep learning
By adopting a deep learning-based intelligent detection method for potential plastic film hazards, the problems of insufficient accuracy in matching geographical location information and low detection efficiency of large-size images in UAV inspections have been solved, achieving efficient, accurate positioning and effective remediation.
Patent Information
- Application Number
- CN202511239522.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-01
- Publication Date
- 2025-11-18
AI Technical Summary
In existing drone inspection technologies, the accuracy of geographic location information matching is insufficient and the detection efficiency of large-size images is low, resulting in large errors in the location information of the detection results and waste of computing resources, making it difficult to achieve efficient and accurate detection of potential hazards related to plastic film mulch.
A deep learning-based intelligent detection method for plastic film hazards is adopted. The method combines format conversion and sub-block segmentation with geographic coordinate information for detection. The deep learning model is trained to perform block detection by utilizing dynamic overlapping areas and intelligent edge discrimination mechanism. Finally, lossless mapping from pixel coordinates to actual geographic coordinates is achieved through TIF format geographic coordinate information.
It significantly reduces the computational resource consumption of large-size image processing, improves detection accuracy and efficiency, enables accurate positioning and efficient rectification of detection results, and enhances the application value of UAV inspection data.
Smart Images

Figure CN120976807A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a hidden danger detection method, in particular to a ground film hidden danger intelligent block detection method based on deep learning. BACKGROUND
[0002] Railway along the line of external environment safety hidden trouble investigation is one of the core tasks of guaranteeing railway transport safety, and the control of light floating objects such as ground film is directly related to the prevention and control efficiency of the risk of contacting the overhead line with foreign matter. In recent years, with its efficient operation capacity, high safety and precise detection advantage, unmanned aerial vehicle has become an important technical means for hidden trouble inspection along the railway, and has shown significant effect in engineering practice. However, the application of existing unmanned aerial vehicle inspection data still has key bottlenecks: on the one hand, the current technology mainly focuses on the theoretical research of image detection on flight data, and the efficient integration and application of geographic location information have not been fully valued; on the other hand, the traditional detection method has obvious limitations in position accuracy and data utilization efficiency.
[0003] Specifically, the deficiencies of the existing technology mainly lie in the following two aspects:
[0004] 1. Insufficient matching accuracy of geographic location information: the images used in the current detection process are mostly in the format without geographic coordinates, and affected by factors such as unmanned aerial vehicle shooting angle and image distortion, the position information of the detection result has significant deviation from the actual geographic coordinates, which cannot effectively guide the operation personnel to quickly locate the ground film hidden danger position and timely dispose. In addition, the limitation of local image detection leads to partial target missing, which further aggravates the lack of geographic location information.
[0005] 2. Low detection efficiency of large size image: the existing intelligent detection mostly adopts direct detection method, which lacks block optimization strategy for large size image, and the training and inference process of deep learning model has large overhead of computing resources such as display memory, so the detection efficiency is low. Since the unmanned aerial vehicle inspection needs to ensure more than 70% of the aerial photography overlap rate, direct detection will cause a large number of repeated target false alarms, and it is difficult to balance detection accuracy and computing efficiency, which limits the practicability of the model in engineering scene.
[0006] Although the prior art has proposed multi-scale feature perception and intelligent identification system construction in the field of railway perimeter safety monitoring, its technical framework still takes ordinary image data as the core, does not fully integrate geographic coordinate information, and does not solve the engineering problem of large-size image block detection. For example, document [1] Zhu Liqiang, Xu Lizhi, Zhao Wenyu, et al. Multi-scale feature perception algorithm for railway perimeter intrusion targets [J]. China Railway Science, 2024, 45(01): 215-226. improves detection accuracy through multi-scale feature, but does not involve geographic information mapping mechanism; document [3] Fu Huojin, Shi Tianyun, Wang Rui, et al. Construction of intelligent identification system for Beijing-Zhangjiakou high-speed railway perimeter image based on deep learning [J]. Railway Transportation and Economy, 2022, 44(05): 64-72. Although a deep learning model is introduced, the image block strategy is not optimized, resulting in waste of computing resources and accumulation of edge detection errors.
[0007] In summary, there is an urgent need for an intelligent method that can deeply integrate geographic coordinate information and adapt to large-size image block detection to improve the utilization rate, detection accuracy and engineering applicability of unmanned aerial vehicle inspection data. SUMMARY
[0008] In order to solve the defects in the prior art, the present application discloses a kind of based on deep learning's ground membrane hidden danger intelligent detection method, and its technical scheme is as follows:
[0009] Step 1: format conversion is carried out on the original image collected by unmanned aerial vehicle;
[0010] Step 2: label the ground membrane hidden danger in the image after format conversion, and carry out sub-block segmentation and train a deep learning model;
[0011] Step 3: using the deep learning model trained to carry out intelligent block detection of ground membrane hidden danger.
[0012] The application also discloses a non-volatile storage medium, characterized in that the non-volatile storage medium comprises a stored program, wherein the program controls the device in which the non-volatile storage medium is located to execute the above method when running.
[0013] The application also discloses an electronic device, characterized in that it comprises a processor and a memory; the memory stores computer readable instructions, and the processor is used to run the computer readable instructions, wherein the computer readable instructions execute the above method when running.
[0014] Advantages
[0015] (1) Large size image high efficiency detection ability: the application reduces the consumption of computing resources in large size unmanned aerial vehicle image processing through innovative block detection strategy. By setting dynamic overlapping area and intelligent edge discrimination mechanism, the edge target missing detection problem caused by traditional block method is avoided, and the overall detection accuracy is improved, effectively solving the dual challenges of insufficient model generalization and low computational efficiency in large size image direct detection.
[0016] (2) Engineering advantage of geographic information fusion: deeply embedding the geographic coordinate information in TIF format into the whole process of intelligent detection of mulch, realizing the lossless mapping of pixel coordinates to actual geographic coordinates. Through dynamic analysis of projection parameters and accurate conversion of contour points, the detection results can be directly located to the specific geographic location along the railway, effectively improving the inspection efficiency, providing spatial reference for subsequent hidden danger treatment, and significantly improving the data application value.
[0017] Synergistic effect: the above two effects form a technical closed loop-the block strategy reduces the computational load, and the geographic information mapping improves the practicality of the results, finally realizing the synchronous optimization of detection accuracy, efficiency and engineering landing. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 It is a schematic diagram of the mulch hidden danger intelligent detection method based on deep learning of the application;
[0019] Figure 2 It is a TIF image diagram made by the application;
[0020] Figure 3 It is a mask diagram generated by the application;
[0021] Figure 4 It is a block detection flowchart diagram of the application;
[0022] Figure 5 It is a mask diagram generated by the application;
[0023] Figure 6 It is a splicing diagram of the application. DETAILED DESCRIPTION
[0024] The application discloses a mulch hidden danger intelligent detection method based on deep learning, comprising the following steps:
[0025] Step 1: format conversion is performed on the original image collected by the unmanned aerial vehicle;
[0026] (1) Referring to Figure 2 The original image obtained by unmanned aerial vehicle inspection and shooting is made into a TIF format image through a special software (such as OSGBLab), and the TIF image contains geographic coordinate information and related parameters.
[0027] (2) Convert the TIF image into a JPG format image and extract its geographic coordinate metadata.
[0028] Step 2: In the converted image, mark the potential hazards of plastic film mulching, perform sub-plot segmentation, and train the deep learning model;
[0029] (1) Use labelme software to annotate the location and shape of the mulch film hazard targets contained in the JPG image, and generate a JSON format annotation file with the same file name as the original TIF image;
[0030] (2) See Figure 3 As shown, based on the pixel coordinate information in the annotation file, a binary mask with the same size as the original TIF image is generated. The white area (pixel value 255) in the mask is the annotated area of potential plastic film hazard, and the black area (pixel value 0) is the background area.
[0031] (3) Perform sub-plot segmentation on the original TIF image and its corresponding mask, and train a deep learning model. The specific steps are as follows:
[0032] (1) Based on the dimensions of the cut sub-tiles (tile_width, tile_height) and the dimensions of the mask (m_width, m_height), the TIF image of arbitrary shape is divided into numerous small pieces; the number of pieces is calculated as follows:
[0033] m_tiles=(m_width-overlap_width) / / (tile_width-overlap_width)+1
[0034] m_tiles=(m_height-overlap_height) / / (tile_height-overlap_height)+1
[0035] In the formula, m_tiles and m_tiles are the number of pieces that the Mask image is divided into on the x-axis and y-axis, respectively; overlap_width and overlap_height are the width and height of the overlapping area between two adjacent sub-tiles, respectively; and the / / operator represents the rounding down operation.
[0036] (2) Calculate the labels containing the target region in the cut sub-image, and use the edge extraction algorithm to obtain the edge contour coordinates of the white region in the sub-image. Since there is only one category, the wheel coordinates of the white part are the labeled contour of the target. At the same time, the Douglas-Peucker algorithm is used to reduce the number of points of the polygon.
[0037] The edge extraction algorithm procedure is as follows:
[0038] Let image I(x, y), use Roberts operator for edge detection, which two templates are respectively:
[0039]
[0040] Convolution calculation is performed on each pixel point (x, y) in the image using the above two templates to obtain the gradient approximation value in the horizontal direction and the vertical direction:
[0041] G x = I(x+1, y)-I(x, y)
[0042] G y = I(x, y+1)-I(x, y)
[0043] Then calculate the gradient amplitude of the pixel point The amplitude is used as a measure of the intensity of edge change. Finally, by setting a threshold, the pixel points with gradient amplitude greater than the threshold are marked as edges. In this step, since the processing object is a binary image (pixel value is only 0 or 255), the threshold is set to 128, which can effectively distinguish edges from backgrounds, so the threshold is set to 128.
[0044] Douglas-Peucker algorithm procedure is as follows:
[0045] Let the original curve consist of a series of ordered points P = {p1, p2 … p n} composed, wherein p i = (x i , y i ); (x i , y i ) is the image coordinates of point p i on the curve, the unit is pixel, the origin is located at the top left corner of the image. First, find the straight line L between the starting point and the ending point of the curve, L is defined by the starting point p1(x1, y1) and the ending point p n (x n , y n ) of the curve, (x1, y1) and (x n , y n ) are the image coordinates of the starting point and the ending point of the curve, respectively, and the unit is pixel. Calculate the perpendicular distance d i of each point p i on the curve to the straight line L, the distance d i calculation formula is:
[0046]
[0047] d i The unit is pixels. Find the maximum value d among these distances. max The line L is used to approximate the distance from p1 to p. n For curve segments, the intermediate points can be discarded;
[0048] If d max If ≥∈, then in d max The corresponding point p j The curve is divided into two segments at point {p1, p2, ..., p}. n} and {p j ...p n}, where the threshold ∈ is 0.01 times the perimeter value of each detected target polygon. Then, the above process is recursively applied to these two curve segments until all curves satisfy the threshold condition.
[0049] (3) Image enhancement: By applying various transformations to the original dataset through rotation, cropping, perspective transformation, and elastic deformation image processing, new data samples are created, thereby expanding the dataset. This helps improve the model's generalization ability and reduce overfitting.
[0050] (4) Deep learning model training: The training of a deep learning model includes four processes: forward propagation, loss calculation, back propagation, and iterative optimization. Forward propagation: Inputting data into the deep learning model to calculate the prediction result; Loss calculation: Calculating the loss value based on the prediction result and the true label; Back propagation: Calculating the gradient using the chain rule and updating the parameters of the deep learning model; Iterative optimization: Repeating the forward and back propagation processes until the preset number of training rounds is reached or the stopping condition is met.
[0051] Step 3: Use the trained deep learning model to perform intelligent block detection of potential hazards related to plastic film mulch.
[0052] (1) The images to be inspected obtained by the UAV inspection are converted into TIF images by OSGBLab. These images contain geographic coordinate information and related parameters.
[0053] The TIF image is converted to JPG format and, following the Mask segmentation method, is divided into multiple identically sized sub-tiles based on the set tile width (tile_width) and height (tile_height), as well as the width (t_width) and height (t_height) of the TIF image to be detected. The width and height of both the sub-tiles and the original TIF image are in pixels. Simultaneously, an edge detection algorithm is used to determine whether the segmented sub-tiles contain valid image content, reducing the number of detection steps. The number of segmented sub-tiles is calculated as follows:
[0054] x_tiles=(t_width-overlap_width) / / (tile_width-overlap_width)+1
[0055] y_tiles=(t_height-overlap_height) / / (tile_height-overlap_height)+1
[0056] In the formula, x_tiles and y_tiles are the number of sub-tiles after segmentation in the x-axis and y-axis directions, respectively. overlap_width and overlap_height are the horizontal and vertical overlap width and height between two adjacent sub-tiles, respectively, in pixels. They are used to reduce the error of the model in detecting edges. The / / operator means rounding down.
[0057] (2) Block detection
[0058] See Figure 4 As shown, the sub-tiles obtained from the above segmentation are traversed, and the sub-tiles are input into the deep learning model trained in step 2 for detecting potential plastic film hazards. The deep learning model detects each sub-tile separately and outputs the predicted mask tile for each sub-tile. The sub-tile masks predicted by the deep learning model are saved in a queue in order.
[0059] (3) Merging of test results
[0060] Subimage merging: The subimage mask output by the trained model is a subimage mask at each location. These subimage masks need to be merged to output a mask identical to the original TIF image. See [link to relevant documentation]. Figure 5 As shown;
[0061] First, create a black background image ground with the same size as the TIF image. Iterate through the data in the queue and extract the data tile_background within the range corresponding to ground according to the sub-image name. The range calculation formula is shown below. Perform an element-wise OR operation between the extracted background image tile_background and the current tile mask and paste it onto the corresponding position in the background image ground to obtain the final detected Mask mask r.
[0062] left_top_x=col*(tile_width-overlap_width)
[0063] left_top_y = row * (tile_height - overlap_height)
[0064] r_t_x = left_top_x + overlap_width
[0065] r_t_y = left_top_y + overlap_height
[0066] In the formula, left_top_x, left_top_y, r_t_x, r_t_y are the left top coordinates and right bottom coordinates of the intercept range, respectively, as shown in the following figure. Figure 6
[0067] (4) Edge detection:
[0068] First, the mask ground is subjected to multiple morphological closing operations to reduce the black edges generated during splicing; the closing operation expression is as shown below, and the white area in the obtained mask is the detected target area, and the pixel coordinate contour of the white part in ground can be obtained through the edge detection algorithm. All contours obtained are traversed, and the number of points contained in the contour is reduced using the Douglas-Peucker algorithm;
[0069] Closing operation expression:
[0070]
[0071] In the formula, the symbol represents a morphological dilation operation, which is defined as covering scanning of the image I with the structure element B, and taking the maximum value. The symbol represents a morphological erosion operation, which is defined as covering scanning of the image I with the structure element B, and taking the minimum value. The closing operation first dilates the original image I using the structure element B to obtain an intermediate result, and then erodes the intermediate result using the same structure element B, and finally obtains the image I after closing operation closing ; in the present application, the structure element B is defined as a 20x20 pixel square matrix, and all element values are 1, which is used for dilation and erosion operations.
[0072] The edge extraction algorithm flow is as follows:
[0073] Let the image be I(x, y), and use the Roberts operator for edge detection, and the two templates of the operator are:
[0074]
[0075] The two templates are respectively used for convolution calculation for each pixel point (x, y) in the image, and the horizontal direction and vertical direction gradient approximation values are obtained:
[0076] G x =I(x+1,y)-I(x,y)
[0077] G y =I(x,y+1)-I(x,y)
[0078] Then calculate the gradient magnitude of that pixel. This amplitude is used as a measure of the intensity of edge change. Finally, by setting a threshold, pixels with gradient amplitudes greater than the threshold are defined as edges. In this step, since the object being processed is a binary image (pixel values are only 0 or 255), setting the threshold to 128 can effectively distinguish edges from the background, so the threshold is set to 128.
[0079] Douglas-Peucker algorithm flow:
[0080] Suppose the original curve is composed of a series of ordered points P = {p1, p2, ..., p...} n Composed of}, where p i =(x i ,y i );(x i ,y i () is a point p on the curve i The image coordinates are in pixels, with the origin located at the top left corner of the image. First, find the straight line L between the start and end points of the curve. L is formed by the curve's start point p1(x1,y1) and the curve's end point p1(x1,y1). n (x n ,y n The lines defined by (x1, y1) and (x...) are: n ,y n ) are the image coordinates of the start and end points of the curve, respectively, in pixels. Calculate the coordinates of each point p on the curve. i The perpendicular distance d to line L i Distance d i The calculation formula is:
[0081]
[0082] d i The unit is pixels. Find the maximum value d among these distances. max The line L is used to approximate the distance from p1 to p. n For curve segments, the intermediate points can be discarded;
[0083] If d max If ≥∈, then in d max The corresponding point p j The curve is divided into two segments at point {p1, p2, ..., p}. n} and {p j…p n} where the threshold value is 0.01 times of the detected perimeter value of each target polygon. Then the above process is recursively applied to the two curves respectively until all curves satisfy the threshold condition.
[0084] (5) Original map mapping and coordinate conversion
[0085] Original map mapping: draw and display the obtained contour information in the original JPG;
[0086] Coordinate calculation: the obtained coordinates are pixel coordinates, and the geographic coordinate information carried by the TIF map can convert the coordinates of each pixel point in the obtained contour into geographic position information coordinates, and the calculation formula is as shown in the formula:
[0087] px = trans[0] + col * trans[1] + row * trans[2]
[0088] py = trans[3] + col * trans[4] + row * trans[5]
[0089] In the formula, px and py are the converted projection coordinates, trans is a projection parameter with 6 elements, wherein trans[0] is the horizontal coordinate of the upper left corner of the upper left pixel, trans[1] is the pixel width, trans[2] is the row direction shear factor, trans[3] is the vertical coordinate of the upper left corner of the upper left pixel, trans[4] is the column direction shear factor, and trans[5] is the pixel height; col is the column index (horizontal coordinate, counted from 0, increased from left to right) of the contour point, and row is the row index (vertical coordinate, counted from 0, increased from top to bottom) of the contour point.
[0090] The application provides a deep learning-based geomembrane hidden danger intelligent detection method using a block strategy for training and detection, reduces the computational resource overhead, considers the invariability of target positions in a mask, and utilizes geographic position information in a TIF image. The information utilization rate of unmanned aerial vehicle inspection data is effectively improved, and the geomembrane hidden danger detection effect and calculation speed are improved.
[0091] The above shows and describes the basic principles, main features and advantages of the present application. Those skilled in the art should understand that the present application is not limited to the above embodiments, and the above embodiments and descriptions in the specification are only the principles of the present application. Various changes and improvements fall within the scope of the claimed present application. The scope of protection claimed by the present application is defined by the appended claims and their equivalents.
Claims
1. A deep learning-based intelligent detection method for potential hazards related to plastic film mulch, characterized by: Step 1: Convert the format of the raw images captured by the drone; (1) The original images captured by the UAV inspection are converted into TIF format images, which contain geographic coordinate information and related parameters; (2) Convert the TIF image into a JPG format image and extract its geographic coordinate metadata; Step 2: In the converted image, mark the potential hazards of plastic film mulching, perform sub-plot segmentation, and train the deep learning model; (1) Use labelme software to annotate the location and shape of the mulch film hazard targets contained in the JPG image, and generate a JSON format annotation file with the same file name as the original TIF image; (2) Based on the pixel coordinate information in the annotation file, generate a binary mask with the same size as the original TIF image, where the white area in the mask is the annotated area of potential mulch film hazard and the black area is the background area; (3) Perform sub-plot segmentation on the original TIF image and its corresponding mask and train a deep learning model; Step 3: Use the trained deep learning model to perform intelligent block detection of potential hazards related to plastic film mulch.
2. The intelligent detection method for potential hazards of plastic film mulch based on deep learning according to claim 1, characterized in that: Step 3 includes the following: (1) The images to be inspected obtained by the UAV inspection are converted into TIF images by OSGBLab. These images contain geographic coordinate information and related parameters. The TIF image is converted to JPG format and, following the Mask segmentation method, is divided into multiple identically sized sub-tiles based on the set tile width (tile_width) and height (tile_height), as well as the width (t_width) and height (t_height) of the TIF image to be detected. The width and height of both the sub-tiles and the original TIF image are in pixels. Simultaneously, an edge detection algorithm is used to determine whether the segmented sub-tiles contain valid image content, reducing the number of detection steps. The number of segmented sub-tiles is calculated as follows: x_tiles=(t_width-overlap_width) / / (tile_width-overlap_width)+1 y_tiles=(t_height-overlap_height) / / (tile_height-overlap_height)+1 In the formula, x_tiles and y_tiles are the number of sub-tiles after segmentation in the x-axis and y-axis directions, respectively. overlap_width and overlap_height are the horizontal and vertical overlap width and height between two adjacent sub-tiles, respectively, in pixels. They are used to reduce the error of the model in detecting edges. The / / operator means rounding down. (2) Block detection Traverse the sub-tiles obtained from the above segmentation and input them into the deep learning model trained in step 2 for mulch film hazard detection; the deep learning model detects each sub-tile separately and outputs the predicted mask tile Mask corresponding to each sub-tile; save the sub-tile masks predicted by the deep learning model into a queue in order. (3) Merging of test results The sub-image mask output by the deep learning model is a sub-image mask at each location. The sub-image masks need to be merged to obtain a mask with the same size as the original TIF image. First, create a black background image ground with the same size as the TIF image. Iterate through the data in the queue and extract the data tile_background within the range corresponding to ground according to the sub-image name. The range calculation formula is as follows. Perform an element-wise OR operation between the extracted background image tile_background and the mask of the current tile and paste it into the corresponding position in the original position ground to obtain the final detection mask r. left_top_x=col*(tile_width-overlap_width) left_top_y=row*(tile_height-overlap_height) r_t_x=left_top_x+overlap_width r_t_y=left_top_y+overlap_height In the formula, left_top_x, left_top_y, r_t_x, and r_t_y are the coordinates of the top left corner and the bottom right corner of the cut-off range, respectively. (4) Edge detection: First, multiple morphological closing operations are performed on the mask r to reduce the black edges generated during stitching. The white areas in the resulting mask r are the detected target regions. The mask information detected by the model is the contour coordinates of each sub-tile. Therefore, edge detection technology is used to detect the mask r, obtaining the contour of each target box. The Douglas-Peucker algorithm is then used to reduce the number of points contained in the contour. The closing operation expression is shown in the formula: Among them, symbols The morphological dilation operation is defined as a coverage scan of image I using structuring element B, taking the maximum value; symbol The morphological erosion operation is defined as scanning the image I with a structuring element B and taking the minimum value. The closing operation first dilates the original image I with the structuring element B to obtain an intermediate result, and then erodes this intermediate result with the same structuring element B to finally obtain the closed image I. closing In this invention, structural element B is defined as a 20×20 pixel square matrix with all elements having a value of 1, used for dilation and erosion operations. Douglas-Peucker algorithm flow: Suppose the original curve is composed of a series of ordered points P = {p1, p2, ..., p...} n Composed of}, where p i =(x i ,y i );(x i ,y i () is a point p on the curve i The image coordinates are in pixels, with the origin located at the top left corner of the image; first, find the straight line L between the curve's starting point and ending point, where L is formed by the curve's starting point p1(x1,y1) and the curve's ending point p1(x1,y1). n (x n ,y n The lines defined by (x1, y1) and (x...) are: n ,y n ) are the image coordinates of the start and end points of the curve, respectively, in pixels. Calculate the coordinates of each point p on the curve. i The perpendicular distance d to line L i Distance d i The calculation formula is: d i The unit is pixels. Find the maximum value d among these distances. max The line L is used to approximate the distance from p1 to p. n For curve segments, the intermediate points can be discarded; If d max If ≥∈, then in d max The corresponding point p j The curve is divided into two segments at point {p1, p2, ..., p}. n } and {p j ...p n }, where the threshold ∈ is 0.01 times the perimeter value of each detected target polygon; then the above process is recursively applied to these two curve segments until all curves satisfy the threshold condition; (5) Original image mapping and coordinate transformation ① Original image mapping: The outline information obtained above is drawn in the original JPG and displayed; ② Coordinate Calculation: The coordinates obtained above are pixel coordinates. By using the geographic coordinate information carried by the TIF image, the coordinates of each pixel in the obtained contour can be transformed into a geographic location coordinate system. The calculation formula is shown in the formula below: px=trans[0]+col*trans[1]+row*trans[2] py=trans[3]+col*trans[4]+row*trans[5] In the formula, px and py are the transformed projection coordinates, and trans is a projection parameter with 6 elements, in geographic coordinate system; where trans[0] is the horizontal coordinate of the top left corner of the top left pixel, trans[1] is the pixel width, trans[2] is the row direction shearing factor, trans[3] is the vertical coordinate of the top left corner of the top left pixel, trans[4] is the column direction shearing factor, and trans[5] is the pixel height; col is the column index of the contour point, the horizontal coordinate, which starts from 0 and increases from left to right, and row is the row index of the contour point, the vertical coordinate, which starts from 0 and increases from top to bottom.
3. The intelligent detection method for potential hazards of plastic film mulch based on deep learning according to claim 1, characterized in that: The original TIF image and its corresponding mask are segmented into sub-patterns, and a deep learning model is trained. The specific steps are as follows: (1) Based on the dimensions of the cut sub-tiles (tile_width, tile_height) and the dimensions of the mask (m_width, m_height), the TIF image of arbitrary shape is divided into numerous small pieces; the number of pieces is calculated as follows: m_tiles=(m_width-overlap_width) / / (tile_width-overlap_width)+1 m_tiles=(m_height-overlap_height) / / (tile_height-overlap_height)+1 In the formula, m_tiles and m_tiles are the number of pieces that the Mask image is divided into on the x-axis and y-axis, respectively; overlap_width and overlap_height are the width and height of the overlapping area between two adjacent sub-image tiles, respectively; and the / / operator represents the rounding down operation. (2) Calculate the labels of the target region in the cut sub-plots, and use the edge extraction algorithm to obtain the edge contour coordinates of the white region in the sub-plot. Since there is only one category, the edge contour coordinates of the white part are the labeled contour of the target. At the same time, the Douglas-Peucker algorithm is used to reduce the number of points of the polygon. (3) Image enhancement: By applying various transformations to the original dataset through rotation, cropping, perspective transformation, and elastic deformation image processing, new data samples are created, thereby expanding the dataset; this helps to improve the generalization ability of the model, reduce overfitting, and in some cases accelerate the training process of deep learning models. (4) Deep learning model training: The training of a deep learning model includes four processes: forward propagation, loss calculation, back propagation and iterative optimization; Forward propagation: Inputting data into the deep learning model to calculate and obtain the prediction result; Loss calculation: Calculating the loss value based on the prediction result and the true label; Back propagation: Calculating the gradient using the chain rule and updating the parameters of the deep learning model; Iterative optimization: Repeating the forward propagation and back propagation process until the preset number of training rounds is reached or the stopping condition is met.
4. A non-volatile storage medium, characterized in that, The non-volatile storage medium includes a stored program, wherein the program, when executed, controls the device on which the non-volatile storage medium resides to perform the method according to any one of claims 1 to 3.
5. An electronic device, characterized in that, It includes a processor and a memory; the memory stores computer-readable instructions, and the processor is used to execute the computer-readable instructions, wherein the computer-readable instructions, when executed, perform the method of claim 1.