Image segmentation training with contour accuracy evaluation

By evaluating contour accuracy and using buffer intersection techniques, the method and system for segmentation masks are improved, solving the problem of insufficient accuracy of segmentation masks in high-resolution images and dynamic scenes in existing technologies, and achieving more reliable and consistent segmentation results.

CN115280361BActive Publication Date: 2026-05-22SONY GROUP CORP +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SONY GROUP CORP
Filing Date
2021-05-28
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

Existing machine learning-based segmentation techniques fail to produce reliable and consistent segmentation masks in high-resolution images, dynamic scenes, and color-graded content, especially when edge sharpness is inconsistent, resulting in incorrectly inferred sub-pixel regions.

Method used

By evaluating the contour accuracy, the image is reformatted using a buffer intersection technique to generate improved binary contours to enhance the accuracy of the segmentation mask. This includes extracting buffers from the ground truth RGB image, generating binary contours, calculating the loss, and using the total loss of the weighted average to compensate for the contours to improve the segmentation mask.

Benefits of technology

It improves the accuracy of segmentation masks, especially at the edges, ensuring the reliability and consistency of segmentation masks, and is suitable for high-resolution images and dynamic scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115280361B_ABST
    Figure CN115280361B_ABST
Patent Text Reader

Abstract

Improving accuracy of a predicted segmentation mask, comprising: extracting a ground truth red green blue (RGB) image buffer and a binary contour image buffer from a ground truth RGB image container used for segmentation training; generating the predicted segmentation mask from the ground truth RGB image buffer; generating a second binary contour from the predicted segmentation mask using a specific algorithm; calculating a segmentation loss between a manually segmented mask of the ground truth RGB image buffer and the predicted segmentation mask; calculating a contour accuracy loss between a contour of the binary contour image buffer and a binary contour of the predicted segmentation mask; calculating a total loss as a weighted average of the segmentation loss and the contour accuracy loss; and generating an improved binary contour by compensating the contour of the binary contour image buffer with the calculated total loss, wherein the improved binary contour is used to improve accuracy of the predicted segmentation mask.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to segmentation masks, and more specifically, to improving the accuracy of predicted segmentation masks by evaluating contour accuracy. Background Technology

[0002] Conventional machine learning (ML)-based segmentation techniques using masks generate sufficiently good results for non-professional media content such as low-resolution videos on social media. However, the quality of the segmentation masks may not be high enough to meet the requirements of professional image / video processing tasks. For example, edge sharpness varies from frame to frame, which can lead to incorrectly inferred subpixels in the masked areas. These areas often appear as uncovered holes or contours that are discontinuous along the edges. Therefore, in some contexts, ML-based segmentation techniques may fail to produce reliable and / or consistent segmentation masks. These contexts can include: high-resolution images (e.g., HD, 4K); dynamic scenes, especially those with fast-moving objects; and color-grading content (e.g., low brightness, similar textures in the foreground and background). Summary of the Invention

[0003] This disclosure provides a way to improve the accuracy of predicted segmentation masks by evaluating contour accuracy.

[0004] In one implementation, a method for improving the accuracy of a predicted segmentation mask is disclosed. The method includes: extracting a ground truth RGB image buffer and a binary contour image buffer from a ground truth RGB image container used for segmentation training; generating a predicted segmentation mask from the ground truth RGB image buffer; generating a second binary contour from the predicted segmentation mask using a specific algorithm; calculating a segmentation loss between a manually segmented mask of the ground truth RGB image buffer and the predicted segmentation mask; calculating a contour accuracy loss between the contour of the binary contour image buffer and the binary contour of the predicted segmentation mask; calculating a total loss as a weighted average of the segmentation loss and the contour accuracy loss; and generating an improved binary contour by compensating the contour of the binary contour image buffer with the calculated total loss, wherein the improved binary contour is used to improve the accuracy of the predicted segmentation mask.

