Let A=(aj,k)j,k=−∞∞ be a bounded linear operator on l2(Z) whose diagonals Dn(A)=(aj,j−n)j=−∞∞∈l∞(Z) are almost periodic sequences. For certain classes of such operators and under certain conditions, we are going to determine the asymptotics of the determinants detAn1,n2 of the finite sections of the operator A as their size n2−n1 tends to infinity. Examples of such operators include block Toeplitz operators and the almost Mathieu operator.