A computer-implemented method for automatically identifying and classifying the biliary lesions of neoplastic or inflammatory etiology, in cholangioscopy medical images, by classifying pixel regions as biliary strictures and further detecting the relevant biliary morphologic features to characterize said strictures as malignant or benign, comprising: - selecting a number of subsets of all images, each of said subsets considering only images from the same patient; - selecting another subset as validation set, wherein the subset does not overlap chosen images on the previously selected subsets; - Pre-training with each of the chosen subsets of one of a plurality of combinations of a convolution neural network image feature extraction component followed by a subsequent classification neural network component for pixel classification as biliary lesions of neoplastic or inflammatory etiology, wherein said pre-training: o early stops o evaluates the performance of each of the combinations; o is repeated on new, different subsets, with another networks combination and training hyperparameters, wherein such new combination considers fewer dense layers if the pre-training shows evidence of overfitting; - selecting the architecture combination that performs best during pre-training; - fully training and validating during training the selected architecture combination using the entire set of cholangioscopy medical images to obtain an optimized architecture combination; - prediction of the biliary lesions of neoplastic or inflammatory etiology using said optimized architecture combination for classification; - receiving the classification output of the prediction by an output collector module with means of communication to a third-party capable of performing validation by interpreting the accuracy of the classification output and of correcting a wrong prediction, wherein the third-party comprises at least one of: another neural network, any other computational system adapted to perform the validation task or, optionally, a physician expert; - storing the corrected prediction into the storage component. - selecting a number of subsets of all images, each of said subsets considering only images from the same patient; - selecting another subset as validation set, wherein the subset does not overlap chosen images on the previously selected subsets; - Pre-training with each of the chosen subsets of one of a plurality of combinations of a convolution neural network image feature extraction component followed by a subsequent classification neural network component for pixel classification as biliary lesions of neoplastic or inflammatory etiology, wherein said pre-training: o early stops o evaluates the performance of each of the combinations; o is repeated on new, different subsets, with another networks combination and training hyperparameters, wherein such new combination considers fewer dense layers if the pre-training shows evidence of overfitting; o early stops o evaluates the performance of each of the combinations; o is repeated on new, different subsets, with another networks combination and training hyperparameters, wherein such new combination considers fewer dense layers if the pre-training shows evidence of overfitting; - selecting the architecture combination that performs best during pre-training; - fully training and validating during training the selected architecture combination using the entire set of cholangioscopy medical images to obtain an optimized architecture combination; - prediction of the biliary lesions of neoplastic or inflammatory etiology using said optimized architecture combination for classification; - receiving the classification output of the prediction by an output collector module with means of communication to a third-party capable of performing validation by interpreting the accuracy of the classification output and of correcting a wrong prediction, wherein the third-party comprises at least one of: another neural network, any other computational system adapted to perform the validation task or, optionally, a physician expert; - storing the corrected prediction into the storage component.