[0005] In one implementation, the method further includes: generating a first binary contour based on a manually segmented mask of a ground truth RGB image using a specific algorithm; and intersecting the first binary contour into the ground truth RGB image to produce a ground truth RGB image container. In one implementation, intersecting the first binary contour into the ground truth RGB image includes: placing each row of the ground truth RGB image into a first alternating row of the ground truth RGB image container; and placing each row of the first binary contour into a second alternating row of the ground truth RGB image container. In one implementation, the first alternating row has an even number of rows, and the second alternating row has an odd number of rows. In one implementation, the manually segmented mask is generated by manually segmenting the ground truth RGB image. In one implementation, calculating the total loss includes: calculating the total loss as a first constant multiplied by a segmentation loss plus a second constant multiplied by a contour accuracy loss, wherein the sum of the first and second constants equals 1.

[0006] In another implementation, a system for improving the accuracy of a predicted segmentation mask is disclosed. The system includes: a buffer extractor for extracting a ground truth RGB image buffer and a binary contour image buffer from intersecting image containers; a segmentation network for receiving the ground truth RGB image buffer and generating the predicted segmentation mask; a processor for receiving the predicted segmentation mask and generating a predicted contour based on the predicted segmentation mask, the processor calculating a segmentation loss between a manually segmented mask and the predicted segmentation mask, the processor also calculating a contour accuracy loss between the predicted contour and the binary contour image buffer; and an enhancer for calculating the total loss as a weighted average of the segmentation loss and the contour accuracy loss.

[0007] In one implementation, the enhancer compensates for the loss in the binary contour image buffer with total loss to produce an improved binary contour, which is used to improve the accuracy of the predicted segmentation mask. In another implementation, the processor generates the predicted contour based on the predicted segmentation mask using a specific algorithm. In one implementation, the intersecting image container is constructed by generating binary contours based on a manually segmented mask of the ground truth RGB image in the ground truth RGB image buffer using a specific algorithm and intersecting the binary contours in the binary contour image buffer into the ground truth RGB image. In another implementation, the manually segmented mask is generated by manually segmenting the ground truth RGB image.

[0008] In another implementation, a non-transient computer-readable storage medium is disclosed that stores a computer program for improving the accuracy of a predicted segmentation mask. The computer program includes executable instructions that cause a computer to perform the following processes: extracting a ground truth RGB image buffer and a binary contour image buffer from a ground truth RGB image container used for segmentation training; generating a predicted segmentation mask from the ground truth RGB image buffer; generating a second binary contour from the predicted segmentation mask using a specific algorithm; calculating a segmentation loss between a manually segmented mask of the ground truth RGB image buffer and the predicted segmentation mask; calculating a contour accuracy loss between the contour of the binary contour image buffer and the binary contour of the predicted segmentation mask; calculating a total loss as a weighted average of the segmentation loss and the contour accuracy loss; and generating an improved binary contour by compensating the contour of the binary contour image buffer with the calculated total loss, wherein the improved binary contour is used to improve the accuracy of the predicted segmentation mask.

[0009] In one implementation, the computer program further includes executable instructions that cause the computer to perform the following processes: generating a first binary contour based on a manually segmented mask of a ground truth RGB image using a specific algorithm; and intersecting the first binary contour into the ground truth RGB image to produce a ground truth RGB image container. In one implementation, the executable instructions that cause the computer to intersect the first binary contour into the ground truth RGB image include executable instructions that cause the computer to perform the following processes: placing each row of the ground truth RGB image into a first alternating row of the ground truth RGB image container; and placing each row of the first binary contour into a second alternating row of the ground truth RGB image container. In one implementation, the first alternating row has an even number of rows, and the second alternating row has an odd number of rows. In one implementation, the manually segmented mask is generated by manually segmenting the ground truth RGB image. In one implementation, the executable instructions that cause the computer to calculate the total loss include executable instructions that cause the computer to perform the following processes: calculating the total loss as a first constant multiplied by a segmentation loss plus a second constant multiplied by a contour accuracy loss, wherein the sum of the first constant and the second constant equals 1.

