This study investigates the application of an artificial neural network (ANN) framework for analysing water pollution caused by solids. To address the challenge, we develop a convolutional neural network trained under a transfer learning strategy with AlexNet. We feed the network with pictures of samples of water with low, medium, and high concentrations of total suspended solids and achieve a high validation accuracy of 99.85% with a precision of 99.85%, which is highly competitive with other approaches. Our model demonstrates significant improvements in speed and reliability over conventional image processing methods, effectively predicting pollution levels. Our findings suggest that ANNs can serve as an effective tool for real-time monitoring and management of water pollution, facilitating proactive decision-making and policy formulation.

  • Artificial neural networks are used to estimate water pollution caused by total suspended solids.

  • Samples are prepared with different concentrations of suspended solids and filmed to obtain images.

  • A convolutional neural network with a transfer learning strategy is trained and tested for analysing its performance.

  • Low, medium, and high concentrations of total suspended solids in water can be identified with high accuracy and modest computer resources.

Water pollution caused by solids, including suspended and dissolved particles, poses critical challenges to environmental sustainability, public health, and economic development (Khan et al. 2022). Solids in water, particularly suspended solids, are an important pollutant affecting rivers and lakes, impacting their usability for activities such as energy production, agricultural irrigation, fishing, and recreation. High concentrations of suspended solids in water can lead to adverse ecological effects, including algal blooms, extreme turbidity, and reduced light penetration, which in turn inhibits photosynthesis within aquatic systems (Adjovu et al. 2023). In addition, total suspended solids (TSS) can carry a wide range of pollutants, including heavy metals (Aradpour et al. 2021), microorganisms, and nutrients (Nodefarahani et al. 2020; Naderian et al. 2024), which could severely impact aquatic ecosystems and human health. This parameter is essential in evaluating urban water systems because suspended particles can absorb contaminants, like hydrocarbons, and organic matter, making high TSS levels a potential indicator of contamination (Rossi et al. 2005). Furthermore, elevated TSS concentrations often indicate possible organic or faecal contamination in water (Howard et al. 2004). Understanding and mitigating these impacts requires accurate monitoring and prediction of pollution levels. For instance, in Mexico, the Ministry of Environment and Natural Resources has proposed the NOM-001-SEMARNAT-2021 standard (National Advisory Committee for Standardization of the Environment and Natural Resources of Mexico 2021) for setting parameters to analyse the quality of contaminated water, including TSS. To make water quality information accessible to the public, the Ministry of Environment and Natural Resources also proposed a system for estimating water quality based on three different contamination parameters: biochemical oxygen demand, chemical oxygen demand (COD), and TSS. TSS is among these parameters because elevated TSS levels diminish the ability of water bodies to support diverse aquatic life. These parameters help identify conditions ranging from nearly natural states, unaffected by human activity, to water showing clear signs of wastewater discharges and severe deforestation (Ministry of Environment and Natural Resources Mexico 2011).
Figure 1

Samples supplies and data image obtained for the cropped image from the video recording: (a) clays used to make the samples, (b) container of 5 × 5 × 5 cm3, (c) a sample with the translucent container, (d) cropped image associated with a high TSS concentration, (e) cropped image associated with a medium TSS concentration, and (f) cropped image associated with a low TSS concentration.

Figure 1

Samples supplies and data image obtained for the cropped image from the video recording: (a) clays used to make the samples, (b) container of 5 × 5 × 5 cm3, (c) a sample with the translucent container, (d) cropped image associated with a high TSS concentration, (e) cropped image associated with a medium TSS concentration, and (f) cropped image associated with a low TSS concentration.

Close modal
Figure 2

Scheme of experimental setup (see text). Samples are put in a transparent cubic container on a magnetic stirrer, illuminated laterally using an 18-inch Ring Light Edge-Lit LED. Images were captured with an iPhone 12.

Figure 2

Scheme of experimental setup (see text). Samples are put in a transparent cubic container on a magnetic stirrer, illuminated laterally using an 18-inch Ring Light Edge-Lit LED. Images were captured with an iPhone 12.

Close modal

Traditional methods for identifying and classifying TSS in water samples include using a Gooch crucible with a 2.4-cm glass fibre filter, Buchner funnel, membrane filter, and Gooch crucible asbestos (Smith & Greenberg 1963). While effective, these methods require specialised laboratory facilities, trained personnel, as well as significant time and financial resources. These limitations are particularly challenging for regions with limited access to advanced water quality laboratories, thus making it difficult to monitor and manage the treatment of TSS in water. This underscores the need for innovative approaches to enhance the efficiency and accuracy of water quality assessment (Kim et al. 2024). An artificial neural network (ANN) framework offers a promising solution to these challenges, especially considering that water quality data are inherently complex, with numerous interdependent variables such as turbidity, TSS, and COD. An ANN excels in managing and interpreting complex, non-linear relationships within large datasets, providing more accurate predictions than traditional linear models (Noori et al. 2022). Such a framework is capable of learning from historical data to predict future pollution levels, which is crucial for proactive environmental management (Schauser & Steinberg 2001). Furthermore, once trained, ANN models can rapidly process and analyse data, significantly reducing the time required for water quality assessment, a beneficial feature for real-time monitoring and decision-making (Palani et al. 2008). These frameworks can be easily scaled to incorporate additional data sources and parameters, enhancing their applicability across different water bodies and pollution scenarios. ANNs continuously improve their performance as more data become available and thus remain relevant and accurate over time, adapting to changes in pollution patterns and environmental conditions (Noori et al. 2013). An additional benefit of their use is that these frameworks can be seamlessly integrated with Internet of Things (IoT) devices and remote sensing technologies. For example, Lloret et al. (2011) developed a wireless sensor network where each sensor node captures images from the field and uses image processing to detect issues in the leaves, such as deficiencies, pests, or diseases. Once detected, the sensor sends a notification to the farmer via the network. Similarly, Sabari et al. (2020) designed a system for the continuous monitoring of water quality parameters based on the concept of IoT, where the proposed model utilises various sensors to measure the required parameters. In another example, Patil et al. (2019) designed a system that informs users about upcoming floods through notifications and alerts. The system uses sensors to gather flood-related data and provides information about nearby safe locations for evacuation.

