Method of detection of visible defects in physical parts comprising: - providing an apparatus comprising a hollow structure adapted to receive a part, a plurality of light sources distributed on the inside of the hollow structure, a camera for imaging the part, and a controller for selectively illuminating at least a portion of said light sources in predetermined combinations at predetermined intensities and for actuating said camera; said method comprising an operational phase comprising the steps of: - providing a part to be tested in the interior of said hollow structure; - illuminating the part to be tested with the light sources in said predetermined combinations at said predetermined intensities; - imaging the part to be tested synchronously with illuminating said part to be tested, thereby obtaining a number n of original test images; - processing said original test images to detect visible defects in said part to be tested, characterised in that said predetermined combinations of light sources and said predetermined intensities are determined in a setup phase by: - imaging a number of parts without visible defects and a number of parts with known visible defects while illuminating each part with individual light sources or groups of light sources at known intensity, thereby obtaining a number N of sample images corresponding to a given part; - identifying visible defects in said sample images; - combining said sample images for each part into an N-dimensional image for each part having N dimensions per pixel; - performing a dimensionality reduction of said N-dimensional images to reduce the dimensionality of said images while still permitting identification of said visible defects, thereby generating corresponding n-dimensional images; - determining said predetermined combinations of light sources and said predetermined intensities based on a result of said dimensionality reduction. - providing an apparatus comprising a hollow structure adapted to receive a part, a plurality of light sources distributed on the inside of the hollow structure, a camera for imaging the part, and a controller for selectively illuminating at least a portion of said light sources in predetermined combinations at predetermined intensities and for actuating said camera; - providing a part to be tested in the interior of said hollow structure; - illuminating the part to be tested with the light sources in said predetermined combinations at said predetermined intensities; - imaging the part to be tested synchronously with illuminating said part to be tested, thereby obtaining a number n of original test images; - processing said original test images to detect visible defects in said part to be tested, - imaging a number of parts without visible defects and a number of parts with known visible defects while illuminating each part with individual light sources or groups of light sources at known intensity, thereby obtaining a number N of sample images corresponding to a given part; - identifying visible defects in said sample images; - combining said sample images for each part into an N-dimensional image for each part having N dimensions per pixel; - performing a dimensionality reduction of said N-dimensional images to reduce the dimensionality of said images while still permitting identification of said visible defects, thereby generating corresponding n-dimensional images; - determining said predetermined combinations of light sources and said predetermined intensities based on a result of said dimensionality reduction.