In this paper, dual-hop amplify-and-forward (AF) cooperative systems in the presence of in-phase and quadrature-phase (I/Q) imbalance, which refers to the mismatch between components in I and Q branches, are investigated. First, we analyze the performance of the considered AF cooperative protocol without compensation for I/Q imbalance as the benchmark. Furthermore, a compensation algorithm for I/Q imbalance is proposed, which makes use of the received signals at the destination, from the source and relay nodes, together with their conjugations to detect the transmitted signal. The performance of the AF cooperative system under study is evaluated in terms of average symbol error probability (SEP), which is derived considering transmission over Rayleigh fading channels. Numerical results are provided and show that the proposed compensation algorithm can efficiently mitigate the effect of I/Q imbalance.