The integration of ANNs with IoT devices and remote sensing technologies enables continuous, automated monitoring of water quality, providing real-time data that enhance the responsiveness and effectiveness of pollution control measures. By providing reliable and detailed insights into pollution dynamics, ANNs support informed decision-making done by policymakers, environmental agencies, and stakeholders. This leads to better resource allocation, targeted pollution control strategies, and, ultimately, more effective environmental protection.

In the field of water management, several ANN models have been primarily used to characterise both the quantity and quality of water (Farmaki et al. 2010; Najafzadeh et al. 2021). One of the most common applications of ANNs in water monitoring is through remote sensing (Wagle et al. 2020), where satellite images are used to predict different water levels and the evolution of contaminants (Agrawal & Petersen 2021). Another significant application of ANNs is in the modelling, particularly in wastewater treatment plants (WWTPs), as well as in the control process within these facilities (Hamed et al. 2004). Also, ANNs have been widely utilised for predicting water quality parameters through various machine learning (ML) methods (Haghiabi et al. 2018; Kim et al. 2024).

In this article, we present a novel approach to assess water quality by developing a convolutional neural network (CNN) capable of predicting high, medium, and low pollution levels based on TSS concentrations. This method offers a cost-effective, rapid, and non-invasive alternative for water quality monitoring, enabling the classification of water quality using a single image captured with a smartphone camera. Early studies under similar conditions already point towards the benefits of using CNN in the classification of water contamination by TSS (Lopez-Betancur et al. 2022). The remainder of this paper is organised as follows: In the Methods section, we present in detail the sample preparation, the experimental procedure, the CNN development for classifying water quality based on solids, as well as its training and calibration phases. In the Results section, we report the findings of our study based on the followed methodology. In the Discussion section, we summarise the findings of this work and its impact in environmental science. Finally, we present an outlook for future work in the Conclusions section.

Samples

To carry out this research, 30 water samples were prepared with different levels of TSS as pollutants. These samples were obtained by selecting clays with particles sizes smaller than 60 μm, since TSS are considered matter with particle diameter less than 62 μm (Bilotta & Brazier 2008). This process involved sieving the material through a 60 μm mesh sieve to achieve material homogenisation. It is important to note that the selected clays are primarily composed of iron and aluminium, the most common types of clays found in urban environments (Perry & Taylor 2009). This selection aims to mimic natural contamination in urban water sources.

For preparing the samples, distilled water was used. Clays were weighed on an analytical balance with a precision of 0.1 mg. The TSS concentration in the samples ranged from 40 to 6,000 mg/L. Based on these concentrations, the samples were divided into three water quality categories: low, medium, and high. Low concentrations of solids correspond to less polluted water samples with 40–70 mg/L of TSS, medium concentrations to 80–400 mg/L, while high concentrations of TSS range from 500 to 6,000 mg/L, corresponding to strongly polluted water. This setup is shown in Figure 1. This classification aligns with the regulations and standards in Mexico. For instance, the ‘low’ classification corresponds to TSS concentrations permitted for the discharge of treated wastewater into rivers, streams, canals, drains, reservoirs, lakes, and lagoons, as well as for the irrigation of green areas (National Advisory Committee for Standardization of the Environment and Natural Resources of Mexico 2021). This class represents water of good quality in terms of TSS. The ‘medium’ class, however, includes contaminated water that is considered acceptable but still contaminated. This classification aligns with the criteria proposed by the Ministry of Environment and Natural Resources in Mexico for classifying water quality based on suspended solids. The ‘high’ class corresponds to heavily contaminated water, also classified using the same indicator (Ministry of Environment and Natural Resources of Mexico 2011), as illustrated in Figure 1.

The number of samples varied across different classes: 4 samples for the low class, 10 samples for the medium class, and 16 samples for the high class. This variation is due to the different ranges of TSS concentrations within each class. The low class exhibited minimal variability in TSS concentrations, the medium class displayed a broader range of concentrations, and the high class had the widest range of TSS concentrations.

Experimental procedure

To carry out the experimental part of this work, we kept photographic records of each water sample containing solids. Each record was made by placing 100 mL of the sample in transparent cubic containers with a 5 cm edge. The sample was illuminated laterally using a white dispersed light source, specifically an 18-inch Ring Light Edge-Lit LED, positioned 20 cm away from the water sample. The light source was placed laterally to avoid reflections on the water container. Due to the particle size of the TSS, a magnetic stirrer was required to prevent sedimentation. The stirrer was operated at 300 rpm, which was the speed at which the solids remained in constant suspension, with a 1.5-inch-diameter hexagonal capsule placed at the centre of the water container. The images were captured through a 1-min video recorded using an iPhone 12 with a 12 MP camera and a resolution of 1,920 × 1,080 progressively displayed pixels, also known as high definition, capable of 30 frames/s (fps) and a 2.5× zoom. The entire experimental setup, shown in Figure 2, was conducted on a levelled anti-vibration optical table, with the smartphone mounted statically on a tripod and positioned 15 cm away from the camera shutter, located in a booth with black curtains to prevent external light intrusion. The entire experimental setup was documented to ensure repeatability in video recording. The images used in the development of the CNN were extracted from videos captured at a rate of 4 fps. This process was implemented using Python, a versatile and accessible programming language (Thaker & Shukla 2020), with the MoviePy package. A total of 240 images per sample were generated, resulting in a total of 7,200 images. Following individual analysis, 685 images were excluded due to blur issues, resulting in a dataset of 6,515 images for further analysis. The original dimensions of the captured images were 1,920 × 1,080 pixels, but they were centrally cropped to 450 × 450 pixels to reduce noise from the magnetic stir bar, container edges, and induced vortices by the magnetic stirrer. The cropping process was conducted using the OpenCV library in Python.

CNN development

In the domain of deep learning, various types of algorithms exist, with CNNs being among the most widely used (Baek et al. 2020). These models offer several advantages: (1) they reduce both time and costs (e.g., material and labour costs), (2) enable forecasting across different system phases, (3) simplify complex systems to enhance comprehension, and (4) predict target values even in situations where site access is challenging (Barzegar et al. 2020). Therefore, in this study, we propose the use of a CNN.

The primary task of a CNN is classification. Initially, it performs feature extraction from the input image. These features are then fed into a neural network (NN), producing output probabilities that indicate the classification of the input image into a specific category (Ferentinos 2018). However, training a CNN from scratch requires two main conditions: (1) access to a large dataset with labelled data and (2) significant computational and memory resources (Morid et al. 2021).