[0010] Other features and advantages of this specification will become apparent from the examples provided herein, which illustrate various aspects of this disclosure. Attached Figure Description

[0011] Details of this disclosure regarding both its structure and operation can be partially gathered through the study of the accompanying drawings, in which similar reference numerals denote similar parts, wherein:

[0012] Figure 1 This is a flowchart of an implementation of a method for improving the accuracy of a predicted segmentation mask according to the present disclosure;

[0013] Figure 2 Represents ground truth RGB image and binary contour image;

[0014] Figure 3A This represents the second set of ground truth RGB images saved in the image buffer;

[0015] Figure 3B Indicates image scaling;

[0016] Figure 3C Indicates image rotation;

[0017] Figure 3D Indicates image cropping;

[0018] Figure 3E Indicates the brightness control of the image;

[0019] Figure 4 This represents the augmented training set along with the extracted ground truth RGB image buffer and binary contour image;

[0020] Figure 5 This illustrates a process according to an implementation of the present disclosure for improving the accuracy of a predicted segmentation mask by evaluating contour accuracy;

[0021] Figure 6 This is a block diagram of an implementation of a system for improving the accuracy of a predicted segmentation mask according to the present disclosure;

[0022] Figure 7A It is a representation of a computer system and a user according to the implementation of this disclosure;

[0023] Figure 7B This is a functional block diagram illustrating a managed image processing application implemented according to the present disclosure. Detailed Implementation

[0024] As mentioned above, in contexts involving high-resolution images, dynamic scenes including fast-moving objects, and / or color-grading content, conventional ML-based segmentation techniques may fail to produce reliable and / or consistent segmentation masks.

[0025] Some implementations of this disclosure provide methods and systems for improving the accuracy of predicted segmentation masks by evaluating contour accuracy (particularly along edges) and by using an image reformatting technique called “buffer intersection”.

[0026] After reading the following description, it will become clear how this disclosure can be implemented in various implementations and applications. Although various implementations of this disclosure will be described herein, it should be understood that these implementations are presented as examples only and not as limitations. Therefore, the detailed descriptions of the various implementations should not be construed as limiting the scope or breadth of this disclosure.

[0027] In one implementation, to improve the accuracy of the predicted segmentation mask along the edge, the following steps can be taken: (a) selecting a specific algorithm to generate binary contours from a manually segmented mask based on a ground truth red-green-blue (RGB) image; (b) generating a new set of ground truth images by intersecting the binary contour buffers into the original RGB image; (c) extracting ground truth RGB image buffers from an augmented training set used for segmentation training; (d) obtaining binary contours based on the predicted segmentation mask using a specific algorithm; (e) calculating the difference between the contours of the manually segmented mask from the ground truth RGB image and the contours of the predicted segmentation mask in the form of a loss function; and (f) adding the contour loss to the segmentation loss used for backpropagation.

[0028] Figure 1 This is a flowchart of a method 100 for improving the accuracy of a predicted segmentation mask according to one implementation of this disclosure. In one implementation, the accuracy of the predicted segmentation mask along the edges is improved by evaluating the contour accuracy and by using an image reformatting technique called “buffer intersection”.

[0029] exist Figure 1 In the illustrated implementation, at step 110, a boundary tracking algorithm is selected. This algorithm generates a binary contour based on a manually segmented mask of a first set of ground truth red-green-blue (RGB) images. In one implementation, selectable specific algorithms (conventional or machine learning-based) include squared tracking, Moore's neighborhood tracking, and radial scan. In another implementation, specific algorithms include boundary tracking algorithms such as OpenCV functions. An RGB image is a true-color image that defines the red, green, and blue components of each individual pixel.

[0030] Figure 2 Represents a ground truth RGB image 200 and a binary contour image 210. Manual segmentation of the ground truth RGB image 200 (e.g., stored in a first buffer) is performed (see arrow 202) to generate a manually segmented mask 206. Simultaneously, contour detection and generation are performed (see arrow 212) to generate a binary contour image 210 (e.g., stored in a second buffer) based on the manually segmented mask.

