It is an undeniable fact that image quality is closely related to the performance and accuracy of both verification and identification biometric systems. As an example, we can mention official documents, for instance passports or identity cards. Portraits in such documents must satisfy specific requirements in several categories. This paper describes our approach to determining the quality of images using artificial neural networks. We decided that we would use an approach different to most of the previously used ones - our system consists of two separate, but identical sub-networks, which together form a so called siamese neural network. The result of using such a network is that we are able to decide which one of a pair of images is of higher quality. As this paper later describes, the network can determine the better image in specific categories which affect the overall quality too.