An alternative to training CNNs from scratch is the transfer learning (TL) strategy, which allows leveraging knowledge acquired from large datasets of non-environmental data to address specific environmental challenges, such as water quality analysis. Specifically, parameters from well-trained CNN models on non-environmental datasets, which contain diverse images (e.g., ImageNet models like AlexNet (Yuan & Zhang 2016), VGGNet (Purwono et al. 2023), and ResNet (Wu et al. 2019)), can be transferred to tailor a CNN model for analysing water quality.

The use of TL with AlexNet is well known, as it has been used in various areas. For example, it has been used in the detection of pathologies (Lu et al. 2019), identification of alcoholism (Wang et al. 2019), multiple sclerosis (Zhang et al. 2019), skin lesions (Hosny et al. 2020), and even facial emotions (Sekaran et al. 2021). In the environmental area, AlexNet has also been used in the identification of diseases in maize leaves (Lv et al. 2020), identification of crop water stress (Chandel et al. 2021), and sounds of marine mammals (Lu et al. 2021). However, in water quality classification, it has been less explored. In this study, we use TL for the classification of TSS using the AlexNet network, which is based on a CNN model that won the ImageNet Large Scale Visual Recognition Challenge 2012 (ILSVRC2012). This competition has served as a major benchmark for image recognition since 2010 (Russakovsky et al. 2015). AlexNet leverages the ImageNet dataset, which contains over 15 million labelled images (Deng et al. 2009). Its architecture includes eight learned layers: five convolutional layers followed by max-pooling layers to reduce data dimensions, utilising rectified linear units (ReLu) as activation function, and three fully connected (FC) layers (Krizhevsky et al. 2017). In Figure 3, we show the architecture used in AlexNet CNN.
Figure 3

AlexNet architecture. (a) Training with big data ImageNet (input image size 244 × 244 × 3). (b) Five convolutional layers with ReLu as activation function and max-pooling to size reduce. (c) Three FC layers and the last layer uses SoftMax as activation function to the classifier.

Figure 3

AlexNet architecture. (a) Training with big data ImageNet (input image size 244 × 244 × 3). (b) Five convolutional layers with ReLu as activation function and max-pooling to size reduce. (c) Three FC layers and the last layer uses SoftMax as activation function to the classifier.

Close modal

To carry out the TL process used in our work, we make use of Python as the programming language, because it has a large number of packages that facilitate the use of ML algorithms (Raschka & Mirjalili 2019), and it is also free to use. The entire procedure was conducted using the Jupyter Notebook environment within the Visual Studio Code Integrated Development Environment. All the computations were performed on a computer equipped with an 8th generation Intel i5 processor and 8 GB of RAM, which provides relatively modest computational resources. The well-trained AlexNet model was obtained from the Torchvision package, which is a Python package that includes several pre-trained network models. The modification of the AlexNet CNN involved removing the classifier, which initially had 1,000 different types of classes, and we proposed a three-class water quality classifier based on different concentrations of TSS: high, medium, and low. Subsequently, the parameters obtained from the pre-training of AlexNet were unfrozen to adjust the weights of the network model.

In the ML realm, one of the most important elements to define are the hyperparameters of the ANN. These consist of configurations of the network that affect its structure, learning, and performance. Hyperparameters differ from parameters in that they are not automatically modified or adjusted during training; instead, they must be specified beforehand (Yu & Zhu 2020). The hyperparameters established in this work were the optimisation algorithm, learning rate, batch size, and number of epochs. Below, we describe each of these.

The optimisation process in artificial intelligence (AI) involves identifying optimal parameters that improve the performance of a CNN model. One of the classic methods for this process is the stochastic gradient descent (SGD) optimisation method (Newton et al. 2018). However, tuning the learning rate of SGD, as a hyperparameter, is often challenging because the magnitudes of different parameters vary significantly and need to be adjusted throughout the training process (Zhang 2018). Therefore, in our study, we used the Adam optimiser as it is an efficient stochastic optimisation method that only requires first-order gradients and has low memory requirements. This method computes individual adaptive learning rates for different parameters based on estimates of the first and second moments of gradients (Kingma & Ba 2014) and iteratively finding values that minimise the error (loss).

In a deep NN, the weight parameters are updated as
(1)
where L represents the loss function and the learning rate. Regarding the latter, it is known that a low rate causes slow convergence of the training algorithm, while a very high rate can lead to divergences (Smith 2017). Therefore, in this work, we chose to use a low learning rate to ensure model convergence, opting for a learning rate of 0.000005, at the expense of sacrificing some training convergence speed.

One of the crucial hyperparameters is the number of epochs used during training. An epoch entails presenting each sample in the training dataset with an opportunity to update the model internal parameters. Each epoch consists of one or more batches. As each sample or batch is processed through the network, the error is computed, and the back propagation (BP) algorithm is applied to adjust the weights and biases of the network. During BP, the error is propagated backward through the network, gradients of the weights are calculated with respect to the error, and these gradients are used to update the weights, aiming to minimise the error. This process facilitates model learning and performance enhancement. Although the number of epochs is typically large, our approach employs 50 epochs.

Conversely, the batch size determines the number of samples propagated through the CNN and used to update model parameters in each iteration until the training is complete. Larger batch sizes facilitate greater computational parallelism and can often enhance performance. However, they require more memory and can introduce latency during training. For the creation of the CNN model, a total of 6,515 images with varying suspended solid concentrations were used, with 5,862 images allocated for the training set and 653 images for validation. Consequently, given the total number of images available, we opted for a batch size of 50 images.

The hyperparameters were chosen through numerous performance evaluations aimed at minimising error and maximising classification accuracy, specifically tailored to our image dataset. Table 1 presents the hyperparameters utilised for CNN development, while Figure 4 depicts the TL processes employed.
Table 1

Hyperparameters used in the development of the CNN model

HyperparametersValue
Algorithm optimiser Adam 
Learning rate 0.000005 
Batch size 50 
Epoch 50 
HyperparametersValue
Algorithm optimiser Adam 
Learning rate 0.000005 
Batch size 50 
Epoch 50 
Figure 4

Representation of the TL process in the CNN model used: (a) well-trained AlexNet CNN, (b) removing last layer classifier for a new task, (c) reuse of the pre-trained model, (d) new training dataset of water samples and modification of the CNN, and (e) classification result.

Figure 4

Representation of the TL process in the CNN model used: (a) well-trained AlexNet CNN, (b) removing last layer classifier for a new task, (c) reuse of the pre-trained model, (d) new training dataset of water samples and modification of the CNN, and (e) classification result.

