Medical imaging

Biliary Atresia Detection

The Biliary Atresia Detection project investigates image-processing techniques that can support the early identification of biliary atresia in newborns. Biliary atresia partially obstructs the bile ducts connecting the liver to the intestine, causing bile accumulation and progressive liver damage. Early recognition is therefore important, since delayed intervention may lead to severe complications and the need for liver transplantation.

A common preliminary screening method is based on stool colour. Pale or acholic stools may be associated with biliary atresia, while normal stools generally present darker colours. Parents and paediatricians can compare the observed colour with a reference stool-colour card, but the result may depend on subjective interpretation, illumination, shadows, reflections, and the particular area selected for comparison.

Existing smartphone-based approaches generally analyse the colour of a single pixel chosen by the user. This local strategy can be unreliable when the selected pixel belongs to a shadow, reflection, background region, or other non-representative area. The project therefore proposes a user-interactive method that analyses an entire colour-consistent region rather than relying exclusively on one pixel.

The processing pipeline starts from a photograph captured with a conventional smartphone under uncontrolled conditions. After min–max normalisation, the image is divided into colour-homogeneous regions using K-means clustering. The clustering separates the relevant foreground from the background and from areas affected by non-uniform illumination.

The user is then asked to indicate a representative point in the image. Instead of classifying that individual pixel, the method identifies the colour cluster that overlaps most strongly with a small region around the user selection. This approach makes the interaction more robust to small positioning errors and reduces the risk of analysing an isolated, non-significant pixel.

The selected cluster is refined using morphological closing and opening operations, after which only the largest connected component is retained. The resulting mask isolates the image area considered most relevant for the colour analysis.

Six colour descriptors are extracted from the segmented region: the average values of the red, green, and blue channels and the average values of the Y, U, and V components. Equivalent descriptors are computed from the reference samples included in the stool-colour card.

Classification is performed with a one-nearest-neighbour model using Euclidean distance. The model assigns the input image the label of the most similar reference colour, distinguishing between normal and acholic stools and, in a more detailed configuration, between the individual stool-colour-card subclasses. This classifier does not require a separate training phase.

The preliminary evaluation used eight smartphone images with a resolution of 1000 × 1000 pixels, acquired under uncontrolled conditions and labelled by an expert paediatrician. With five colour clusters and a 60 × 60-pixel user-selection region, the method correctly classified all images in the binary normal-versus-acholic task. Performance was lower for the finer subclass-recognition problem, for which the available dataset was too limited to support more complex models.

The average processing time was approximately 2.76 seconds per image, excluding the variable time required for user interaction. Colour segmentation accounted for most of the computation, requiring about 2.52 seconds, while feature extraction and classification required approximately 0.13 and 0.11 seconds, respectively.

Sensitivity analysis showed that moderate variations in the number of clusters and selection-window size did not significantly affect binary classification accuracy. The more detailed subclass task was more sensitive to parameter changes, with an accuracy reduction of up to approximately 10% in the worst evaluated configuration.

Overall, the project provides a simple and low-cost image-analysis framework for assisting stool-colour assessment with ordinary smartphones. Its main contribution is the use of colour-based regional segmentation to make the result less dependent on the exact point selected by the user and more robust to common acquisition artefacts.

The reported results should be considered preliminary because they were obtained from a very small in-house dataset. The proposed system is intended as a screening and decision-support tool rather than a replacement for clinical diagnosis, and broader validation on larger, more diverse datasets would be required before medical deployment.

Project website

Relevant publications

A. Genovese, X. Bushi, L. D'Antiga, M. Lazzaroni, G. Mawi, E. Nicastro, V. Piuri, A. Scocciolini, F. Scotti, A. Tomarelli, T. Vicarelli, Biliary atresia detection using color clustering and nearest neighbor classification: A user interactive approach, Proc. of the 2022 IEEE Int. Conf. on Computational Intelligence and Virtual Environments for Measurement Systems and Applications (CIVEMSA 2022), pp. 1-5, Chemnitz, Germany, June 2022, ISSN 978-1-6654-3445-4.