A computer-implemented method for quality control based on one or more samples of a product, the method being executed by one or more processors, and comprising: a) receiving, by the one or more processors, sample data, the sample data being generated as digital data representative of a sample of the product, wherein the sample data comprises one or more digital images of the sample of the product; b) providing, by the one or more processors, a set of features by processing the one or more digital images through a set of convolutional layers of a residual network, wherein at each of the convolutional layers, the one or more digital images is filtered to identify features within said one or more digital images, and wherein the set of features are provided as output of the residual network; c) inputting the set of features into a convolution neural network and processing, by the one or more processors, the set of features using the convolution neural network to identify a set of regions of the sample of the product, and to identify at least one object in a region of the set of regions, and to determine a type of the at least one object; d) if the number of objects identified within the one or more digital images of the sample of the product is greater than a threshold number of objects, altering, by the one or more processors, a resolution of the one or more digital images of the sample of the product based on the identified set of regions by splitting the one or more digital images of the sample of the product into multiple overlapping parts, wherein the resolution of each overlapping part is less than the resolution of the one or more digital images of the sample of the product, and reprocessing the overlapping parts as the one or more digital images of the sample of the product from step b); and e) selectively issuing, by the one or more processors, an alert at least partially based on the determined type of the at least one object, the alert indicating contamination within the sample of the product. a) receiving, by the one or more processors, sample data, the sample data being generated as digital data representative of a sample of the product, wherein the sample data comprises one or more digital images of the sample of the product; b) providing, by the one or more processors, a set of features by processing the one or more digital images through a set of convolutional layers of a residual network, wherein at each of the convolutional layers, the one or more digital images is filtered to identify features within said one or more digital images, and wherein the set of features are provided as output of the residual network; c) inputting the set of features into a convolution neural network and processing, by the one or more processors, the set of features using the convolution neural network to identify a set of regions of the sample of the product, and to identify at least one object in a region of the set of regions, and to determine a type of the at least one object; d) if the number of objects identified within the one or more digital images of the sample of the product is greater than a threshold number of objects, altering, by the one or more processors, a resolution of the one or more digital images of the sample of the product based on the identified set of regions by splitting the one or more digital images of the sample of the product into multiple overlapping parts, wherein the resolution of each overlapping part is less than the resolution of the one or more digital images of the sample of the product, and reprocessing the overlapping parts as the one or more digital images of the sample of the product from step b); and e) selectively issuing, by the one or more processors, an alert at least partially based on the determined type of the at least one object, the alert indicating contamination within the sample of the product.