Visual compliance has emerged as a new paradigm to ensure that employees comply with processes and policies in a business context [1]. In this paper, we focus on videos from retail stores and formulate a binary integer program for detecting checkout events, which enables enforcing visual compliance in such an environment. The proposed integer program maximizes the essential quantities that characterize true events of interest, subject to an array of constraints. In particular, the binary decision variables correspond to the presence of a set of hypothesized visual events. In the objective function, the binary variables are weighted by quality measures derived from infinite Gaussian mixture modeling of the video content, such that maximizing the overall quality measure is expected to uncover the meaningful visual events. Our framework is tested and validated on videos recorded at checkout lanes, and leads to better performance than previous methods.