[0031] Back Figure 1As illustrated in the diagram, in step 120, a second set of ground truth RGB images is generated through the following process: the contours of the binary contour image 210 are intersected into the ground truth RGB image 200 to save the second set of ground truth RGB images into an image container. That is, each row of the ground truth RGB image is placed in the first alternating row of the ground truth RGB image container, while each row of the first binary contour is placed in the second alternating row of the ground truth RGB image container.

[0032] Figure 2 This represents an implementation of the process of intersecting the contours of a binary contour image 210 into a ground truth RGB image 200. Figure 2 In the illustrated implementation, each row 204 of the ground truth RGB image 200 (e.g., in the first buffer) is placed in the even-numbered rows of the image container 220 (e.g., rows 0, 2, 4, 6, etc.), while each row 214 of the binary contour image 210 (e.g., in the second buffer) is placed in the odd-numbered rows of the image container 220 (e.g., rows 1, 3, 5, 7, etc.). In other implementations, different configurations (such as by swapping rows and columns, or by swapping odd and even rows or columns) can be used to intersect or combine the ground truth RGB image 200 and the binary contour image 210. In the column configuration, it should be noted that the image buffer is converted from row-based to column-based.

[0033] Figure 3A  Figure 3E This is illustrated to illustrate the benefits of generating a second set of ground truth RGB images (including both ground truth RGB images and binary contour images) and storing the images in an image container. The advantage of hosting two or more buffers within a single image container is that pixels are unaffected by image augmentations during training. Therefore, by simultaneously having both ground truth RGB image buffers and binary contour image buffers within a single image container, the pixels of the image can be processed substantially uniformly using the user's selection of image augmentations (e.g., scaling, rotation, cropping, brightness control, etc.). Consequently, the RGB buffers used for training will have the expected correct format and code values. Meanwhile, the binary contours can remain unchanged because the user can select the buffers to which augmentations are applied. Figure 3A This represents the second set of ground truth RGB images, 300, saved to the image buffer. Figure 3B This indicates that the image is scaled by 310. Figure 3C This indicates a 320° rotation of the image. Figure 3D This indicates that the image has been cropped by 330. Figure 3E This indicates that the image brightness is controlled at 340.

[0034] Back Figure 1The illustrated implementation shows that, at step 130, a ground truth RGB image buffer is extracted from the intersecting image container used for segmentation training (extraction step), which produces the predicted segmentation mask. At step 140, a binary contour is generated based on the predicted segmentation mask using the same algorithm used in step 110 (binary contour generation step). Then, at step 150, the segmentation loss between the manually segmented mask and the predicted segmentation mask is calculated (segmentation loss calculation step). It should be noted that the ground truth segmentation mask is better than the predicted segmentation mask. Figure 4 This indicates that the training set 400 is augmented along with the extracted ground truth RGB image buffer 410 and the binary contour image 420.

[0035] exist Figure 1 In the illustrated implementation, at step 160, the difference between the contours of the manually segmented mask from the ground truth RGB image and the contours of the predicted segmented mask is calculated using a loss function (contour accuracy loss calculation step). Then, at step 170, the difference (contour accuracy loss) is added to the segmentation loss to generate the ground truth contours for backpropagation of the error.

[0036] Figure 5 A process 500 according to an implementation of the present disclosure is shown to improve the accuracy of a predicted segmentation mask by evaluating contour accuracy. The process includes an extraction step, a binary contour generation step, a segmentation loss calculation step, a contour accuracy loss calculation step, and a ground truth contour generation step.

[0037] exist Figure 5 In the illustrated implementation, a ground truth RGB image buffer 512 and a binary contour image buffer 514 are extracted from the augmented training set 510. The ground truth RGB image buffer 512 is input into the segmentation network 520 to generate a predicted segmentation mask 522. Then, a predicted contour 524 is generated from the predicted segmentation mask 522. A segmentation loss 542 is also calculated between the manually segmented mask 530 and the predicted segmentation mask 522.

