  This paper presents a computationally efficient framework for identifying
resonance modes of 3D radio-frequency (RF) cavities with damping waveguide
ports. The proposed framework relies on surface integral equation (IE)
formulations to convert the task of resonance detection to the task of finding
resonance frequencies at which the lowest few eigenvalues of the system matrix
is close to zero. For the linear eigenvalue problem \rev{with a fixed
frequency}, we propose leveraging fast direct solvers to efficiently invert the
system matrix; for the frequency search problem, we develop a hybrid
optimization algorithm that combines Bayesian optimization with down-hill
simplex optimization. The proposed IE-based resonance detection framework
(IERD) has been applied to detection of high-order resonance modes (HOMs) of
realistic accelerator RF cavities to demonstrate its efficiency and accuracy.