Close modal

Validation metrics

For evaluating the proposed CNN, the most common metrics are based on the prediction of four possible outcomes: true positives (), true negatives (), false positives (), and false negatives () (Seliya et al. 2009). In this study, we use accuracy, precision, recall, F-measure, receiver operating characteristic (ROC), and confusion matrix as validation metrics. Below, we describe the function of each metric.

Accuracy () represents the classification accuracy rate at the decision and is defined as
(2)
where N represents the total number of instances in the dataset.
Precision, defined in terms of the positive predictive value (), is obtained as
(3)
Sensitivity metric is represented by recall, which indicates the true positive rate and measures the ability of the classifier to correctly identify positive instances. Sensitivity, or recall, is defined as
(4)
F-measure or F-score metric is derived from two parameters, recall and precision (Witten et al. 2005). This measure, ranging from 0 to 1, peaks at 1 for a perfect classifier. F-measure is obtained as
(5)

In our study, we set .

The ROC curve illustrates how a classifier balances between correctly identifying and . It provides a comprehensive view of the classifier effectiveness, independent of class distribution or error costs (Davis & Goadrich 2006). The area under the ROC curve (AUC) represents the probability that a randomly selected positive instance is ranked higher than a randomly selected negative instance according to the model predictions. In general, a classifier with a larger AUC indicates better performance compared to one with a smaller AUC. This curve is commonly used as a validation metric.

Finally, a confusion matrix, a widely used tool in classification problems, is employed in this research. This tool provides detailed information about the predicted classifications (Deng et al. 2016). The confusion matrix is particularly beneficial for evaluating the overall performance of the classification model, which is crucial for guiding subsequent improvements. It is structured such that each cell corresponds to a specific class assigned by the model, with rows representing the actual classes and columns representing the predicted classes. Ideally, correctly classified instances align along the diagonal of the matrix, while misclassified instances appear in the off-diagonal cells.

The development of the CNN training process and its validation results are depicted in Figure 5, which illustrates the accuracy and loss curves. Figure 5(a) depicts the accuracy obtained for both the training and validation data as a function of time (epochs). Figure 5(b) also shows the error performance of the model on the y-axis, alongside the loss for each epoch. Our model initially achieved an accuracy of 0.78, but starting from epoch 10, it reached a precision of 0.99, with the loss minimised to approximately 0.005, varying between 0.02 and 0.0004 in each subsequent epoch. By epoch 50, the model attained an accuracy of 0.9985.
Figure 5

Learning curve of the CNN: (a) classifier accuracy by epoch for training and validation dataset and (b) classifier loss by epoch for training and validation dataset.

Figure 5

Learning curve of the CNN: (a) classifier accuracy by epoch for training and validation dataset and (b) classifier loss by epoch for training and validation dataset.

Close modal
Figure 6 displays the confusion matrix obtained at the end of the training process for the three proposed classes. Both the normalised (Figure 6(a)) and unnormalised matrices (Figure 6(b)) are presented, based on 653 validation images: 360 for the high class, 206 for the medium class, and 87 for the low class. In the confusion matrix, rows correspond to the true labels, whereas columns represent the labels predicted by the CNN proposed. Cells along the diagonal are associated with observations that have been correctly classified. Figure 6 indicates that the model achieves nearly 100% accuracy in label prediction, with minimal errors, misclassifying only one image associated with the medium label. The high class, which had the most images used during training, exhibited the best prediction accuracy, with all 360 validation images correctly classified by the CNN model. For the normalised confusion matrix (Figure 6(a)), two decimal places were used in rounding, showing a prediction accuracy of 100%, despite the presence of a misclassified image.
Figure 6

Confusion matrix obtained by the validation dataset: (a) normalised confusion matrix and (b) confusion matrix without normalisation.

Figure 6

Confusion matrix obtained by the validation dataset: (a) normalised confusion matrix and (b) confusion matrix without normalisation.

Close modal
Figure 7 presents the ROC curve, illustrating the and rates as the decision threshold of the network varies. In this ROC curve, the diagonal line represents the performance of a random classifier, commonly referred to as the line of no discrimination. In Figure 7(a), the red line indicates the performance of the ‘high’ class, the orange line represents the ‘medium’ class, and the green line corresponds to the ‘low’ class. In Figure 7(b), the dashed line shows the overall performance of the model in terms of network efficiency. It should be noted that on the curve, all the classes evaluated individually coincide at the horizontal line because they each reach a rate of 1.0. In addition, the same Figure 7 displays the AUC values, which represent the area under the curve, with a value of 1 indicating perfect prediction. In this study, all three classes achieved an AUC of 1.0, obtained by rounding the actual network performance to four decimal places.
Figure 7

ROC curve obtained from the evaluation of CNN performance: (a) ROC curve and AUC value for each class and (b) ROC curve and overall AUC value.

Figure 7

ROC curve obtained from the evaluation of CNN performance: (a) ROC curve and AUC value for each class and (b) ROC curve and overall AUC value.

Close modal

Table 2 summarises the remaining evaluation metrics for the CNN performance on the training and validation datasets. This table includes the accuracy, precision, recall (or sensitivity), F-measure, and training time. The metrics for both training and validation data achieve a value of 0.9985. Notably, despite the relatively long training time, the CNN demonstrates excellent performance.

Table 2

Validation metrics obtained from the validation and training dataset

MetricValidation valuesTraining values
Accuracy 0.9985 0.9997 
Precision 0.9985 0.9997 
Recall 0.9985 0.9997 
F-measure 0.9986 0.9997 
Training time – 354 min 13.4 s 
MetricValidation valuesTraining values
Accuracy 0.9985 0.9997 
Precision 0.9985 0.9997 
Recall 0.9985 0.9997 
F-measure 0.9986 0.9997 
Training time – 354 min 13.4 s 

Finally, we present a convolutional feature map of a random image from the validation dataset in Figure 8, which illustrates a region of interest detected by the CNN for classification purposes. Figure 8(a) shows the input image, which has been resized, normalised, and standardised for the CNN. Figure 8(b) represents a feature map obtained from the image after passing through convolutional layer 1, with dimensional reduction through max-pooling. Figure 8(c) corresponds to the feature map extracted after convolutional layer 2, also with max-pooling applied. Figures 8(d)–8(f) display the feature maps after passing through convolutional layers 3, 4, and 5, respectively. In this study, several feature maps from different randomly selected images were analysed to confirm that the CNN can detect changes in the image caused by suspended particles in liquid samples.
Figure 8