[0038] exist Figure 5In the illustrated implementation, enhancer 540 receives segmentation loss 542 and contour accuracy loss 544, and calculates a total loss as a weighted average of segmentation loss 542 and contour accuracy loss 544 (i.e., total loss = k * segmentation loss + (1-k) * contour accuracy loss). In one implementation, enhancer 540 uses the total loss calculation to compensate for the loss in binary contour image buffer 514 to produce an improved binary contour 550. Enhancer 540 then utilizes the improved binary contour 550 to assist the optimization process of segmentation network 520 to improve the accuracy of the predicted segmentation mask. Therefore, enhancer 540 is configured to train both a contour accuracy network (using an existing contour generation model) and a segmentation network (using the trained contour accuracy network).

[0039] Figure 6 This is a block diagram of a system 600 for improving the accuracy of a predicted segmentation mask, according to an implementation of this disclosure. Figure 6 In the illustrated implementation, system 600 includes a buffer extractor 610, a segmentation network 620, a processor 630, and an enhancer 640. In one implementation, blocks 610, 620, 630, and 640 of system 600 are entirely composed of hardware including one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field-programmable arrays (FPGAs), or other equivalent integrated or discrete logic circuits.

[0040] exist Figure 6 In the illustrated implementation, buffer extractor 610 extracts a ground truth RGB image buffer and a binary contour image buffer from the intersecting image container 602. Segmentation network 620 receives the ground truth RGB image buffer and generates a predicted segmentation mask. Processor 630 then receives the predicted segmentation mask and generates a predicted contour based on the predicted segmentation mask using the same algorithm used to generate a binary contour from a manually segmented mask. Processor 630 also calculates a segmentation loss between the manually segmented mask and the predicted segmentation mask and sends the calculated segmentation loss to enhancer 640. Processor 630 further calculates a contour accuracy loss between the predicted contour 524 and the binary contour in the image buffer.

[0041] exist Figure 6 In the illustrated implementation, enhancer 640 receives segmentation loss 542 and contour accuracy loss 544, and calculates a total loss as a weighted average of segmentation loss 542 and contour accuracy loss 544 (i.e., total loss = k * segmentation loss + (1-k) * contour accuracy loss). Enhancer 640 uses the total loss calculation to compensate for the loss in the binary contour image buffer to produce an improved binary contour. The improved binary contour is then used to assist segmentation network 620 in generating a better segmentation mask.

[0042] Figure 7A This is a representation of a computer system 700 and a user 702 according to an implementation of this disclosure. User 702 uses computer system 700 to implement [functions related to] [the following]. Figure 1 Method 100 and Figure 6 The system 600 improves the accuracy of the predicted segmentation mask in image processing applications 790.

[0043] Computer System 700 Store and Execute Figure 7B The image processing application 790 is described above. Additionally, the computer system 700 can communicate with a software program 704. The software program 704 may include software code for the image processing application 790. As explained further later, the software program 704 may be loaded onto an external medium such as a CD, DVD, or storage device drive.

[0044] Furthermore, computer system 700 can connect to network 780. Network 780 can be connected in various different architectures (e.g., client-server architecture, peer-to-peer network architecture, or other types of architecture). For example, network 780 can communicate with server 785, which coordinates the engine and data used within image processing application 790. Moreover, the network can be of different types. For example, network 780 can be the Internet, a local area network (LAN) or any variant of a LAN, a wide area network (WAN), a metropolitan area network (MAN), an intranet or extranet, or a wireless network.

[0045] Figure 7B This is a functional block diagram illustrating a managed image processing application 790 implemented according to the present disclosure. The controller 710 is a programmable processor and controls the operation of the computer system 700 and its components. The controller 710 loads instructions (e.g., in the form of a computer program) from memory 720 or an embedded controller memory (not shown) and executes these instructions to control the system. In its execution, the controller 710 provides a software system to the image processing application 790 to, for example, implement the generation of a predicted segmentation mask with improved accuracy. Alternatively, this service can be implemented as a separate hardware component within the controller 710 or the computer system 700.

