4. Results
The trained semantic segmentation network was first applied to the set of 500 original colonoscopy frames used for model development. Compared with the initial automatic annotations, the network assigned a larger proportion of pixels to intestinal mucosa and shadow regions. The proportion of pixels classified as intestinal mucosa increased from 6.7% in the automatic annotations to 46.13% after semantic segmentation, while the proportion of pixels classified as shadows increased from 3.98% to 12.68%. Moderate increases were also observed for artefacts, from 3.54% to 8.77%, and for lumen/borders, from 23.6% to 32.42%.
Examples of the resulting segmentation maps are shown in
Figure 5, using the same frames illustrated in
Figure 1 and
Figure 4. Intestinal mucosa pixels are marked in red, shadow pixels in green, artefacts in blue, and lumen/borders in black. These results indicate that the network produced more spatially continuous segmentation maps than the initial sparse automatic annotations. However, since this evaluation was performed on development frames and was based on weak labels, it should not be interpreted as independent validation of segmentation accuracy. Rather, it shows that the network was able to learn and extend the visual patterns provided by the colour- and luminance-based annotation procedure.
To evaluate the results for an entire video colonoscopy, we developed a routine that processes the video frame by frame and counts, for each frame, the number of pixels assigned by the trained semantic segmentation network to each of the four classes: shadows, intestinal mucosa, artefacts, and lumen/borders. The colonoscopies in our database were recorded at 25 frames per second; therefore, pixel counts were summed for every 25 consecutive frames, corresponding to one second of video. As a practical example,
Figure 6 shows the results obtained for test video colonoscopy #5, which had a duration of 4 min and 15 s. The horizontal axis represents the time sequence of the colonoscopy video, while the vertical axis shows the relative proportion of the four segmented pixel classes: shadow pixels in green, intestinal mucosa pixels in red, artefact pixels in blue, and lumen/border pixels in black.
As shown in
Figure 6, shadow pixels, marked in green, were present throughout many parts of the colonoscopy. This observation indicates that not all detected shadow regions are necessarily related to liver or spleen impressions. In addition to potential hepatic or splenic shadows, numerous shadow-like areas may be generated by the illumination of the intestinal mucosa and its folds, by local angulation, by residual fluid, or by contact between adjacent colonic walls. Therefore, in order to retain only candidate shadow intervals that could plausibly correspond to the colon being close to the liver or spleen, we applied a set of empirical filtering rules based on the relative proportions of the four segmented regions.
For a shadow region to be considered potentially relevant, it should be sufficiently large, while the surrounding intestinal mucosa should remain adequately visible. At the same time, frames dominated by artefacts or lumen/borders are less reliable for interpreting shadow patterns. Therefore, the filtering rules were applied to the percentage of pixels belonging to each segmented class, summed over each one-second interval of the colonoscopy video.
First, all one-second intervals in which lumen/border pixels represented more than 50% of the total pixels were excluded, as shown in
Figure 7. Second, intervals in which artefact pixels represented more than 33% of total pixels were excluded, as shown in
Figure 8. Third, intervals in which intestinal mucosa represented less than 20% of total pixels were excluded, as shown in
Figure 9. Finally, intervals in which shadow pixels represented less than 12% of the pixels were removed, because very small shadow regions were considered more likely to correspond to ordinary mucosal folds or local illumination effects rather than to liver- or spleen-related impressions. These thresholds were empirically selected for exploratory filtering and should not be interpreted as optimised diagnostic cut-offs.
After applying these filtering steps, a limited number of candidate shadow clusters remained, as illustrated in
Figure 10. In test colonoscopy #5, the largest cluster was observed between seconds 46 and 52. This interval corresponded to the video sequence shown in
Figure 11, left panel, captured at second 49. A second nearby cluster was observed between 1:01 and 1:07, corresponding to the image shown in
Figure 11, right panel, captured at 1:03. These intervals were considered candidate shadow regions potentially related to the hepatic flexure. This interpretation was supported by expert review, as one endoscopist acknowledged the hepatic flexure between seconds 45 and 49, possibly extending to 1:00, while the second endoscopist acknowledged the same flexure between seconds 45 and 50.
Later in the video, several shadow clusters were observed between seconds 2:22 and 2:37. These intervals corresponded to the video frames shown in
Figure 12, captured at 2:23 and 2:35, respectively. Because they occurred in the later part of the withdrawal sequence, these shadow clusters were considered possible candidates for the splenic flexure region. However, this interpretation was less certain than for the hepatic flexure. One endoscopist did not clearly acknowledge the splenic flexure, while the other indicated it around seconds 2:39–2:40 and possibly 2:53. Therefore, the splenic flexure findings should be interpreted as suggestive rather than definitive.
Overall, the full-video analysis suggests that temporally clustered shadow segmentation may help identify candidate flexure regions in selected colonoscopy videos. The hepatic flexure signal appeared more concordant with expert review in the representative case analysed, whereas the splenic flexure signal was more uncertain. These preliminary findings support the feasibility of the approach, but larger validation on independently annotated videos is required to determine its true performance and robustness.