A random feature map from an image in the validation dataset through each convolutional layer. (a) Random input image. Feature map after (b) convolutional layer 1, (c) convolutional layer 2, (d) convolutional layer 3, (e) convolutional layer 4, and (f) convolutional layer 5.

Figure 8

A random feature map from an image in the validation dataset through each convolutional layer. (a) Random input image. Feature map after (b) convolutional layer 1, (c) convolutional layer 2, (d) convolutional layer 3, (e) convolutional layer 4, and (f) convolutional layer 5.

Close modal

The issue of water pollution caused by TSS requires action from environmental policymakers concerning the connection of individuals to the public sewer system as well as monitoring the health of water bodies. In this context, ML techniques offer valuable tools for decision-making based on physical data obtained from simple water imaging (Lopez-Betancur et al. 2022). The CNN developed in this study exemplifies a tool that delivers excellent performance with modest computational resources.

Figure 5, which depicts the learning curve of the proposed model, shows that the CNN developed for water quality classification based on TSS concentration demonstrates strong performance as compared to other studies (Lopez-Betancur et al. 2022). This is evident from epoch 10 onwards, with an accuracy exceeding 0.99, along with high precision, sensitivity, and F-measure. However, fluctuations occur in subsequent training epochs. These fluctuations are primarily due to images with low and medium solid concentrations, where the solid content is so minimal that it becomes challenging to identify within the sample, especially during constant agitation. With an agitation speed of 300 rpm and a selected image crop area of 450 × 450 pixels out of a total of 1,920 × 1,080 pixels, some images may not adequately capture the TSS concentration in the water sample. Fluctuations in the learning process are likely due to difficulties in distinguishing between the low and medium classes. This is supported by the confusion matrix, which shows one misclassified image between the low class (label 3) and the medium class (label 2) in terms of true labels and predictions (Figure 6(b)). It is important to emphasise that overfitting can be ruled out based on the learning curve analysis. The learning curve shows that as the number of epochs increases, the model accuracy continues to improve. Although there are fluctuations in accuracy and loss, these variations are relatively small, within a range between 0.02 and 0.0004, especially when the accuracy reaches a high value of 0.99. This minor fluctuation indicates stability and high performance, suggesting that the model is learning effectively and is unlikely to be overfitting.

Regarding the high class in TSS concentration, it is evident that this class was the most accurately classified by the network. With the highest number of images used for this category, no misclassified labels were found, resulting in an accuracy of 1.0. This can be attributed to the higher TSS concentrations in these samples and the abundance of training data, enabling the proposed CNN model to correctly associate high concentrations with this label.

As shown by the previously presented metrics (Table 2), despite the presence of one misclassified image, the ROC curve indicates that the classification probability is nearly 1.0 for all classes. Specifically, the high class achieves a perfect identification probability of 1.0. For the medium and low classes, the probability of correct identification is 0.99999, which is rounded to 1.0000 in ROC (Figure 7(a)) for clarity due to decimal precision. In addition, the overall AUC for the model is 0.999996, also rounded to 1.0000 in ROC (Figure 7(b)), indicating a very high level of accuracy. These results suggest that the developed network has a high probability of accurately classifying TSS concentrations.

Regarding the feature maps presented in Figure 8, these provide a detailed view of how the network processes and classifies images, thereby validating its ability to detect relevant features. These feature maps reveal which features are activated at each layer of the network, illustrating how the network processes the image – from detecting simple edges and textures to identifying complex patterns. Reviewing these maps confirms that the CNN focuses on differences in suspended solids and effectively learns to identify relevant patterns, while ignoring factors such as optical distortions and unwanted radiation. In addition, the dimensions of each feature map at the output of the layers demonstrate that the model is correctly structured according to the architecture used by AlexNet.

Although there are various research studies focused on predicting contamination by TSS using images, many of them exhibit variations in both precision and practicality. For example, Zhang et al. (2002) achieved a precision of 91% in TSS detection by utilising combined optical and microwave data obtained by Landsat 5 TM and ERS-2 SAR satellites respectively, alongside ANN. However, this approach relies on complex and costly technologies, which may limit its applicability in resource-restricted contexts. Conversely, the study by Saberioon et al. (2020) used Sentinel-2A images and reported an R2 of 80% for TSS estimation, although this method also involves costs associated with remote sensing. In the work of Mustafa et al. (2017), indices derived from satellite images obtained by Landsat 8 OLI were applied, finding a correlation of 65.1% between the Airborne Water Extraction Index and TSS, indicating limitations in the precision of their estimates. Furthermore, Pai et al. (2007) characterised TSS in effluents from a hospital WWTP using genetic algorithms for neural networks, yielding errors of 23.14 and 51.73% in TSS determination. When applying a genetic model, errors of 23.14 and 26.67% were reported. These results reflect the diversity of existing approaches and their respective limitations.

This study developed a CNN framework using TL to classify three levels of TSS in water, achieving an accuracy of 99.85% despite training on small datasets. Although the model performed exceptionally well overall, low TSS concentrations were the most challenging to classify, and were occasionally confused with medium concentrations. However, this confusion was observed in only one image, and the model's performance remained highly accurate overall. The model was optimised for low computational costs, ensuring reproducibility and practical applicability. Given the high cost and time of laboratory TSS determinations, this approach offers a novel, cost-effective alternative for classifying solids.

The model is limited to a TSS concentration range of up to 6,000 mg/L, with higher concentrations potentially complicating classification. Controlled lighting conditions were used to minimise classification errors, but the model is not suited for samples with significant dissolved solids, which may cause errors due to their varied composition and colouration. The computational power required for finer analysis remains a constraint, though this method offers a practical solution for regions with limited access to water quality laboratories, such as small communities in Mexico. This tool could aid sustainable water management, improving monitoring and decision-making for rivers, lakes, irrigation, and WWTPs.

Future work aims to expand the model to classify water into five quality levels, aligning with the Mexican environmental standards. This includes addressing systematic experimental errors by incorporating varied particle types, lighting conditions, and particle sizes. The performance of alternative CNN architectures will also be explored to advance AI applications in environmental science, focusing on additional water quality parameters and contaminants of global concern.

We acknowledge Salomón Borjas García for valuable support.

We acknowledge support from CIC-UMSNH under grants 18371 and 26140.