[0046] The memory 720 temporarily stores data for use by other components of the computer system 700. In one implementation, the memory 720 is implemented as RAM. In another implementation, the memory 720 also includes long-term or permanent memory, such as flash memory and / or ROM.

[0047] Storage device 730 stores data for use by other components of computer system 700, either temporarily or for a long period of time. For example, storage device 730 stores data used by image processing application 790. In one implementation, storage device 730 is a hard disk drive.

[0048] Media device 740 receives removable media and reads data from and / or writes data to the inserted media. In one example, media device 740 is an optical disc drive.

[0049] User interface 750 includes components for accepting user input from a user of computer system 700 and presenting information to user 702. In one implementation, user interface 750 includes a keyboard, mouse, audio speakers, and a display. Controller 710 uses input from user 702 to adjust the operation of computer system 700.

[0050] I / O interface 760 includes one or more I / O ports for connecting to corresponding I / O devices such as external storage devices or supplementary devices (e.g., printers or PDAs). In one implementation, the ports of I / O interface 760 include ports such as USB ports, PCMCIA ports, serial ports, and / or parallel ports. In another implementation, I / O interface 760 includes a wireless interface for wireless communication with external devices.

[0051] Network interface 770 includes wired and / or wireless network connections, such as an RJ-45 or “Wi-Fi” interface (including but not limited to 802.11) that supports Ethernet connectivity.

[0052] Computer system 700 includes typical additional hardware and software of a computer system (e.g., power supply, cooling, operating system), but for simplicity, these components are not listed here. Figure 7B This is illustrated in detail. In other implementations, different configurations of the computer system may be used (e.g., different bus or storage configurations or multiprocessor configurations).

[0053] The description of the disclosed implementations is provided to enable those skilled in the art to make or use this disclosure. Many modifications to these implementations will be apparent to those skilled in the art, and the principles defined herein can be applied to other implementations without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not intended to be limited to the implementations shown herein, but is to be accorded the broadest scope consistent with the main and novel features disclosed herein.

[0054] Therefore, other variations and implementations are also possible. For example, one implementation adds contour-based evaluation to the machine learning training of an image segmentation model to improve the performance of the image segmentation process. Contour-based evaluation improves the efficiency of video segmentation model training by providing additional reference information (i.e., whether the segmentation by the model during training provides an output consistent with the contour image). Examples of other implementations include: eliminating the need for green screens in content creation; and image segmentation and shape recognition for robotics, autonomous driving, factory automation, and more.

[0055] A higher-fidelity video segmentation engine trained using the proposed scheme can be used to automate the actor and object masking process during visual effects (VFX) creation in content creation. This masking is currently done manually, but the time-consuming process can be automated using machine learning-based tools.

[0056] In certain implementations of this disclosure, not all features of each of the examples above are necessarily required. Furthermore, it should be understood that the descriptions and figures given herein represent subject matter broadly contemplated by this disclosure. It should also be understood that the scope of this disclosure fully covers other implementations that may become apparent to those skilled in the art, and therefore, the scope of this disclosure is limited only by the appended claims.

Claims

1. A method for improving the accuracy of a predicted segmentation mask, the method comprising: Extract the ground truth RGB image buffer and the binary contour image buffer including the first binary contour from the ground truth red-green-blue (RGB) image container used for segmentation training; Generate the predicted segmentation mask from the ground truth RGB image buffer; The selected algorithm is used to generate a second binary profile from the predicted segmentation mask; Calculate the segmentation loss between the manually segmented mask and the predicted segmentation mask of the ground truth RGB image buffer; Calculate the contour accuracy loss between the first binary contour and the second binary contour; Calculate the total loss as a weighted average of the segmentation loss and contour accuracy loss used for backpropagation. The method further includes: The first binary contour is generated using a mask based on manually segmented ground truth RGB images using the selected algorithm; and The first binary contour is intersected into the ground truth RGB image to generate a ground truth RGB image container. The process of intersecting the first binary contour with the ground truth RGB image includes: Place each row of the ground truth RGB image into the first alternating row of the ground truth RGB image container; and Each row of the first binary profile is placed into the second alternating row of the ground truth RGB image container.

