Additive manufacturing (AM) is a new paradigm in design-driven build of customized products. Nonetheless, mass customization and low-volume production make the AM quality assurance extremely challenging. Advanced imaging provides an unprecedented opportunity to increase information visibility, cope with the product complexity, and enable on-the-fly quality control in AM. However, in situ images of a customized AM build show a high level of layer-to-layer geometry variation, which hampers the use of powerful image-based learning methods such as deep neural networks (DNNs) for flaw detection. Very little has been done on deep learning of variant geometry for image-guided process monitoring and control. The proposed research is aimed at filling this gap by developing a novel machine learning approach that is focused on variant geometry in each layer of the AM build, namely region of interests, for the characterization and detection of layerwise flaws. Specifically, we leverage the computer-aided design (CAD) file to perform shape-to-image registration and to delineate the regions of interest in layerwise images. Next, a hierarchical dyadic partitioning methodology is developed to split layer-to-layer regions of interest into subregions with the same number of pixels to provide freeform geometry analysis. Then, we propose a semiparametric model to characterize the complex spatial patterns in each customized subregion and boost the computational speed. Finally, a DNN model is designed to learn variant geometry in layerwise imaging profiles and detect fine-grained information of flaws. Experimental results show that the proposed deep learning methodology is highly effective to detect flaws in each layer with an accuracy of 92.50 ± 1.03%. This provides a significant opportunity to reduce interlayer variation in AM prior to completion of a build. The proposed methodology can also be generally applicable in a variety of engineering and medical domains that entail customized design, variant geometry, and image-guided process control.