All authors contributed equally to this research paper.

All relevant data are available from https://github.com/Itzel-LS/WQPTSSCANN.

The authors declare there is no conflict.

Adjovu
G. E.
,
Stephen
H.
,
James
D.
&
Ahmad
S.
(
2023
)
Measurement of total dissolved solids and total suspended solids in water systems: A review of the issues, conventional, and remote sensing techniques
,
Remote Sensing
,
15
(
14
),
3534
.
https://doi.org/10.3390/rs15143534
.
Agrawal
A.
&
Petersen
M. R.
(
2021
)
Detecting arsenic contamination using satellite imagery and machine learning
,
Toxics
,
9
(
12
),
333
.
https://doi.org/10.3390/toxics9120333
.
Aradpour
S.
,
Noori
R.
,
Vesali Naseh
M. R.
,
Hosseinzadeh
M.
,
Safavi
S.
,
Ghahraman-Rozegar
F.
&
Maghrebi
M.
(
2021
)
Alarming carcinogenic and non-carcinogenic risk of heavy metals in Sabalan dam reservoir, northwest of Iran
,
Environmental Pollutants and Bioavailability
,
33
(
1
),
278
291
.
https://doi.org/10.1080/26395940.2021.1978868
.
Baek
S. S.
,
Pyo
J.
&
Chun
J. A.
(
2020
)
Prediction of water level and water quality using a CNN-LSTM combined deep learning approach
,
Water
,
12
(
12
),
3399
.
https://doi.org/10.3390/w12123399
.
Barzegar
R.
,
Aalami
M. T.
&
Adamowski
J.
(
2020
)
Short-term water quality variable prediction using a hybrid CNN–LSTM deep learning model
,
Stochastic Environmental Research and Risk Assessment
,
34
(
2
),
415
433
.
https://doi.org/10.1007/s00477-020-01776-2
.
Bilotta
G. S.
&
Brazier
R. E.
(
2008
)
Understanding the influence of suspended solids on water quality and aquatic biota
,
Water Research
,
42
(
12
),
2849
2861
.
https://doi.org/10.1016/j.watres.2008.03.018
.
Chandel
N. S.
,
Chakraborty
S. K.
,
Rajwade
Y. A.
,
Dubey
K.
,
Tiwari
M. K.
&
Jat
D.
(
2021
)
Identifying crop water stress using deep learning models
,
Neural Computing and Applications
,
33
,
5353
5367
.
https://doi.org/10.1007/s00521-020-05325-4
.
Davis
J.
&
Goadrich
M.
(
2006
). '
The relationship between precision-recall and ROC curves
’,
Proceedings of the 23rd International Conference on Machine Learning
, pp.
233
240
.
Deng
J.
,
Dong
W.
,
Socher
R.
,
Li
L.-J.
,
Li
K.
&
Fei-Fei
L.
(
2009
). '
ImageNet: A large-scale hierarchical image database
',
2009 IEEE Conference on Computer Vision and Pattern Recognition
.
Miami, FL, USA
, pp.
248
255
.
Deng
X.
,
Liu
Q.
,
Deng
Y.
&
Mahadevan
S.
(
2016
)
An improved method to construct basic probability assignment based on the confusion matrix for classification problem
,
Information Sciences
,
340
,
250
261
.
https://doi.org/10.1016/j.ins.2016.01.033
.
Farmaki
E. G.
,
Thomaidis
N. S.
&
Efstathiou
C. E.
(
2010
)
Artificial neural networks in water analysis: Theory and applications
,
International Journal of Environmental Analytical Chemistry
,
90
(
2
),
85
105
.
https://doi.org/10.1080/03067310903094511
.
Ferentinos
K. P.
(
2018
)
Deep learning models for plant disease detection and diagnosis
,
Computers and Electronics in Agriculture
,
145
,
311
318
.
https://doi.org/10.1016/j.compag.2018.01.009
.
Haghiabi
A. H.
,
Nasrolahi
A. H.
&
Parsaie
A.
(
2018
)
Water quality prediction using machine learning methods
,
Water Quality Research Journal
,
53
(
1
),
3
13
.
https://doi.org/10.2166/wqrj.2018.025
.
Hamed
M. M.
,
Khalafallah
M. G.
&
Hassanien
E. A.
(
2004
)
Prediction of wastewater treatment plant performance using artificial neural networks
,
Environmental Modelling & Software
,
19
(
10
),
919
928
.
https://doi.org/10.1016/j.envsoft.2003.10.005
.
Hosny
K. M.
,
Kassem
M. A.
&
Fouad
M. M.
(
2020
)
Classification of skin lesions into seven classes using transfer learning with AlexNet
,
Journal of Digital Imaging
,
33
,
1325
1334
.
https://doi.org/10.1007/s10278-020-00371-9
.
Howard
I.
,
Espigares
E.
,
Lardelli
P.
,
Martín
J. L.
&
Espigares
M.
(
2004
)
Evaluation of microbiological and physicochemical indicators for wastewater treatment
,
Environmental Toxicology
,
19
(
3
),
241
249
.
https://doi.org/10.1002/tox.20016
.
Khan
W. A.
,
Ali
S.
&
Shah
S. A.
(
2022
)
Water pollution: Sources and its impact on human health, control and managing
,
Journal of International Cooperation and Development
,
5
(
1
),
69
.
https://doi.org/10.36941/jicd-2022-0005
.
Kim
H. I.
,
Kim
D.
,
Mahdian
M.
,
Salamattalab
M. M.
,
Bateni
S. M.
&
Noori
R.
(
2024
)
Incorporation of water quality index models with machine learning-based techniques for real-time assessment of aquatic ecosystems
,
Environmental Pollution
,
355
,
124242
.
https://doi.org/10.1016/j.envpol.2024.124242
.
Kingma
D. P.
&
Ba
J.
(
2014
)
Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980
.
Krizhevsky
A.
,
Sutskever
I.
&
Hinton
G. E.
(
2017
)
ImageNet classification with deep convolutional neural networks
,
Communications of the ACM
,
60
(
6
),
84
90
.
https://doi.org/10.1145/3065386
.
Lloret
J.
,
Bosch Roig
I.
,
Sendra Compte
S.
&
Serrano Cartagena
A.
(
2011
)
A wireless sensor network that use image processing for vineyard monitoring
,
Sensors
,
11
(
6
),
6165
6196
.
https://doi.org/10.3390/s110606165
.
Lopez-Betancur
D.
,
Moreno
I.
,
Guerrero-Mendez
C.
,
Saucedo-Anaya
T.
,
González
E.
,
Bautista-Capetillo
C.
&
González-Trinidad
J.
(
2022
)
Convolutional neural network for measurement of suspended solids and turbidity
,
Applied Sciences
,
12
(
12
),
6079
.
https://doi.org/10.3390/app12126079
.
Lu
S.
,
Lu
Z.
&
Zhang
Y. D.
(
2019
)
Pathological brain detection based on AlexNet and transfer learning
,
Journal of Computational Science
,
30
,
41
47
.
https://doi.org/10.1016/j.jocs.2018.11.008
.
Lu
T.
,
Han
B.
&
Yu
F.
(
2021
)
Detection and classification of marine mammal sounds using AlexNet with transfer learning
,
Ecological Informatics
,
62
,
101277
.
https://doi.org/10.1016/j.ecoinf.2021.101277
.
Lv
M.
,
Zhou
G.
,
He
M.
,
Chen
A.
,
Zhang
W.
&
Hu
Y.
(
2020
)
Maize leaf disease identification based on feature enhancement and DMS-robust AlexNet
,
IEEE Access
,
8
,
57952
57966
.
https://doi.org/10.1109/ACCESS.2020.2982443
.
Ministry of Environment and Natural Resources Mexico
(
2011
) .
Morid
M. A.
,
Borjali
A.
&
Del Fiol
G.
(
2021
)
A scoping review of transfer learning research on medical image analysis using ImageNet
,
Computers in Biology and Medicine
,
128
,
104115
.
https://doi.org/10.1016/j.compbiomed.2020.104115
.
Mustafa
M. T.
,
Hassoon
K. I.
,
Hussain
H. M.
&
Abd
M. H.
(
2017
)
Using water indices (NDWI, MNDWI, NDMI, WRI and AWEI) to detect physical and chemical parameters by apply remote sensing and GIS techniques
,
International Journal of Research – Granthaalayah
,
5
(
10
),
117
128
.
https://doi.org/10.29121/granthaalayah.v5.i10.2017.2289
.
Naderian
D.
,
Noori
R.
,
Heggy
E.
,
Bateni
S. M.
,
Bhattarai
R.
,
Nohegar
A.
&
Sharma
S.
(
2024
)
A water quality database for global lakes
,
Resources, Conservation and Recycling
,
202
,
107401
.
https://doi.org/10.1016/j.resconrec.2023.107401
.
Najafzadeh
M.
,
Noori
R.
,
Afroozi
D.
,
Ghiasi
B.
,
Hosseini-Moghari
S. M.
,
Mirchi
A.
,
Haghighi
A. T.
&
Kløve
B.
(
2021
)
A comprehensive uncertainty analysis of model-estimated longitudinal and lateral dispersion coefficients in open channels
,
Journal of Hydrology
,
603
,
126850
.
https://doi.org/10.1016/j.jhydrol.2021.126850
.
National Advisory Committee for Standardization of the Environment and Natural Resources of Mexico.
(
2021
)
Mexican Official STANDARD NOM-001-SEMARNAT-2021, Which Establishes the Permissible Limits of Contaminants in Wastewater Discharges in Receiving Bodies Owned by the Nation. Mexico City, Mexico: Ministry of Environment and Natural Resources
.
Newton
D.
,
Yousefian
F.
&
Pasupathy
R.
(
2018
)
Stochastic gradient descent: Recent trends
.
INFORMS TutORials in Operations Research
,
2018
,
193
220
. .
Nodefarahani
M.
,
Aradpour
S.
,
Noori
R.
,
Tang
Q.
,
Partani
S.
&
Klöve
B.
(
2020
)
Metal pollution assessment in surface sediments of Namak Lake, Iran
,
Environmental Science and Pollution Research
,
27
,
45639
45649
.
https://doi.org/10.1007/s11356-020-10298-x
.
Noori
R.
,
Karbassi
A. R.
,
Ashrafi
K.
,
Ardestani
M.
&
Mehrdadi
N.
(
2013
)
Development and application of reduced-order neural network model based on proper orthogonal decomposition for BOD5 monitoring: Active and online prediction
,
Environmental Progress & Sustainable Energy
,
32
(
1
),
120
127
.
https://doi.org/10.1002/ep.10611
.
Noori
R.
,
Ghiasi
B.
,
Salehi
S.
,
Esmaeili Bidhendi
M.
,
Raeisi
A.
,
Partani
S.
,
Meysami
R.
,
Mahdian
M.
,
Hosseinzadeh
M.
&
Abolfathi
S.
(
2022
)
An efficient data driven-based model for prediction of the total sediment load in rivers
,
Hydrology
,
9
(
2
),
36
.
https://doi.org/10.3390/hydrology9020036
.
Pai
T. Y.
,
Tsai
Y. P.
,
Lo
H. M.
,
Tsai
C. H.
&
Lin
C. Y.
(
2007
)
Grey and neural network prediction of suspended solids and chemical oxygen demand in hospital wastewater treatment plant effluent
,
Computers & Chemical Engineering
,
31
(
10
),
1272
1281
.
https://doi.org/10.1016/j.compchemeng.2006.10.012
.
Palani
S.
,
Liong
S. Y.
&
Tkalich
P.
(
2008
)
An ANN application for water quality forecasting
,
Marine Pollution Bulletin
,
56
(
9
),
1586
1597
.
https://doi.org/10.1016/j.marpolbul.2008.05.021
.
Patil
S.
,
Pisal
J.
,
Patil
A.
,
Ingavale
S.
,
Ayarekar
P.
&
Mulla
S.
(
2019
)
A real time solution to flood monitoring system using IoT and wireless sensor networks
,
International Research Journal of Engineering and Technology
,
6
(
02
),
1807
1811
.
Perry
C.
&
Taylor
K.
(
2009
)
Environmental Sedimentology
.
Malden, MA
:
John Wiley & Sons, Blackwell Publishing
.
Purwono
P.
,
Ma'arif
A.
,
Rahmaniar
W.
,
Fathurrahman
H.
,
Frisky
A.
&
Haq
Q.
(
2023
)
Understanding of convolutional neural network (CNN): A review
,
International Journal of Robotics and Control Systems
,
2
(
4
),
739
748
.
https://doi.org/10.31763/ijrcs.v2i4.888
.
Raschka
S.
&
Mirjalili
V.
(
2019
)
Python Machine Learning: Machine Learning and Deep Learning with Python, Scikit-Learn, and TensorFlow 2
.
Birmingham, UK
:
Packt Publishing Ltd
.
Rossi
L.
,
Krejci
V.
,
Rauch
W.
,
Kreikenbaum
S.
,
Fankhauser
R.
&
Gujer
W.
(
2005
)
Stochastic modeling of total suspended solids (TSS) in urban areas during rain events
,
Water Research
,
39
(
17
),
4188
4196
.
https://doi.org/10.1016/j.watres.2005.07.041
.
Russakovsky
O.
,
Deng
J.
,
Su
H.
,
Krause
J.
,
Satheesh
S.
,
Ma
S.
,
Huang
Z.
,
Karpathy
A.
,
Khosla
A.
,
Bernstein
M.
,
Berg
A. C.
&
Fei-Fei
L.
(
2015
)
ImageNet large scale visual recognition challenge
,
International Journal of Computer Vision
,
115
,
211
252
.
https://doi.org/10.1007/s11263-015-0816-y
.
Sabari
M.
,
Aswinth
P.
,
Karthik
T.
&
Kumar
C. B.
(
2020
). '
Water quality monitoring system based on IoT
',
2020 5th International Conference on Devices, Circuits and Systems (ICDCS)
, pp.
279
282
.
https://doi.org/10.1109/ICDCS48716.2020.243598
.
Saberioon
M.
,
Brom
J.
,
Nedbal
V.
,
Souček
P.
&
Císař
P.
(
2020
)
Chlorophyll-a and total suspended solids retrieval and mapping using Sentinel-2A and machine learning for inland waters
,
Ecological Indicators
,
113
,
106236
.
https://doi.org/10.1016/j.ecolind.2020.106236
.
Schauser
I.
&
Steinberg
C.
(
2001
)
Water pollution – Methods and criteria to rank, model and remediate chemical threats to aquatic ecosystems, L. Hâkanson
,
Journal of Paleolimnology
,
26
,
225
227
.
https://doi.org/10.1023/A:1011127304691
.
Sekaran
S. A. R.
,
Lee
C. P.
&
Lim
K. M.
(
2021
). '
Facial emotion recognition using transfer learning of AlexNet
',
9th International Conference on Information and Communication Technology (ICoICT)
.
Yogyakarta, Indonesia
,
2021
, pp.
170
174
.
Seliya
N.
,
Khoshgoftaar
T. M.
&
Van Hulse
J.
(
2009
). '
A study on the relationships of classifier performance metrics
’,
2009 21st IEEE International Conference on Tools with Artificial Intelligence
.
Newark, NJ, USA
, pp.
59
66
.
Smith
L. N.
(
2017
). '
Cyclical learning rates for training neural networks
’,
2017 IEEE Winter Conference on Applications of Computer Vision (WACV)
.
IEEE
, pp.
464
472
.
Smith
A. L.
&
Greenberg
A. E.
(
1963
)
Evaluation of methods for determining suspended solids in wastewater
,
Journal (Water Pollution Control Federation)
,
35
(
7
),
940
943
.
Thaker
N.
&
Shukla
A.
(
2020
)
Python as multiparadigm programming language
,
International Journal of Computer Applications
,
177
(
31
),
38
42
.
https://doi.org/10.5120/ijca2020919775
.
Wagle
N.
,
Acharya
T. D.
&
Lee
D. H.
(
2020
)
Comprehensive review on application of machine learning algorithms for water quality parameter estimation using remote sensing data
,
Sensors & Materials
,
32
(
11
),
3879
3892
.
https://doi.org/10.18494/SAM.2020.2953
.
Wang
S. H.
,
Xie
S.
,
Chen
X.
,
Guttery
D. S.
,
Tang
C.
,
Sun
J.
&
Zhang
Y. D.
(
2019
)
Alcoholism identification based on an AlexNet transfer learning model
,
Frontiers in Psychiatry
,
10
,
205
.
https://doi.org/10.3389/fpsyt.2019.00205
.
Witten
I. H.
,
Frank
E.
,
Hall
M. A.
,
Pal
C. J.
&
Data
M.
(
2005
)
Practical machine learning tools and techniques
. In:
M. Kaufmann (ed.)
Data Mining
, 2nd edn.
Amsterdam, The Netherlands
:
Elsevier
, pp.
403
413
.
Wu
Z.
,
Shen
C.
&
Van Den Hengel
A.
(
2019
)
Wider or deeper: Revisiting the ResNet model for visual recognition
,
Pattern Recognition
,
90
,
119
133
.
https://doi.org/10.1016/j.patcog.2019.01.006
.
Yu
T.
&
Zhu
H.
(
2020
).
Hyper-parameter optimization: A review of algorithms and applications. arXiv preprint arXiv:2003.05689
.
Yuan
Z. W.
&
Zhang
J.
(
2016
). '
Feature extraction and image retrieval based on AlexNet
',
Eighth International Conference on Digital Image Processing (ICDIP 2016)
,
Vol. 10033
, pp.
65
69
.
Zhang
Z.
(
2018
). '
Improved Adam optimizer for deep neural networks
’,
2018 IEEE/ACM 26th International Symposium on Quality of Service (IWQoS)
.
Banff, AB, Canada
,
2018
, pp.
1
2
.
Zhang
Y.
,
Pulliainen
J.
,
Koponen
S.
&
Hallikainen
M.
(
2002
)
Application of an empirical neural network to surface water quality estimation in the Gulf of Finland using combined optical data and microwave data
,
Remote Sensing of Environment
,
81
(
2–3
),
327
336
.
https://doi.org/10.1016/S0034-4257(02)00009-3
.
Zhang
Y. D.
,
Govindaraj
V. V.
,
Tang
C.
,
Zhu
W.
&
Sun
J.
(
2019
)
High performance multiple sclerosis classification by data augmentation and AlexNet transfer learning model
,
Journal of Medical Imaging and Health Informatics
,
9
(
9
),
2012
2021
.
https://doi.org/10.1166/jmihi.2019.2692
.
This is an Open Access article distributed under the terms of the Creative Commons Attribution Licence (CC BY-NC 4.0), which permits copying, adaptation and redistribution for non-commercial purposes, provided the original work is properly cited (http://creativecommons.org/licenses/by-nc/4.0/).