2. The method according to claim 1, wherein, The first alternation row consists of even-numbered rows, and the second alternation row consists of odd-numbered rows.

3. The method according to claim 1, wherein, The manually segmented mask is generated by manually segmenting the ground truth RGB image.

4. The method according to claim 1, wherein, The calculation of total loss includes: The total loss is calculated as the first constant multiplied by the segmentation loss, plus the second constant multiplied by the contour accuracy loss. The sum of the first and second constants is equal to 1.

5. A system for improving the accuracy of a predicted segmentation mask, the system comprising: A buffer extractor for extracting ground truth RGB image buffers and binary contour image buffers including first binary contours from intersecting image containers; A segmentation network is used to receive a ground truth RGB image buffer, the segmentation network generating a predicted segmentation mask; A processor for receiving a predicted segmentation mask and generating a second binary contour based on the predicted segmentation mask using a selected algorithm; the processor calculates a segmentation loss between a manually segmented mask and the predicted segmentation mask; the processor also calculates a contour accuracy loss between the first binary contour and the second binary contour; and An enhancer used to calculate the total loss as a weighted average of the segmentation loss and contour accuracy loss used for backpropagation. The intersecting image container is constructed by generating a first binary contour based on a manually segmented mask of the ground truth RGB image in the ground truth RGB image buffer using the selected algorithm, and then intersecting the first binary contour into the ground truth RGB image. The intersecting of the first binary contour into the ground truth RGB image includes: Place each row of the ground truth RGB image into the first alternating row of the ground truth RGB image container; and Each row of the first binary profile is placed into the second alternating row of the ground truth RGB image container.

6. The system according to claim 5, wherein, The enhancer uses total loss to compensate for the loss in the binary contour image buffer to produce an improved binary contour, which is used to improve the accuracy of the predicted segmentation mask.

7. The system according to claim 5, wherein, The manually segmented mask is generated by manually segmenting the ground truth RGB image.

8. A non-transient computer-readable storage medium storing a computer program for improving the accuracy of a predicted segmentation mask, said computer program comprising executable instructions that cause a computer to perform the following processes: Extract the ground truth RGB image buffer and the binary contour image buffer including the first binary contour from the ground truth red-green-blue (RGB) image container used for segmentation training; Generate the predicted segmentation mask from the ground truth RGB image buffer; The selected algorithm is used to generate a second binary profile from the predicted segmentation mask; Calculate the segmentation loss between the manually segmented mask and the predicted segmentation mask of the ground truth RGB image buffer; Calculate the contour accuracy loss between the first binary contour and the second binary contour; and Calculate the total loss as a weighted average of the segmentation loss and contour accuracy loss used for backpropagation. The computer program further includes executable instructions that cause the computer to perform the following processes: The first binary contour is generated using a mask based on manually segmented ground truth RGB images using the selected algorithm; and The first binary contour is intersected into the ground truth RGB image to generate a ground truth RGB image container. The executable instructions that cause the computer to intersect the first binary contour into the ground truth RGB image include executable instructions that cause the computer to perform the following processes: Place each row of the ground truth RGB image into the first alternating row of the ground truth RGB image container; and Each row of the first binary profile is placed into the second alternating row of the ground truth RGB image container.

9. The non-transient computer-readable storage medium according to claim 8, wherein, The first alternation row consists of even-numbered rows, and the second alternation row consists of odd-numbered rows.

10. The non-transient computer-readable storage medium according to claim 8, wherein, The manually segmented mask is generated by manually segmenting the ground truth RGB image.

11. The non-transient computer-readable storage medium according to claim 8, wherein, Executable instructions that cause the computer to lose overall computational resources include those that cause the computer to perform the following processes: The total loss is calculated as the first constant multiplied by the segmentation loss, plus the second constant multiplied by the contour accuracy loss. The sum of the first and second constants is equal to 1.