A computational framework is developed for the detection of flaws in flexible structures. The framework is based on posing the detection problem as an inverse problem, which requires the solution of many forward problems. Each forward problem is associated with a known flaw; an appropriate cost functional evaluates the quality of each candidate flaw based on the solution of the corresponding forward problem. On the higher level, the inverse problem is solved by a global optimization algorithm. The performance of the computational framework is evaluated by considering the detectability of various types of flaws. In the present context detectability is defined by introducing a measure of the distance between the sought flaw and trial flaws in the space of the parameters characterizing the configuration of the flaw. The framework is applied to crack detection in flat membranes subjected to time-harmonic and transient excitations. The detectability of cracks is compared for these two cases.